I can see how it would be possible to do this in a Filter (and actually quite simple) but would it be possible to do the following in a regular Material pass:
Take a model that’s kinda cloud-shaped, get the depth of the back-faces (the ones you can’t see from the camera), then the depth of the front, and shade based on the difference between those? I could imagine that wouldn’t be hard in a Filter, but I don’t want to go that route if I it’s possible to pull it off in just a Material.
It is possible, and actually it has already be done. Search for Volumetric Light. It should bring up a topic where TheToucher implemented the same idea:
- Create a floating point texture.
2)Set render mode to additive - -add backfaces linear depth value
-substract frontfaces linear depth value - In the postprocess pass do whatever you want