Hi, I apologize if there is a thread already about something similar. I have been looking for awhile for an answer to this. I am trying to use opacity to fade out/soften the edges of an object. The object is complex, and I don’t want anything to fade except the edges of the object. I’m not talking about anti-aliasing, I want to be able to significantly fade the edges from full opacity to zero opacity, based off the distance from the edge of the object, no matter what the camera angle is. I am also not talking about fresnel, which would make anything transparent based on the normal angle. I only want the edges of the actual model to fade/soften, as if you blurred an alpha in photoshop. I also want every object I apply this shader/image effect/whatever to, to be handled as one single object, so that if there are multiple objects overlapping, the edge fade happens as if it’s one solid object. Let me know if you’ve got any ideas! Thanks ahead of time for your help!
Did you manage to solve it?
- Render all the objects you want to fade to a separate screenspace buffer. It could be a single channel texture, just render white to where the objects are, keep black where they aren’t.
- Apply any kind of blur to this texture. (It could be rendered in a lower resolution, since you are blurring it significantly).
- Render the scene. Those fading objects should sample the blurred texture for opacity.