mirror of
https://github.com/rt64/rt64.git
synced 2025-04-25 03:02:33 +00:00
Co-authored-by: Isaac Marovitz <isaacryu@icloud.com> Co-authored-by: tanmaysachan <tnmysachan@gmail.com> Co-authored-by: Dario <dariosamo@gmail.com>
14 lines
340 B
HLSL
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);
|
|
} |