- Home /
Simple shader in orthographic mode
I have a simple shader I basically copied from the very basic tutorials:
Shader "Custom/FadeOverlay" {
Properties {
_Color ("Main Color", Color) = (1,0.5,0.5,1)
}
SubShader {
Pass {
Material {
Diffuse [_Color]
}
}
}
}
I have a 2D project and thus my camera is orthophedic. I have a single quad that I stretch to be screen size and apply a material based off this shader to the quad (that doesn't cast or receive shadows).
The result in Scene mode is a red square (due to me selecting Main Color as red). However, when I run it - the quad gets scaled but it's black as night.
I am completely new to Unity shaders and I have no idea why the simple example in orthogonal mode would do this.
Your answer
Follow this Question
Related Questions
Directional light causing weird reflection in orthographic game view 0 Answers
How to force the compilation of a shader in Unity? 5 Answers
Modifying the basic water shader to support cubeMaps? 0 Answers
Shader: determine if camera is orthographic 2 Answers
Best way to do distance fog with Orthographic camera 0 Answers