Skip to content

Commit

Permalink
Implement Spot Light Shadows (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
datacrystals committed Jun 13, 2022
1 parent 09caaff commit 09eaa21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ void ERS_CLASS_DepthMaps::UpdateDepthMaps(ERS_STRUCT_Shader* DepthShader) {
// Check If Light Has DepthMap
if (!Light->DepthMap.Initialized) {
Light->DepthMap = GenerateDepthMap();
std::cout<<i<<"|"<<Light->DepthMap.DepthMapTextureIndex<<std::endl;
}

// Render To Depth Map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,6 @@ void ERS_CLASS_VisualRenderer::UpdateShader(int ShaderIndex, float DeltaTime, in
ActiveShader->SetInt((UniformName + std::string(".DepthMapIndex")).c_str(), ActiveScene->SpotLights[i]->DepthMap.DepthMapTextureIndex);
ActiveShader->SetMat4((UniformName + std::string(".LightSpaceMatrix")).c_str(), ActiveScene->SpotLights[i]->LightSpaceMatrix);

std::cout<<i<<"|"<< ActiveScene->SpotLights[i]->DepthMap.DepthMapTextureIndex<<std::endl;

}


Expand Down

0 comments on commit 09eaa21

Please sign in to comment.