Quantcast
Channel: Questions in topic: "renderqueue"
Viewing all articles
Browse latest Browse all 161

Outline shader: should be seen through some object but not when other object is between first object and shaded.

$
0
0
Hi, I've written a simple shader to draw an outline around objects and that outline must be seen through some objects and not some others. The blocking object have a higher render queue than the shader so the outline is hidden, but as soon as a non-blocking object is above a blcking object, you can see the outline again while it should be blocked by the first object. see: ![non-blocking-object][1] The green cube is a non-blocking object, the outline is visible. ![alt text][2] The red cube is a blocking object, the outline is not visible, but when the non-blocking green cube is above the red cube then the outline is visible again while ideally it should not appear under the red line representing the invisible part of the red cube. I am wondering if there is a way to achieve this by editting my original shader and without adding other custom shaders to other game objects ? here is a link to a gist with the shader code thanks for having a look: https://gist.github.com/Davidiio/af8e43a50b8cfecacf851e3d221dde8d [1]: /storage/temp/105604-untitled-1.jpg [2]: /storage/temp/105606-untitled-3.jpg

Viewing all articles
Browse latest Browse all 161

Trending Articles