Minor - Depth shader - V10.6.0
This commit is contained in:
@@ -18,11 +18,7 @@ struct PixelInputType
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
float4 DepthPixelShader(PixelInputType input) : SV_TARGET
|
||||
{
|
||||
float4 textureColor;
|
||||
|
||||
|
||||
// Sample the pixel color from the texture using the sampler at this texture coordinate location.
|
||||
textureColor = shaderTexture.Sample(SampleType, input.tex);
|
||||
|
||||
return textureColor;
|
||||
float depth = input.position.z / input.position.w;
|
||||
depth = 1.0f - depth;
|
||||
return float4(depth, depth, depth, 1.0f);
|
||||
}
|
Reference in New Issue
Block a user