Skip to content

Commit 7246b2f

Browse files
committed
fixed a bug in the light shader
1 parent 3e06359 commit 7246b2f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/src/shader/basic_shader.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ ShaderObject createLightShader() {
4141
void main(void) {
4242
gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);
4343
vNormal = (uMVMatrix * vec4(aNormal, 0.0)).xyz;
44+
pointLightLocation = (uMVMatrix * vec4(pointLightLocation, 0.0)).xyz;
4445
4546
vec3 lightDir = normalize(pointLightLocation - aVertexPosition.xyz);
4647

0 commit comments

Comments
 (0)