Updated multiple components to improve encapsulation, maintainability, and performance. Key changes include: - Upgraded package dependencies in project files. - Refactored `Mesh` and `RenderingContext` to use properties and added support for per-object constant buffers. - Improved resource management in `D3D12CommandBuffer`, `D3D12CommandQueue`, and `D3D12ResourceAllocator` with better encapsulation and disposal handling. - Added validation for constant buffer sizes in `D3D12PipelineLibrary`. - Simplified `MeshBuilder` methods to accept allocators and removed hardcoded values. - Enhanced debugging with `GPUResourceLeakException` and resource tracking updates. - Updated shaders and rendering logic for testing, including hardcoded triangle rendering. - Removed redundant base classes and interfaces for cleaner code structure.
26 lines
660 B
GLSL
26 lines
660 B
GLSL
shader "MyShader/Standard"
|
|
{
|
|
properties
|
|
{
|
|
float4 color = float4(1, 1, 1, 1);
|
|
tex2d_b texture1 = tex2d_b(black);
|
|
tex2d_b texture2 = tex2d_b(white);
|
|
tex2d_b texture3 = tex2d_b(grey);
|
|
tex2d_b texture4 = tex2d_b(normal);
|
|
}
|
|
|
|
pass "Forward"
|
|
{
|
|
pipeline
|
|
{
|
|
ztest = disable;
|
|
zwrite = off;
|
|
cull = off;
|
|
blend = opaque;
|
|
color_mask = 15;
|
|
}
|
|
|
|
ms("F:/csharp/GhostEngine/Ghost.Graphics/RenderPasses/ShaderCode.hlsl", "MSMain");
|
|
ps("F:/csharp/GhostEngine/Ghost.Graphics/RenderPasses/ShaderCode.hlsl", "PSMain");
|
|
}
|
|
} |