How to change a Projector rendering queue to prevent from overriding ImageEffects

Hi guys,

Is there a way to change the rendering queue (Opaque, Transparent, or whatever…) of a Projector?
I tried to change both Queue and RenderType tags of my projector shader, but the Projector rendering always happens during the Render.TransparentGeometry queue.
2863460--209665--Screenshot_18.jpg

My problem is that I would like to apply ImageEffects such as Edge Detection and SSAO AFTER my projectors.
These kind of ImageEffects are drawn between the Opaque and Transparent queues (using [ImageEffectOpaque]). But since I find no way to change the Projector rendering queue, my projectors are always rendered AFTER my ImageEffects, and so they override my edges and SSAO.

Here you can see that my Projector projects a green color, but it overrides my blacks edges and my SSAO:
2863460--209667--Screenshot_20.jpg

Thanks

Hi,
I continued my experimentations and it’s really weird:
if I put the queue for my projector at “Background”, it works, the projector is rendered in the opaque queue and I can see my ImageEffects:

But once I see a Transparent object in camera frustum, the projector is also rendered in the Transparent queue (next to my Transparent object), and so it overrides my ImageEffects:

I tried some stuff using the standard Projectors materials and shaders Unity provides in the standard Effects package, and I have the same issue: try to put a ShadowProjector in your scene, the rendering will be different if you watch a Transparent object or not.

Do command buffers help?

Hi, I don’t know much about command buffers. I checked the documentation and couldn’t find how they could help.

Anyway, the behaviour I encounter with the projectors, is it a bug or am I doing something wrong?

Do you have a reference to the AO texture? perhaps the answer is merely to read that texture and blend it in the shader for projector…

It’s a bug with projectors in 5.4, fixed in 5.4.2:

Thanks for your answer, I’ll do that!

Hi guys,
so I updated to Unity 5.5. Indeed, projectors are not rendered twice anymore. However, I still can’t have my ImageEffects rendered AFTER my projector, because I can’t change projectors rendering queue :

With Unity 5.5, projectors are always rendered during the Transparent queue (so after my edge detection and SSAO), even if I change the queue in the shader or in the material.

So my question remains: is there a way to control when projectors are rendered?

Thanks

Hmm… that’s annoying. Checked with 5.4.2 and it does indeed appear that they only render during the transparent pass. Seems like the “fixed” the double rendering issue by removing the pass you actually want rendering and leaving the “wrong” pass. >.<

I would report it to the issue tracker. To me this appears to be objectively wrong behavior (though I’m also guessing it was done intentionally to work around something else).

thanks bgolus!

Do you have the link of the issue you reported, so I could follow it? I couldn’t find it. Thanks!

I did not report it, I was suggesting you do so (as you have a use case where it is easy to show it working or not).

oh sorry, I misread. Sorry about that!