rt64/examples/shaders/RenderInterfaceTestDecalPS.hlsl
David Chavez 61aa08f517
Add Metal Support (#9)
Co-authored-by: Isaac Marovitz <isaacryu@icloud.com>
Co-authored-by: tanmaysachan <tnmysachan@gmail.com>
Co-authored-by: Dario <dariosamo@gmail.com>
2025-03-11 06:15:21 +01:00

14 lines
340 B
HLSL

//
// RT64
//
Texture2DMS<float> gDepth : register(t0);
float4 PSMain(in float4 pos : SV_Position, in uint sampleIndex : SV_SampleIndex, in float2 uv : TEXCOORD0) : SV_TARGET {
float depth = gDepth.Load(floor(pos.xy), sampleIndex);
if (abs(pos.z - depth) > 1e-6f) {
discard;
}
return float4(1.0f, uv, 1.0f);
}