diff --git a/libs/gfx/source/renderer/deferred.cpp b/libs/gfx/source/renderer/deferred.cpp index 3036a563..e7d0463d 100644 --- a/libs/gfx/source/renderer/deferred.cpp +++ b/libs/gfx/source/renderer/deferred.cpp @@ -205,7 +205,7 @@ void main() } out0 = position; - out1 = vec4(albedo.rgb / u_max_intensity, (u_flag_mask & O_LIT) != 0u ? 1.f : 0.f); + out1 = vec4(albedo.rgb / u_max_intensity, (u_flag_mask & O_LIT) != 0u ? 1.f : 0.5f); out2 = pack_normal(normalize(n)); out3 = u_material; } @@ -378,7 +378,9 @@ void main() vec3 color; - if (albedo.a < 0.5) + if (albedo.a < 0.25) + discard; + else if (albedo.a < 0.75) color = albedo.rgb; else if (u_use_ssao == 1) color = albedo.rgb * u_ambient * texture(u_ssao_texture, texcoord).r; @@ -1300,6 +1302,7 @@ void main() buffer_1_clear[0] = (*opts.clear_color)[0] / opts.max_intensity; buffer_1_clear[1] = (*opts.clear_color)[1] / opts.max_intensity; buffer_1_clear[2] = (*opts.clear_color)[2] / opts.max_intensity; + buffer_1_clear[3] = 0.5f; } gl::ClearBufferfv(gl::COLOR, 1, buffer_1_clear);