- Home /
Alternative to projector for use on mobile device
Hi, i was wondering if anyone knows of a good alternative to the built in projector for creating shadows in game. I have 8 objects that move constantly and go up and down slopes. The projection works great on desktop, but on mobile even 2 of these projectors kills the game(due to the large single textured landscape i presume).
Is there a good shader that anyone knows of that doesnt need to redraw the texture below the projection? I believe that is what causes the problem, though i may be wrong as i am no shader expert.
Any other alternatives are greatly appreciated, since the game is lacking without the shadows. Thanks in advance!
why don't you use built-in shaders? also cause perfomance reason? it can be turned on only for objects you need.
@Scroodge$$anonymous$$ hey, thanks for the reply. Im not sure what you mean by builtin shaders.
We are currently developing our own shadow system that will be much lighter than using projectors(lighter than even a single projector, considering our 'terrains' texture size), so i think that is the way to go.
Answer by ThermalFusion · Aug 03, 2012 at 11:31 PM
The problem is that projectors cover the entire meshes they hit, but as the texture is clamped, you can only see it inside the projector bounds. If you have one big mesh as your landscape each projector hitting this mesh will cause the entire mesh to be rendered again with the projector shader. Try giving the projectors a regular shader with a tiling texture and you will see how it actually works.
Perhaps try using mesh decals. Why not give http://forum.unity3d.com/threads/141792-Decal-System a go?
@ThermalFusion Wow, this looks awesome! And it takes one draw call for as many projectors as you have in a single manager, that is wicked sweet. Thanks for sharing that very much. Im going to dl it and give it a shot, if it doesnt work for our purposes we have our dynamic shadow system. As far as decals go, this is an awesome asset and i can see us using this a lot. Thanks again for the share.