D3D12: Add Quad integration test with texture sampling
- Add quad test that renders a textured quad with earth texture - Add quad.hlsl shader with texture sampling (Texture2D + SamplerState) - Add SRV descriptor heap and root signature with SRV table - Fix MessageBox errors -> Log() console output - Fix shader float2->float4 type mismatch - Fix texture initialization to use proper command list handling - Add shader error output to stderr in D3D12Shader - Add Map error logging in D3D12Screenshot
This commit is contained in:
23
tests/RHI/D3D12/integration/quad/Res/Shader/quad.hlsl
Normal file
23
tests/RHI/D3D12/integration/quad/Res/Shader/quad.hlsl
Normal file
@@ -0,0 +1,23 @@
|
||||
struct Vertex {
|
||||
float4 pos : POSITION;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VSOut {
|
||||
float4 pos : SV_POSITION;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
VSOut MainVS(Vertex v) {
|
||||
VSOut o;
|
||||
o.pos = v.pos;
|
||||
o.texcoord = v.texcoord;
|
||||
return o;
|
||||
}
|
||||
|
||||
Texture2D T_DiffuseTexture : register(t0);
|
||||
SamplerState samplerState : register(s0);
|
||||
|
||||
float4 MainPS(VSOut i) : SV_TARGET {
|
||||
return T_DiffuseTexture.Sample(samplerState, i.texcoord.xy);
|
||||
}
|
||||
Reference in New Issue
Block a user