Text fixed

This commit is contained in:
viktorljung
2016-01-23 18:17:20 +01:00
parent 160b7183b2
commit ef020a3770
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ public:
GLuint BloomTexture() const { return m_BloomTexture; } GLuint BloomTexture() const { return m_BloomTexture; }
//Return the texture with diffuse and lighting of the scene. //Return the texture with diffuse and lighting of the scene.
GLuint SceneTexture() const { return m_SceneTexture; } GLuint SceneTexture() const { return m_SceneTexture; }
FrameBuffer FinalPassFrameBuffer() { return m_FinalPassFrameBuffer; } FrameBuffer* FinalPassFrameBuffer() { return &m_FinalPassFrameBuffer; }
private: private:
+1 -1
View File
@@ -13,5 +13,5 @@ void main()
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, TexCoords).r); vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, TexCoords).r);
vec4 color_result = textColor * sampled; vec4 color_result = textColor * sampled;
sceneColor = vec4(color_result.xyz, clamp(color_result.a, 0, 1)); sceneColor = vec4(color_result.xyz, clamp(color_result.a, 0, 1));
bloomColor = vec4(clamp(color_result.xyz - 1.0, 0, 100), 1.0); bloomColor = vec4(clamp(color_result.xyz - 1.0, 0, 100), 1.0) * sampled;
} }
+1 -1
View File
@@ -101,7 +101,7 @@ void Renderer::Draw(RenderFrame& frame)
GLERROR("Renderer::Draw m_DrawScenePass->Draw"); GLERROR("Renderer::Draw m_DrawScenePass->Draw");
m_TextPass->Draw(*scene, m_DrawFinalPass->FinalPassFrameBuffer()); m_TextPass->Draw(*scene, *m_DrawFinalPass->FinalPassFrameBuffer());
} }
m_DrawBloomPass->Draw(m_DrawFinalPass->BloomTexture()); m_DrawBloomPass->Draw(m_DrawFinalPass->BloomTexture());