提交 02348e1f 编写于 作者: M Mr.doob

Merge pull request #7109 from tschw/fix7028

Ooops... I broke something
......@@ -222,7 +222,7 @@ THREE.ShaderSkin = {
"for( int i = 0; i < MAX_DIR_LIGHTS; i++ ) {",
"vec3 dirVector = transformDirection( directionalLightDirection[ i ], viewMatrix );",
"vec3 dirVector = directionalLightDirection[ i ];",
"float dirDiffuseWeightFull = max( dot( normal, dirVector ), 0.0 );",
"float dirDiffuseWeightHalf = max( 0.5 * dot( normal, dirVector ) + 0.5, 0.0 );",
......@@ -243,7 +243,7 @@ THREE.ShaderSkin = {
"for ( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
"vec3 lVector = transformDirection( hemisphereLightDirection[ i ], viewMatrix );",
"vec3 lVector = hemisphereLightDirection[ i ];",
"float dotProduct = dot( normal, lVector );",
"float hemiDiffuseWeight = 0.5 * dotProduct + 0.5;",
......@@ -497,7 +497,7 @@ THREE.ShaderSkin = {
"for( int i = 0; i < MAX_DIR_LIGHTS; i++ ) {",
"vec3 dirVector = transformDirection( directionalLightDirection[ i ], viewMatrix );",
"vec3 dirVector = directionalLightDirection[ i ];",
"float dirDiffuseWeight = max( dot( normal, dirVector ), 0.0 );",
......@@ -626,7 +626,7 @@ THREE.ShaderSkin = {
"for( int i = 0; i < MAX_POINT_LIGHTS; i++ ) {",
"vec3 lVector = pointLightPosition[ i ] - mvPosition.xyz;",
"vec3 lVector = pointLightPosition[ i ] - vViewPosition;",
"float attenuation = calcLightAttenuation( length( lVector ), pointLightDistance[ i ], pointLightDecay[i] );",
......@@ -713,7 +713,7 @@ THREE.ShaderSkin = {
"for( int i = 0; i < MAX_POINT_LIGHTS; i++ ) {",
"vec3 lVector = pointLightPosition[ i ] - mvPosition.xyz;",
"vec3 lVector = pointLightPosition[ i ] - vViewPosition;",
"float attenuation = calcLightAttenuation( length( lVector ), pointLightDistance[ i ], pointLightDecay[i] );",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册