I’ve been staring at this and looking at example code for an hour, and I can’t figure out what I’m doing wrong. I have this code running on the camera:
Shader overdrawShader = Resources.Load ("Shaders/Overdraw") as Shader;
GetComponent<Camera> ().SetReplacementShader (overdrawShader, "RenderType");
This is the shader it’s calling:
Shader "Overdraw" {
Properties {
_MainTex ("Base", 2D) = "white" {}
}
SubShader {
Fog { Mode Off }
ZWrite Off
ZTest Always
Blend One One // additive blending
Tags { "RenderType"="Opaque" }
Pass {
SetTexture[_MainTex] {
constantColor(0.1, 0.04, 0.02, 0)
combine constant, texture
}
}
}
}
The objects in my scene all use the Standard shader, so I know they have a “RenderType”=“Opaque” tag.
When the code gets called, the camera doesn’t render anything. What am I missing?