Skip to content

Commit

Permalink
Implement Settings To Control Rendering (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
datacrystals committed Jun 23, 2022
1 parent b1b3d28 commit f42f66a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,11 @@ void ERS_CLASS_ShadowMaps::GetDepthMaps(std::vector<ERS_STRUCT_DepthMap*>* Depth

}

void ERS_CLASS_ShadowMaps::UpdateShadowMaps(ERS_STRUCT_Shader* DepthMapShader, ERS_STRUCT_Shader* CubemapDepthShader, glm::vec3 CameraPosition) {

// Get Updated Info From Renderer Settings
ERS_CLASS_DepthMaps_->CheckSettings();
ERS::Renderer::ShadowUpdateMode UpdateMode = SystemUtils_->RendererSettings_->ShadowUpdateMode_;
//ERS::Renderer::ShadowFilteringType FilterMode = SystemUtils_->RendererSettings_->ShadowFilteringType_;
void ERS_CLASS_ShadowMaps::PrioritizeDepthMaps(std::vector<ERS_STRUCT_DepthMap*> DepthMaps, std::vector<glm::vec3> LightPositions, glm::vec3 CameraPosition) {


// Create List Of All Depth Maps
std::vector<ERS_STRUCT_DepthMap*> DepthMaps;
std::vector<glm::vec3> LightPositions;
GetDepthMaps(&DepthMaps, &LightPositions);
ERS::Renderer::ShadowUpdateMode UpdateMode = SystemUtils_->RendererSettings_->ShadowUpdateMode_;



// Skip Handling An Update If No Lights Are To Be Updated Here
if (DepthMaps.size() > 1) {
Expand Down Expand Up @@ -169,6 +160,24 @@ void ERS_CLASS_ShadowMaps::UpdateShadowMaps(ERS_STRUCT_Shader* DepthMapShader, E
}


}

void ERS_CLASS_ShadowMaps::UpdateShadowMaps(ERS_STRUCT_Shader* DepthMapShader, ERS_STRUCT_Shader* CubemapDepthShader, glm::vec3 CameraPosition) {

// Get Updated Info From Renderer Settings
ERS_CLASS_DepthMaps_->CheckSettings();
//ERS::Renderer::ShadowFilteringType FilterMode = SystemUtils_->RendererSettings_->ShadowFilteringType_;


// Create List Of All Depth Maps
std::vector<ERS_STRUCT_DepthMap*> DepthMaps;
std::vector<glm::vec3> LightPositions;
GetDepthMaps(&DepthMaps, &LightPositions);





// Update All Depth Maps
ERS_CLASS_DepthMaps_->UpdateDepthMaps(DepthMapShader, CubemapDepthShader);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ERS_CLASS_ShadowMaps {
* @param DepthMaps
* @param LightPositions
*/
void PrioritizeDepthMaps(std::vector<ERS_STRUCT_DepthMap*>* DepthMaps, std::vector<glm::vec3>* LightPositions);
void PrioritizeDepthMaps(std::vector<ERS_STRUCT_DepthMap*> DepthMaps, std::vector<glm::vec3> LightPositions, glm::vec3 CameraPosition);


public:
Expand Down

0 comments on commit f42f66a

Please sign in to comment.