Text fixed
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user