- Home /
Projector issues - Unity 3 - Please Help!!!
I am trying to use a projector for creating ground markers like in RTS games.
And I have following issues:
Z-fighting or a shader bug (I have tried different shaders it does not help. And I did not found any 'Projector/Additive' shader or Blob-Shadow example in Unity 3).
Texture does not move when I move a game object with the projector component attached. I do not know the algorithm developers use for projectors but it looks like the projector code does not generate UV texture coordinates well.
I shoud tell you that the floor on the screenshot is made of standard cube meshes and you can see that projector texture just stretches to fit the every cube's face. And you can see a small red cylinder and it also has the projector texture fitted inside.
And I have the projector texture wrap mode set to CLAMP. Please do not suggest this :)
Is it a shader bug? Is the projector supposed to work on older hardware? I have only shader model 2.0 on my notebook.
Please help! And thank you!!
Answer by VivienS · Feb 02, 2011 at 09:24 AM
You need to use a special projector shader to do a correct projection. There is no ProjectorAdditive in the standard assets, but there is one in the community wiki: http://www.unifycommunity.com/wiki/index.php?title=ProjectorAdditive
and as for the z-fighting: I only get this effect when projecting on vertex lit shaders. maybe that's what you're using in the scene?