- Home /
What exactly are replacement shaders?
Hi,
I want to use the function camera.SetReplacementShader
for my minimap. I am very new to writing shaders, but every shader I use, exept the shaders from this site, don't seem to work:
http://forum.unity3d.com/threads/81437-Rendering-with-Replaced-Shaders
Everything is pink. every shader I use makes everything look pink. On the forum (from the link) they talk about replacement shaders, but I can't find anything about it on the internet...
You really need to know that I am a noob in shader writing, so maybe some of you know some good tutorials to write these "replacement shaders"?
I believe your issue is you are using the wrong type of shaders. I think what you want is a post-processing shader, often used for post-process effects.
Try going Assets->Import Package->Image Effects and using one of the shaders from that package. $$anonymous$$aybe a blur or bloom. Or a screen overlay.
If that works, then that's your problem. I can go into detail of why, but I'll save that for after you know for sure that's the issue.
If not, then it appears replacement shaders have more specific requirements then I knew, and I can't load the docs page on using them...
Answer by Vitorino · Dec 06, 2013 at 11:23 PM
You must pass a value to it. Example: Rendering objects marked with an effect of "heat vision" camera.SetReplacementShader (heatVisionShader "VisibleWithHeatVision");
Your answer
Follow this Question
Related Questions
Replacing lightmap shader pass 0 Answers
Using a camera replacement shader but keeping the underlying (original) colors? -4 Answers
Depth of Field with Shader Replacement? 1 Answer
Replace shader at runtime 0 Answers
Render scene depth to a texture 4 Answers