Subversion Repositories gelsvn

Rev

Rev 664 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 664 Rev 665
Line 193... Line 193...
193
    "	vec4 a = vec4(0.0,0.1,.3,1.0);\n"
193
    "	vec4 a = vec4(0.0,0.1,.3,1.0);\n"
194
    "   float dot_ln = abs(dot(l, n));\n"
194
    "   float dot_ln = abs(dot(l, n));\n"
195
    "	vec4 d = vec4(c,1) * 0.7 * dot_ln;\n"
195
    "	vec4 d = vec4(c,1) * 0.7 * dot_ln;\n"
196
    "	vec4 s = vec4(c,1) * 0.3 * smoothstep(0.98,0.9999,dot(r, e));\n"
196
    "	vec4 s = vec4(c,1) * 0.3 * smoothstep(0.98,0.9999,dot(r, e));\n"
197
    "	\n"
197
    "	\n"
198
    "	gl_FragColor =  d+s;\n"
198
    "	gl_FragColor =  vec4(c,1);\n"
199
    "}\n";
199
    "}\n";
200
    
200
    
201
    HMesh::VertexAttributeVector<CGLA::Vec3f> DebugRenderer::vertex_colors;
201
    HMesh::VertexAttributeVector<CGLA::Vec3f> DebugRenderer::vertex_colors;
202
    HMesh::HalfEdgeAttributeVector<CGLA::Vec3f> DebugRenderer::edge_colors;
202
    HMesh::HalfEdgeAttributeVector<CGLA::Vec3f> DebugRenderer::edge_colors;
203
    HMesh::FaceAttributeVector<CGLA::Vec3f> DebugRenderer::face_colors;
203
    HMesh::FaceAttributeVector<CGLA::Vec3f> DebugRenderer::face_colors;
Line 245... Line 245...
245
        glEnd();
245
        glEnd();
246
        glLineWidth(1);
246
        glLineWidth(1);
247
        Vec3d c;
247
        Vec3d c;
248
        float r;
248
        float r;
249
        bsphere(m, c, r);
249
        bsphere(m, c, r);
250
        r *= 0.003;
250
        r *= 0.01;
251
        for(auto vid : m.vertices())
251
        for(auto vid : m.vertices())
252
        {
252
        {
253
            Vec3d p = m.pos(vid);
253
            Vec3d p = m.pos(vid);
254
            Vec3f c = vertex_colors[vid];
254
            Vec3f c = vertex_colors[vid];
255
            glColor3f(c[0], c[1], c[2]);
255
            glColor3f(c[0], c[1], c[2]);