Compare commits

...

3 Commits

Author SHA1 Message Date
Tleety 4ffb03fdd5 Merge remote-tracking branch 'origin/master' into SmallFixes-Tobias
# Conflicts:
#	src/Engine/Rendering/DrawFinalPass.cpp
2016-02-23 10:02:53 +01:00
Tleety 97fcdb342d Bloom should now show behind transparent objects. 2016-02-19 14:23:40 +01:00
Tleety 949ee76f55 Fallow and name fix 2016-02-19 13:52:16 +01:00
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ struct LightResult {
};
float CalcAttenuation(float radius, float dist, float falloff) {
return 1.0 - smoothstep(radius * 0.3, radius, dist);
return 1.0 - smoothstep(radius * falloff, radius, dist);
}
vec4 CalcSpecular(vec4 lightColor, vec4 viewVec, vec4 lightVec, vec4 normal) {
@@ -174,7 +174,7 @@ void main()
sceneColor = vec4(color_result.xyz, clamp(color_result.a, 0, 1));
color_result += glowTexel*GlowIntensity;
bloomColor = vec4(clamp(color_result.xyz - 1.0, 0, 100), 1.0);
bloomColor = vec4(clamp(color_result.xyz - 1.0, 0, 100), clamp(color_result.a, 0, 1));
//Tiled Debug Code
/*
+2
View File
@@ -192,8 +192,10 @@ void DrawFinalPass::Draw(RenderScene& scene, GLuint SSAOTexture)
state->StencilMask(0x00);
DrawModelRenderQueues(scene.Jobs.OpaqueObjects, scene, SSAOTexture);
GLERROR("OpaqueObjects");
state->BlendFunc(GL_ONE, GL_ONE);
DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene, SSAOTexture);
GLERROR("TransparentObjects");
state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
DrawSprites(scene.Jobs.SpriteJob, scene);
GLERROR("SpriteJobs");