27 lines
554 B
Plaintext
27 lines
554 B
Plaintext
struct PixelShaderInput {
|
|
float4 pos : SV_POSITION;
|
|
float4 uvst : COORDINATES;
|
|
uint tile_type : TILE_TYPE;
|
|
};
|
|
|
|
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.uvst.xy));
|
|
#else
|
|
output.color = float4(1, 0, 1, 1);
|
|
#endif
|
|
return output;
|
|
} |