- Home /
Question by
joep71 · Jul 03, 2017 at 01:15 PM ·
shadergridopenglvertex color
Fading GL rendered grid
I made a grid with GL functions. This is the function to draw a single line:
void drawLine(Vector3 a, Vector3 b, Color col){
GL.Begin(GL.LINES);
GL.Color(col);
GL.Vertex3(a.x, a.y, a.z);
GL.Vertex3(b.x, b.y, b.z);
GL.End();
}
I want these lines to fade into the background. So I need a shader that both is affected by fog and has the vertex color (GL.Color(col)). Does anyone know how to make it?
This is what i have now (It isn't affected by the fog):
sfafas.jpg
(124.5 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612125414im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to draw GL Lines over GameObjects/Images? 1 Answer
Why Unity compiled shader doesn't use the GLSLPROGRAM/GLSL syntax? 0 Answers
How do I use advanced OpenGL blend mode ? 0 Answers
Shader inconsistency between OpenGL and DirectX 2 Answers
Drawing shape with GL but Shader is drawing over every oject 0 Answers