How to blend overlapping meshes

Hi
Kalle´s Projector fx is grouped with a normal Constant fx.
I can t fix the z buffer problem and it seems like Projector fx doesn t like the alpha channel.
What I am trying to achieve is the 2 fx to blend gracefully together, the Constant should just have a full texture, while the Projector fx should cast a rounded shaped on top of it.
txxxx
Simone

patch.zip (34.2 kB)

try and play around with ZWriteEnable (EX9.Renderstate)

another trick is scaling the projektor.fx a tiny little bit larger…

Try to use alpha snippets from shadersnippets . ZWriteEnable is hack way, and can’t help you when you need to blend different kind of meshes with alpha channel. Yes, 2 pass alpha calculation is slower, but works really nice. Just copy paste this techniques to shaders that you use, if you will have problems with compiling - share your code.

hi ALG, I can’t get the code from the Shader snippet working to solve this blending meshes alpha problem. It’s compiling but just doesn’t really seem to do a lot. Is the code def good? Could you make an working version please?

thanks

ok got shaded working but not the fix I’d hoped for. I’ll post an example patch. Seems so simple yet so hard.