place shadows to show off mixing
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user