- Home /
Rendering same object on two cameras with different shaders/properties
I have two cameras rendering the left and respectively right sides of the screen.
I'm rendering a (tk2d) tilemap on both sides of the screen. Now I'd like to make some changes to the way it's being rendered on each side - so the left side and right side have a different accent color. Considering it's one object with one material and one shader, is there any shader/camera trickery I can do to avoid completely duplicating the entire tilemap?
I was thinking of modifying the shader code, but not sure how to detect which camera is currently rendering? I see I can access the camera position but it feels hacky to determine which camera based on a world position.
Any other ideas? I looked at SetReplacementShaders but not sure if that would work either.
Answer by Draco18s · Jun 28, 2015 at 02:40 AM
I realize this is old, but: http://docs.unity3d.com/ScriptReference/Material.SetOverrideTag.html
Your answer
Follow this Question
Related Questions
Vertex Shader problem with _WorldSpaceCameraPos 1 Answer
How to use Camera.RenderWithShader() to modify rendered image? 0 Answers
Creating a cup of water using Unity Pro Water 1 Answer
Desaturating based on camera depth in an image effect? 0 Answers
(Non-Euclidean) Overlapping Textures with Multiple Cameras Problem 0 Answers