|
Post by wyliam on Feb 4, 2015 3:59:05 GMT
I'm looking to add other layers of things above the playspace (i.e. clouds, etc.). The shaders I'm using currently to scroll them, and hide/show areas (smooth FOW, not hex based) currently display below the vegetation.
What components of the Foreground.shader do I need to incorporate into my cloud shader to ensure my assets display above the trees in the scene?
|
|
|
Post by khash on Feb 4, 2015 10:24:37 GMT
Hi!
You can modify object render order to ensure its rendered later (obj.renderer.sortingOrder) and/or modify Queue parameter in shader tags.
We are using as well: Offset [_Offset], [_Offset] which pushes drawing depth closer to the camera. If you use offset it calculates where object exists in the world, and then its depth to define how big area is visible to the player, but this depth is automatically offset , so if you have quad with a image exactly on the wall you may use this shader feature to ensure wall is never drawn through image. But if you go very very close you will not see it floating above wall because its not physically in front of the wall (there will be no space behind the image before wall)
this effects helps us position foreground on the elevated world, as other approaches produced numerous artifacts.
does it help?
|
|
|
Post by wyliam on Feb 7, 2015 19:47:25 GMT
Yes- fantastic! Thanks much!!
|
|