Skip to content

Commit

Permalink
Implement Point Light Shadows (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
datacrystals committed Jun 21, 2022
1 parent 042127a commit 9fca5ca
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,7 @@ void ERS_CLASS_DepthMaps::UpdateDepthMap(ERS_STRUCT_PointLight* Light, ERS_STRUC

// Render All Sides
glViewport(0, 0, DepthTextureArrayWidth_, DepthTextureArrayHeight_);
glBindFramebuffer(GL_FRAMEBUFFER, CubemapFBO_);//Light->DepthMap.FrameBufferObjectID);
glClear(GL_DEPTH_BUFFER_BIT);

DepthShader->MakeActive();

// Render With Depth Shader
Expand Down Expand Up @@ -501,6 +500,8 @@ void ERS_CLASS_DepthMaps::UpdateDepthMaps(ERS_STRUCT_Shader* DepthShader, ERS_S

// Handle Point Lights
std::cout<<"Point lights\n";
glBindFramebuffer(GL_FRAMEBUFFER, CubemapFBO_);//Light->DepthMap.FrameBufferObjectID);
glClear(GL_DEPTH_BUFFER_BIT);
for (unsigned int i = 0; i < ActiveScene->PointLights.size(); i++) {

// Extract Struct
Expand Down

0 comments on commit 9fca5ca

Please sign in to comment.