aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/classes/org/jdesktop/j3d/examples/gl2es2pipeline/multitex.frag3
-rw-r--r--src/classes/org/jdesktop/j3d/examples/gl2es2pipeline/multitex.vert5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/classes/org/jdesktop/j3d/examples/gl2es2pipeline/multitex.frag b/src/classes/org/jdesktop/j3d/examples/gl2es2pipeline/multitex.frag
index 3606b31..db24f68 100644
--- a/src/classes/org/jdesktop/j3d/examples/gl2es2pipeline/multitex.frag
+++ b/src/classes/org/jdesktop/j3d/examples/gl2es2pipeline/multitex.frag
@@ -61,4 +61,7 @@ void main (void)
vec3 finalColor = color0*cloudFactor + color1;
gl_FragColor = vec4(finalColor, 1.0);
+
+ // if(tc1.x > 0.0)
+ // gl_FragColor = vec4(tc1.y,0.0,0.0,1.0);
}
diff --git a/src/classes/org/jdesktop/j3d/examples/gl2es2pipeline/multitex.vert b/src/classes/org/jdesktop/j3d/examples/gl2es2pipeline/multitex.vert
index 4132cae..5c25c11 100644
--- a/src/classes/org/jdesktop/j3d/examples/gl2es2pipeline/multitex.vert
+++ b/src/classes/org/jdesktop/j3d/examples/gl2es2pipeline/multitex.vert
@@ -63,7 +63,6 @@ void main()
// Transform the vertex
gl_Position = glModelViewProjectionMatrix * glVertex;
- texCoord0 = object_linear(gl_Position, vec4(3.0, 1.5, 0.3, 0.0),vec4(1.0, 2.5, 0.24, 0.0));
- texCoord1 = sphere_map(gl_Position.xyz, Normal);
-
+ texCoord0 = object_linear(glVertex, vec4(3.0, 1.5, 0.3, 0.0),vec4(1.0, 2.5, 0.24, 0.0));
+ texCoord1 = sphere_map(normalize(vec3(glModelViewMatrix*glVertex)), Normal);
}