Skip to content

Commit

Permalink
Removed shadowmap entries for point and spot lights as they don't yet…
Browse files Browse the repository at this point in the history
… have shadow map support
  • Loading branch information
robertosfield committed Sep 19, 2023
1 parent 081d3f5 commit 756b19d
Show file tree
Hide file tree
Showing 2 changed files with 1,033 additions and 1,166 deletions.
8 changes: 0 additions & 8 deletions src/vsg/state/ViewDependentState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,10 +602,6 @@ void ViewDependentState::traverse(RecordTraversal& rt) const
auto eye_position = mv * light->position;
(*light_itr++).set(light->color.r, light->color.g, light->color.b, light->intensity);
(*light_itr++).set(static_cast<float>(eye_position.x), static_cast<float>(eye_position.y), static_cast<float>(eye_position.z), 0.0f);

// shadow maps on point lights not yet supported so set to zero
uint32_t activeNumShadowMaps = 0;
(*light_itr++).set(static_cast<float>(activeNumShadowMaps), 0.0f, 0.0f, 0.0f); // shadow map setting
}

for (auto& [mv, light] : spotLights)
Expand All @@ -617,10 +613,6 @@ void ViewDependentState::traverse(RecordTraversal& rt) const
(*light_itr++).set(light->color.r, light->color.g, light->color.b, light->intensity);
(*light_itr++).set(static_cast<float>(eye_position.x), static_cast<float>(eye_position.y), static_cast<float>(eye_position.z), cos_innerAngle);
(*light_itr++).set(static_cast<float>(eye_direction.x), static_cast<float>(eye_direction.y), static_cast<float>(eye_direction.z), cos_outerAngle);

// shadow maps on spot lights not yet supported so set to zero
uint32_t activeNumShadowMaps = 0;
(*light_itr++).set(static_cast<float>(activeNumShadowMaps), 0.0f, 0.0f, 0.0f); // shadow map setting
}

if (requiresPerRenderShadowMaps && preRenderCommandGraph)
Expand Down
Loading

0 comments on commit 756b19d

Please sign in to comment.