string vs = @"#version 330 layout(location = og_positionVertexLocation) in vec4 position; uniform mat4 og_modelViewPerspectiveMatrix; void main() { gl_Position = og_modelViewPerspectiveMatrix * position; }"; string fs = @"#version 330 out vec3 fragmentColor; uniform vec3 u_color; void main() { fragmentColor = u_color; }"; ShaderProgram sp = Device.CreateShaderProgram(vs, fs); ((Uniform<Vector3F>)sp.Uniforms["u_color"]).Value = new Vector3F(1, 0, 0);
参考1:https://www.khronos.org/opengl/wiki/Vertex_Shader#Input
参考2:https://www.cnblogs.com/virhuabbs/p/16624259.html
参考3:https://www.bilibili.com/read/cv17388210/
Mesh的顶点(圆点,以1为半径):红色
Mesh的边(线,宽度为0.5):蓝色
Mesh的面():绿色。
如何实现:上述3种着色的结果,把地球以Mesh的线框+顶点+面片形式展示出来?
是不是需要3种着色器。。?一种给点,一种给线,一种给面。。?
标签:www,颜色,color,og,Mesh,https,顶点,着色器 From: https://www.cnblogs.com/2008nmj/p/17434803.html