- Home /
Toon Outline Shader + ortographic camera?
Hi,
I make a little 2D platformer with Unity. I have a cube as the stage for the player and want to add a Basic Toon Outline shader to it to draw the black outlines. But it doesn't work when I change the camera to ortographic. In the editor view the outline is only drawn in the backside of the object, so I can't see them with the ortographic camera.
This doesn't work for me:
v2f vert(appdata v) {
v2f o;
o.pos = v.vertex;
o.pos.xyz += v.normal.xyz *_Outline;
o.pos = mul(UNITY_MATRIX_MVP, o.pos);
o.color = _OutlineColor;
return o;
}
Is there are workaround or a other shader to fix this? I only want a outline at the four visible edges of the cube.
Tuni
Comment
Your answer
Follow this Question
Related Questions
Shader edit help/request: outline only and color feature 0 Answers
Silhouette Toon Shader 0 Answers
An Outline like the Editor does in game, with transparency 1 Answer
3DText Outline Shader 2 Answers
Model Outline/Silhouette Shader 1 Answer