"// MarkRayMarchingSamples.fx\n" "// Marks ray marching samples in the stencil by increasing stencil value and discarding all other samples\n" "\n" "#include \"AtmosphereShadersCommon.fxh\"\n" "\n" "Texture2D g_tex2DInterpolationSource;\n" "\n" "void MarkRayMarchingSamplesInStencilPS(FullScreenTriangleVSOutput VSOut\n" " // IMPORTANT: non-system generated pixel shader input\n" " // arguments must have the exact same name as vertex shader \n" " // outputs and must go in the same order.\n" " // Moreover, even if the shader is not using the argument,\n" " // it still must be declared.\n" " )\n" "{\n" " uint2 ui2InterpolationSources = g_tex2DInterpolationSource.Load( int3(VSOut.f4PixelPos.xy,0) );\n" " // Ray marching samples are interpolated from themselves, so it is easy to detect them:\n" " if( ui2InterpolationSources.x != ui2InterpolationSources.y )\n" " discard;\n" "}\n"