Skip to content

Commit

Permalink
Remove UV coord rotation - side textures are now correct, but need ro…
Browse files Browse the repository at this point in the history
…tation
  • Loading branch information
deathcap committed Jan 12, 2014
1 parent c6b3079 commit 02214ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function Texture(game, opts) {
'',
' //texCoord = vUv;', // original, stretch
' gl_FragColor = texture2D(tileMap, texCoord);',
' //gl_FragColor = vec4(vUv.s, vUv.t, 1.0, 1.0);', // to coordinates test without texturing
' //gl_FragColor = vec4(vUv.s*3.0, vUv.t*0.1, 1.0, 1.0);', // to coordinates test without texturing, false color
'}'
].join('\n')
},
Expand Down Expand Up @@ -393,9 +393,11 @@ Texture.prototype.paint = function(mesh, materials) {
// faces on these meshes are flipped vertically, so we map in reverse
// TODO: tops need rotate
if (isVoxelMesh) {
/*
if (face.normal.z === -1 || face.normal.x === 1) {
atlasuv = uvrot(atlasuv, 90);
}
*/
atlasuv = uvinvert(atlasuv);
} else {
atlasuv = uvrot(atlasuv, -90);
Expand Down

0 comments on commit 02214ea

Please sign in to comment.