- Home /
secondary camera (ignore scene lighting)
is there a way to ignore the lighting or to replace the lighting on a 2nd camera? ive got a dark map and obviously the camera im using as a minimap cam is pretty black except for the occasional flicker of light, i was hoping theres a way to add a directional light and only have it display on the 1 cam, but i cant seem to find anything about it
any help is much appreciated thanks
ive enclosed a pic of the problem
Answer by AlwaysSunny · Nov 03, 2014 at 02:49 AM
Minimaps created this way which need to appear somehow different are ideal candidates for RenderWithShader. Just render your minimap cam with shaders that ignore lighting.
http://docs.unity3d.com/Manual/SL-ShaderReplacement.html
If you really want to avoid that approach, you could disable all normal lights, enable a special "minimap light" (or change the ambient lighting), render your mini-map cam, then re-enable normal lights - all in the OnPreRender / OnPostRender methods of your minimap cam.
Answer by Dwaring28720 · Nov 05, 2014 at 08:16 PM
RenderWithShader worked a charm, took me a little while to go thru the manual page but got it too work in the end, thanks very much for your help, its much appreciated for a newbie like myself getting clear and concise answers thank you again