diff --git a/res/shaders/simple.frag b/res/shaders/simple.frag index 6196a8c..0bb5f4d 100644 --- a/res/shaders/simple.frag +++ b/res/shaders/simple.frag @@ -67,7 +67,7 @@ void main() float shadow = 1.0; // skip ball's own light (index 2) to avoid self-shadowing the whole scene - if (i != 2 && inShadowCone) { + if (inShadowCone) { if (perpDist <= hardRadius) { shadow = 0.0; } else if (perpDist < softRadius) { diff --git a/src/gamelogic.cpp b/src/gamelogic.cpp index 8f009e0..be5d5c7 100644 --- a/src/gamelogic.cpp +++ b/src/gamelogic.cpp @@ -144,13 +144,13 @@ void initGame(GLFWwindow* window, CommandLineOptions gameOptions) { auto* ballLight = lightNodes[2]; boxNode->children.push_back(ceilingLight); - ceilingLight->position = { 0, 10, 0 }; + ceilingLight->position = { 0, 0, 5 }; - padNode->children.push_back(padLight); - padLight->position = { 0, 10, 0 }; + boxNode->children.push_back(padLight); + padLight->position = { -10, 0, 5 }; - ballNode->children.push_back(ballLight); - ballLight->position = { 0, 0, 0 }; + boxNode->children.push_back(ballLight); + ballLight->position = { 10, 0, 5 }; getTimeDeltaSeconds(); // prime the timer