place shadows to show off mixing

This commit is contained in:
2026-01-30 18:58:43 +01:00
parent 552c3c6e95
commit 755d62db7d
2 changed files with 6 additions and 6 deletions

View File

@@ -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) {

View File

@@ -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