aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorphil <[email protected]>2016-10-16 22:11:47 +1300
committerphil <[email protected]>2016-10-16 22:11:47 +1300
commit1e044fc295acbc529278ea1acc2d35800bbc0657 (patch)
tree6c0dbc5514bec13c63238c64e023b296248cb5cd /src
parentf6bba9ab4f959e7a5ae13445e030a4d92f4293db (diff)
Texture Coordinate generation examples corrected in the SamplerGLSL
example
Diffstat (limited to 'src')
-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);
}