0
Under review

double sided

vincent 10 years ago updated by Freya Holmér (Developer) 10 years ago 8

when I create a double sided material or use your example shader ; clip and transmission the backfaces doesn't seem to render the depth of field properly. Is this a bug or is there some setting I overlooked?

"render the depth of field properly" ?

sometime a picture says more than a 1000 words;P

Odd, will have to look into that. Are you using deferred or forward rendering?

+1

forward rendering.

+1

Scary! You'd probably be better off editing the mesh though, to actually have triangles on the backside too though, double-sided rendering is more expensive in many cases :)

But I have to get this fixed anyhow

This has nothing to do with double sided rendering, so not sure if the title of this bug should be updated or not to something more approperate.

1. Create new shader (use default settings) > Add Texture2D node > Connect RGB to Diffuse > Connect A to Alpha Clip > Compile
2. Add Depth of Field full screen effect to Camera
3. Add Plane to scene and assign the compiled shader to the plane
4. Notice the entire plane, event the clipped alpha parts are considered at the same depth so they are not blurred out.
5. Assign the included Unity's Alpha Clip Diffuse Shader
6. Notice Depth of field work blurs the screen behind the clipped alpha parts.

I'd love for this to get fixed, and on a side note, I'd love for a "Depth Texture Mask" input to selectively write to the depth texture. You know, if possible and not terribly complex.



Just found a hacky fix for this issue. Opening the shader source and adding the line to the properties section of the shader fixes this issue:

_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5