osg ifc数据渲染着色器

 

//顶点着色器
static const char* vertShader = {
    "varying vec4 color;\n"
    "void main(void)\n"
    "{\n"
    "color = gl_Vertex;\n"
    "gl_Position=gl_ModelViewProjectionMatrix*gl_Vertex;\n"
    "}\n"
};

//片元着色器
static const char* fragShader = {
    "varying vec4 color;\n"
    "void main(void)\n"
    "{\n"
    "    gl_FragColor = clamp(color,0.1,0.8);\n"
    "}\n"
};

 

 

posted @ 2019-07-19 10:46  西北逍遥  阅读(462)  评论(0编辑  收藏  举报