tTex : register(t1); #line 29 Texture2D __V__NV__DepthInputTex : register(t2); Texture2D __srgbV__NV__DepthInputTex : register(t3); SamplerState __s0 : register(s0); #line 30 static const __sampler2D V__NV__ColorInput = { __V__NV__ColorInputTex, __s0 }; #line 31 static const __sampler2D V__NV__DepthInput = { __V__NV__DepthInputTex, __s0 }; #line 56 float F__NV__GetLinearizedDepth( #line 56 in float2 uv) { #line 58 float _16 = 1.00000000e+00 - uv.y; #line 58 float _18 = g_sldDepthInvertY ? _16 : uv.y; #line 58 uv[1] = _18; #line 59 float4 _23 = float4(uv.x, uv.y, 0.00000000e+00, 0.00000000e+00); #line 59 float4 _24 = V__NV__DepthInput.t.SampleLevel(V__NV__DepthInput.s, _23.xy, _23.w); #line 59 float depth = _24.x; #line 60 float _28 = 1.00000000e+00 - depth; #line 60 float _29 = g_sldDepthInvertZ ? _28 : depth; #line 60 depth = _29; #line 65 float _31 = depth * 9.99000000e+02; #line 65 float _33 = 1.00000000e+03 - _31; #line 65 float _34 = depth / _33; #line 65 depth = _34; return depth; } #line 71 float F__NV__GetLuma( #line 71 in float3 color) { #line 74 float _39 = dot(float3(2.98999995e-01, 5.87000012e-01, 1.14000000e-01), color); return _39; } #line 78 struct S__VSOut { float4 pos : SV_POSITION; float2 uv : TEXCOORD0; }; #line 84 S__VSOut F__VSMain( #line 84 in uint vid : SV_VERTEXID) { #line 86 S__VSOut o = (S__VSOut)0; #line 87 bool _47 = vid == 2; #line 87 float _50 = _47 ? 2.00000000e+00 : 0.00000000e+00; #line 87 o.uv[0] = _50; #line 88 bool _52 = vid == 1; #line 88 float _55 = _52 ? 2.00000000e+00 : 0.00000000e+00; #line 88 o.uv[1] = _55; #line 89 float2 _58 = o.uv * float2(2.00000000e+00, -2.00000000e+00); #line 89 float2 _60 = _58 + float2(-1.00000000e+00, 1.00000000e+00); #line 89 float4 _65 = float4(_60.x, _60.y, 0.00000000e+00, 1.00000000e+00); #line 89 o.pos = _65; return o; } #line 93 void F__VSMainOut( #line 93 in uint vid : SV_VERTEXID, #line 93 out float4 position : SV_POSITION, #line 93 out float2 texcoord : TEXCOORD0) { #line 95 uint _71; #line 95 _71 = vid; #line 95 S__VSOut _72 = F__VSMain(_71); #line 95 S__VSOut o_73 = _72; #line 96 position = o_73.pos; #line 97 texcoord = o_73.uv; return; } #line 38 "BlacknWhite.fx" void F__PSMain( #line 38 in S__VSOut i, #line 38 out float4 color : SV_TARGET) { #line 40 float4 _81 = V__NV__ColorInput.t.Sample(V__NV__ColorInput.s, i.uv); #line 40 color = _81; #line 41 float2 _82; #line 41 _82 = i.uv; #line 41 float _84 = F__NV__GetLinearizedDepth(_82); #line 41 float depth_85 = _84; #line 42 float3 _86; #line 42 _86 = color.xyz; #line 42 float _88 = F__NV__GetLuma(_86); #line 42 float gray = _88; #line 44 float _90 = g_sldDistance * g_sldDistance; #line 44 float desat_threshold = _90; #line 45 float _92 = desat_threshold * desat_threshold; #line 45 desat_threshold = _92; #line 47 bool _93 = depth_85 > desat_threshold; #line 47 bool _94 = !g_sldEnableDepth; #line 47 float _97 = _93 ? 1.00000000e+00 : ((float)_94); #line 47 float desat_mask = _97; #line 48 float _99 = desat_mask * g_sldIntensity; #line 48 desat_mask = _99; #line 50 float4 _102 = lerp(color, gray.xxxx, desat_mask.xxxx); #line 50 color = _102; return; }