write to depth buffer while using multiple render targets
- by DocSeuss
Presently my engine is set up to use deferred shading. My pixel shader output struct is as follows:
struct GBuffer
{
float4 Depth : DEPTH0; //depth render target
float4 Normal : COLOR0; //normal render target
float4 Diffuse : COLOR1; //diffuse render target
float4 Specular : COLOR2; //specular render target
};
This works fine for…