Commit 2698531f by Kai Westerkamp

Edge Watertightness

parent be25334c
......@@ -54,11 +54,38 @@ void main()
vec3 p11 = tcPosition[11];
vec3 newPos= a0*p0+a1*p1+a2*p2+a3*p3+a4*p4+a5*p5+a6*p6+a7*p7+a8*p8+a9*p9+a10*p10+a11*p11;
if(v == 0){
newPos = (a0*p0+a11*p11)
+(a1*p1+a10*p10)
+(a4*p4+a6*p6)
+(a2*p2+a8*p8)
+(a3*p3+a7*p7);
}
if(u == 0){
newPos = (a2*p2+a11*p11)
+(a3*p3+a10*p10)
+(a4*p4+a9*p9)
+(a5*p5+a8*p8)
+(a6*p6+a7*p7);
}
if(w == 0){
newPos = (a0*p0+a10*p10)
+(a3*p3+a6*p6)
+(a1*p1+a9*p9)
+(a5*p5+a4*p4)
+(a2*p2+a7*p7);
}
if (subdiv == 0) {
newPos = u * p3 + v * p6 + w * p7;
}
vec4 pos = vec4(newPos, 1.0f);
tePatchDistance = gl_TessCoord.xyz;
teCamPosition = vec4(MV*pos).xyz;
gl_Position = MVP * pos;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment