- Home /
Recieve Shadow from a camera culled Object
Hello. I am developping my FPS game and, as everyone does, I created a Wepon Camera who simply just renders the "Gun" Layer. The problem with that is that I d'ont recieve the shadows from my Environment (For example my Trees or my Rocks who have the 'Default" layer) because these gameobject who creates shadows are hidden by my weapon camera who renders my gun. How could I bypass that ? Does someone have the same problem ? Please answer me :) Resume: My weapon Camera don't recieve the shadows from other layers as the "Gun" one because the weapon camera don't render them, so the weapon camera can't recieve their shadows :( Here is a update of my game: https://www.youtube.com/watch?v=4mtLXjcQmXc Sorry for by bad English (I am French).
Bye Bye.
Answer by Namey5 · Oct 24, 2016 at 07:21 AM
In short; using the methods that you are, you can't. In order to get the object to render on top of everything else and still recieve shadows, the easiest way would probably to change the Z-Testing in the first-person object's shaders so that they render on top of all other objects, i.e.
ZTest Always