Shadows stage 2 WIP
This commit is contained in:
@@ -8,11 +8,12 @@
|
||||
#include "ShaderProgram.h"
|
||||
#include "Util/UnorderedMapVec2.h"
|
||||
#include "Texture.h"
|
||||
#include "ShadowPass.h"
|
||||
|
||||
class DrawFinalPass
|
||||
{
|
||||
public:
|
||||
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass);
|
||||
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, ShadowPass* shadowPass);
|
||||
~DrawFinalPass() { }
|
||||
void InitializeTextures();
|
||||
void InitializeFrameBuffers();
|
||||
@@ -50,6 +51,7 @@ private:
|
||||
|
||||
const IRenderer* m_Renderer;
|
||||
const LightCullingPass* m_LightCullingPass;
|
||||
const ShadowPass* m_ShadowPass;
|
||||
|
||||
ShaderProgram* m_ForwardPlusProgram;
|
||||
ShaderProgram* m_ExplosionEffectProgram;
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
|
||||
//#include "ShadowPassState.h" // not created yet
|
||||
|
||||
|
||||
enum NearFar { Near = 0, Far = 1 };
|
||||
enum LRBT { Left = 0, Right = 1, Bottom = 2, Top = 3 };
|
||||
|
||||
class ShadowPass
|
||||
{
|
||||
@@ -28,7 +29,11 @@ public:
|
||||
|
||||
|
||||
GLuint DepthMap() const { return m_DepthMap; }
|
||||
|
||||
glm::mat4 lightSpaceMatrix() const { return m_LightSpaceMatrix; }
|
||||
glm::mat4 lightP() const { return m_LightProjection; }
|
||||
glm::mat4 lightV() const { return m_LightView; }
|
||||
//glm::mat4 lightV() const { return m_LightProjection; } //swapped m_P -> m_V
|
||||
//glm::mat4 lightP() const { return m_LightView; } // swapped m_V -> m_P
|
||||
|
||||
private:
|
||||
|
||||
@@ -46,14 +51,12 @@ private:
|
||||
|
||||
GLuint m_DepthFBO;
|
||||
|
||||
GLfloat m_NearPlane = -40.f;
|
||||
GLfloat m_FarPlane = 80.f;
|
||||
//GLfloat m_Left = -10.f;
|
||||
//GLfloat m_Right = 10.f;
|
||||
//GLfloat m_Bottom = -10.f;
|
||||
//GLfloat m_Top = 10.f;
|
||||
GLfloat m_NearFarPlane[2] = { -40.f, 30.f };
|
||||
GLfloat m_LRBT[4] = { -40.f, 100.f, -50.f, 50.f };
|
||||
|
||||
glm::mat4 m_LightProjection;
|
||||
glm::mat4 m_LightView;
|
||||
glm::mat4 m_LightSpaceMatrix;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user