I’m trying to create somewhat of an Image Effect on some of the objects in my scene.
I’ve tried rendering 2 cameras, one with the effect and one without, but that doesn’t work as the top camera just applies the effect to the whole image.
I’ve also tried taking the 2nd camera, rendering it out to a texture, and then applying that texture onto a plane infront of the 1st camera. This somewhat worked, but it messes up the depth order of the game objects, thus rendering this approach useless.
I thought about writing a shader to apply the effect, but in that case I am limited to the bounds of the object (doesn’t work if I want to MotionBlur something, or just add some face DOF)
I’ve seen many threads but none has the same issue as mine (or at least none I could find).
Does anyone has a good working solution for this problem? or maybe just a suggestion on how to approach this?
There is no need for 2 cameras, My glow per object asset in the store does exactly what you want (the process, not the final effect)
You may use it as a learning tool.
Thanks for that. However just like the one feedback mentioned:
“It applies the effect on the material’s pixels (inside the polygons)”
I need it to blur the object, but that needs to bleed outside the actual objects’ bounds, so it doesn’t seem to work for me (or at least I don’t think it will)
Looking at your webdemo, that seems to be the case as well, and the blur only works on the glowing areas (again, within the objects’ bounds)
Yeah, that is not the case. As mentioned on the feedback above that one, it does apply the bleeding to the surrounding pixels. As seen in the following photos:
How it works and what you require;
It renders the selected objects with selected textures to a temporary texture and using an image effect blurs it to the screen.