Skip to content

Commit

Permalink
Merge pull request #19910 from linbingquan/dev-cleanup-glsl
Browse files Browse the repository at this point in the history
glsl: Clean up.
  • Loading branch information
mrdoob committed Jul 22, 2020
2 parents 5936665 + 6702fe2 commit 219eacd
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderChunk/common.glsl.js
Expand Up @@ -114,7 +114,7 @@ float linearToRelativeLuminance( const in vec3 color ) {
bool isPerspectiveMatrix( mat4 m ) {
return m[ 2 ][ 3 ] == - 1.0;
return m[ 2 ][ 3 ] == - 1.0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.js
Expand Up @@ -9,7 +9,7 @@ export default /* glsl */`
vec3 cameraToVertex;
if ( isOrthographic ) {
if ( isOrthographic ) {
cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderChunk/fog_vertex.glsl.js
@@ -1,7 +1,7 @@
export default /* glsl */`
#ifdef USE_FOG
fogDepth = -mvPosition.z;
fogDepth = - mvPosition.z;
#endif
`;
Expand Up @@ -23,5 +23,4 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
#endif
}
`;
Expand Up @@ -10,10 +10,10 @@ varying vec3 vViewPosition;
struct BlinnPhongMaterial {
vec3 diffuseColor;
vec3 specularColor;
float specularShininess;
float specularStrength;
vec3 diffuseColor;
vec3 specularColor;
float specularShininess;
float specularStrength;
};
Expand Down
@@ -1,9 +1,9 @@
export default /* glsl */`
struct PhysicalMaterial {
vec3 diffuseColor;
float specularRoughness;
vec3 specularColor;
vec3 diffuseColor;
float specularRoughness;
vec3 specularColor;
#ifdef CLEARCOAT
float clearcoat;
Expand Down
Expand Up @@ -10,7 +10,7 @@ varying vec3 vViewPosition;
struct ToonMaterial {
vec3 diffuseColor;
vec3 diffuseColor;
};
Expand Down
Expand Up @@ -5,11 +5,11 @@ export default /* glsl */`
#ifndef USE_MORPHNORMALS
uniform float morphTargetInfluences[ 8 ];
uniform float morphTargetInfluences[ 8 ];
#else
uniform float morphTargetInfluences[ 4 ];
uniform float morphTargetInfluences[ 4 ];
#endif
Expand Down
8 changes: 4 additions & 4 deletions src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.js
Expand Up @@ -12,10 +12,10 @@ export default /* glsl */`
#ifndef USE_MORPHNORMALS
transformed += morphTarget4 * morphTargetInfluences[ 4 ];
transformed += morphTarget5 * morphTargetInfluences[ 5 ];
transformed += morphTarget6 * morphTargetInfluences[ 6 ];
transformed += morphTarget7 * morphTargetInfluences[ 7 ];
transformed += morphTarget4 * morphTargetInfluences[ 4 ];
transformed += morphTarget5 * morphTargetInfluences[ 5 ];
transformed += morphTarget6 * morphTargetInfluences[ 6 ];
transformed += morphTarget7 * morphTargetInfluences[ 7 ];
#endif
Expand Down

0 comments on commit 219eacd

Please sign in to comment.