diff --git a/chapter-12/src/main/java/org/lwjglb/engine/graph/SceneRender.java b/chapter-12/src/main/java/org/lwjglb/engine/graph/SceneRender.java index baa2e68..061e888 100644 --- a/chapter-12/src/main/java/org/lwjglb/engine/graph/SceneRender.java +++ b/chapter-12/src/main/java/org/lwjglb/engine/graph/SceneRender.java @@ -189,7 +189,7 @@ private void updateSpotLight(SpotLight spotLight, String prefix, Matrix4f viewMa } uniformsMap.setUniform(prefix + ".conedir", coneDirection); - uniformsMap.setUniform(prefix + ".conedir", cutoff); + uniformsMap.setUniform(prefix + ".cutoff", cutoff); updatePointLight(pointLight, prefix + ".pl", viewMatrix); } } diff --git a/chapter-13/src/main/java/org/lwjglb/engine/graph/SceneRender.java b/chapter-13/src/main/java/org/lwjglb/engine/graph/SceneRender.java index 853ad03..c6627e9 100644 --- a/chapter-13/src/main/java/org/lwjglb/engine/graph/SceneRender.java +++ b/chapter-13/src/main/java/org/lwjglb/engine/graph/SceneRender.java @@ -202,7 +202,7 @@ private void updateSpotLight(SpotLight spotLight, String prefix, Matrix4f viewMa } uniformsMap.setUniform(prefix + ".conedir", coneDirection); - uniformsMap.setUniform(prefix + ".conedir", cutoff); + uniformsMap.setUniform(prefix + ".cutoff", cutoff); updatePointLight(pointLight, prefix + ".pl", viewMatrix); } }