26 lines
518 B
Plaintext
26 lines
518 B
Plaintext
struct PixelShaderInput {
|
|
float4 pos : SV_POSITION;
|
|
float2 uv : COORDINATES;
|
|
};
|
|
|
|
struct PixelShaderOutput {
|
|
float4 color : SV_TARGET;
|
|
};
|
|
|
|
[[vk::binding(0, 2)]]
|
|
Texture2D<float4> tex1 : register(t0, space2);
|
|
|
|
[[vk::binding(0, 2)]]
|
|
SamplerState texture_sampler : register(s0, space2);
|
|
|
|
[shader("pixel")]
|
|
PixelShaderOutput main(PixelShaderInput input) {
|
|
PixelShaderOutput output;
|
|
|
|
#if 1
|
|
output.color = tex1.Sample(texture_sampler, float2(input.uv));
|
|
#else
|
|
output.color = float4(1, 0, 1, 1);
|
|
#endif
|
|
return output;
|
|
} |