Pull request fixes
This commit is contained in:
@@ -22,9 +22,6 @@ public:
|
|||||||
void ClearBuffer();
|
void ClearBuffer();
|
||||||
void OnWindowResize();
|
void OnWindowResize();
|
||||||
|
|
||||||
//Return the texture that is used in later stages to apply the bloom effect
|
|
||||||
GLuint DepthBuffer() const { return m_DepthBuffer; }
|
|
||||||
Camera* DepthBufferCamera() const { return RenderCamera; }
|
|
||||||
//Return the texture that is used in later stages to apply the bloom effect
|
//Return the texture that is used in later stages to apply the bloom effect
|
||||||
GLuint BloomTexture() const { return m_BloomTexture; }
|
GLuint BloomTexture() const { return m_BloomTexture; }
|
||||||
GLuint BloomTextureLowRes() const { return m_BloomTextureLowRes; }
|
GLuint BloomTextureLowRes() const { return m_BloomTextureLowRes; }
|
||||||
@@ -65,7 +62,6 @@ private:
|
|||||||
GLuint m_SceneTextureLowRes;
|
GLuint m_SceneTextureLowRes;
|
||||||
GLuint m_DepthBuffer;
|
GLuint m_DepthBuffer;
|
||||||
GLuint m_DepthBufferLowRes;
|
GLuint m_DepthBufferLowRes;
|
||||||
Camera* RenderCamera;
|
|
||||||
|
|
||||||
//maqke this component based i guess?
|
//maqke this component based i guess?
|
||||||
GLuint m_ShieldPixelRate = 16;
|
GLuint m_ShieldPixelRate = 16;
|
||||||
|
|||||||
@@ -177,7 +177,6 @@ void DrawFinalPass::InitializeShaderPrograms()
|
|||||||
void DrawFinalPass::Draw(RenderScene& scene, GLuint SSAOTexture)
|
void DrawFinalPass::Draw(RenderScene& scene, GLuint SSAOTexture)
|
||||||
{
|
{
|
||||||
GLERROR("Pre");
|
GLERROR("Pre");
|
||||||
RenderCamera = scene.Camera;
|
|
||||||
DrawFinalPassState* state = new DrawFinalPassState(m_FinalPassFrameBuffer.GetHandle());
|
DrawFinalPassState* state = new DrawFinalPassState(m_FinalPassFrameBuffer.GetHandle());
|
||||||
if (scene.ClearDepth) {
|
if (scene.ClearDepth) {
|
||||||
//glClear(GL_DEPTH_BUFFER_BIT);
|
//glClear(GL_DEPTH_BUFFER_BIT);
|
||||||
@@ -768,26 +767,17 @@ void DrawFinalPass::BindExplosionUniforms(GLuint shaderHandle, std::shared_ptr<E
|
|||||||
|
|
||||||
void DrawFinalPass::BindModelUniforms(GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene)
|
void DrawFinalPass::BindModelUniforms(GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene)
|
||||||
{
|
{
|
||||||
if (1/*job->Model->IsSkinned()*/) {
|
GLERROR("Bind 1 uniform");
|
||||||
GLERROR("Bind 1 uniform");
|
GLint Location_M = glGetUniformLocation(shaderHandle, "M");
|
||||||
GLint Location_M = glGetUniformLocation(shaderHandle, "M");
|
glUniformMatrix4fv(Location_M, 1, GL_FALSE, glm::value_ptr(job->Matrix));
|
||||||
glUniformMatrix4fv(Location_M, 1, GL_FALSE, glm::value_ptr(job->Matrix));
|
GLERROR("Bind 2 uniform");
|
||||||
GLERROR("Bind 2 uniform");
|
GLint Location_V = glGetUniformLocation(shaderHandle, "V");
|
||||||
GLint Location_V = glGetUniformLocation(shaderHandle, "V");
|
glUniformMatrix4fv(Location_V, 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
|
||||||
glUniformMatrix4fv(Location_V, 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
|
GLERROR("Bind 3 uniform");
|
||||||
GLERROR("Bind 3 uniform");
|
GLint Location_P = glGetUniformLocation(shaderHandle, "P");
|
||||||
GLint Location_P = glGetUniformLocation(shaderHandle, "P");
|
glUniformMatrix4fv(Location_P, 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
|
||||||
glUniformMatrix4fv(Location_P, 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
|
GLERROR("Bind 4 uniform");
|
||||||
GLERROR("Bind 4 uniform");
|
|
||||||
} else {
|
|
||||||
GLERROR("Bind 1 uniform");
|
|
||||||
GLint Location_M = glGetUniformLocation(shaderHandle, "M");
|
|
||||||
glUniformMatrix4fv(Location_M, 1, GL_FALSE, glm::value_ptr(job->Matrix));
|
|
||||||
GLERROR("Bind 2 uniform");
|
|
||||||
GLint Location_V = glGetUniformLocation(shaderHandle, "PV");
|
|
||||||
glUniformMatrix4fv(Location_V, 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix()));
|
|
||||||
GLERROR("Bind 3 uniform");
|
|
||||||
}
|
|
||||||
GLint Location_ScreenDimensions = glGetUniformLocation(shaderHandle, "ScreenDimensions");
|
GLint Location_ScreenDimensions = glGetUniformLocation(shaderHandle, "ScreenDimensions");
|
||||||
glUniform2f(Location_ScreenDimensions, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
|
glUniform2f(Location_ScreenDimensions, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
|
||||||
GLERROR("Bind 5 uniform");
|
GLERROR("Bind 5 uniform");
|
||||||
|
|||||||
Reference in New Issue
Block a user