Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glsl: Clean up. #19910

Merged
merged 1 commit into from Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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