Files
XCEngine/tests/RHI/D3D12/integration/sphere/Shader/sphere.hlsl

23 lines
454 B
HLSL
Raw Normal View History

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);
}