Files
XCEngine/tests/RHI/D3D12/integration/triangle/Res/Shader/triangle.hlsl
ssdfasd 45fd25dce3 D3D12: Add triangle integration test with rainbow gradient
- Add triangle test with vertex buffer and custom pipeline state
- Add triangle.hlsl shader with position and color per vertex
- Fix cull mode (NONE) and disable depth test for correct rendering
- Register D3D12_Triangle_Integration CTest
- Add GT.ppm golden image
2026-03-20 19:05:22 +08:00

20 lines
293 B
HLSL

struct Vertex {
float4 pos : POSITION;
float4 col : COLOR;
};
struct VSOut {
float4 pos : SV_POSITION;
float4 col : COLOR;
};
VSOut MainVS(Vertex v) {
VSOut o;
o.pos = v.pos;
o.col = v.col;
return o;
}
float4 MainPS(VSOut i) : SV_TARGET {
return i.col;
}