Permalink
Browse files

Unflipped Beckmann shader. Also tweaked more LeePerry.

I think normal map scale needs to be now positive, though not sure, it just looks closer to how it was before with positive scale, also mole on the right cheek is elevated instead of sunk.
  • Loading branch information...
1 parent 950d3b9 commit ba2088b020a31e7b37a7aac8f649cb1d4cae5e21 @alteredq committed Jul 5, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 examples/js/ShaderSkin.js
  2. +1 −1 examples/obj/leeperrysmith/LeePerrySmith.js
  3. +1 −1 examples/webgl_materials_skin.html
@@ -708,7 +708,7 @@ THREE.ShaderSkin = {
"void main() {",
- "vUv = vec2( uv.x, 1.0 - uv.y );",
+ "vUv = uv;",
"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
"}"

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -118,7 +118,7 @@
var uniformsUV = THREE.UniformsUtils.clone( shader.uniforms );
uniformsUV[ "tNormal" ].texture = THREE.ImageUtils.loadTexture( "obj/leeperrysmith/Infinite-Level_02_Tangent_SmoothUV.jpg" );
- uniformsUV[ "uNormalScale" ].value = -0.75;
+ uniformsUV[ "uNormalScale" ].value = 0.75;
uniformsUV[ "tDiffuse" ].texture = THREE.ImageUtils.loadTexture( "obj/leeperrysmith/Map-COL.jpg" );

2 comments on commit ba2088b

I think it looks correct now. Compare it to the previous one (open both in tabs without mouse interaction and alternate):

http://mrdoob.github.com/three.js/examples/webgl_materials_normalmap2.html

Owner

alteredq replied Jul 5, 2012

Yup, that's what I was doing. It's not 100% the same but bigger features seem to match better with positive scale.

Please sign in to comment.