mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 03:46:50 +01:00
Ported: Disable alpha in post process when using opaque framebuffer - clayjohn
9927515254
This commit is contained in:
parent
942c23af34
commit
42b0cd29ab
@ -3106,6 +3106,7 @@ void RasterizerSceneGLES2::_post_process(Environment *env, const CameraMatrix &p
|
||||
}
|
||||
}
|
||||
|
||||
state.tonemap_shader.set_conditional(TonemapShaderGLES2::DISABLE_ALPHA, !storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]);
|
||||
state.tonemap_shader.bind();
|
||||
if (env) {
|
||||
if (max_glow_level >= 0) {
|
||||
@ -3144,6 +3145,7 @@ void RasterizerSceneGLES2::_post_process(Environment *env, const CameraMatrix &p
|
||||
state.tonemap_shader.set_conditional(TonemapShaderGLES2::USE_MULTI_TEXTURE_GLOW, false);
|
||||
state.tonemap_shader.set_conditional(TonemapShaderGLES2::USE_BCS, false);
|
||||
state.tonemap_shader.set_conditional(TonemapShaderGLES2::USE_COLOR_CORRECTION, false);
|
||||
state.tonemap_shader.set_conditional(TonemapShaderGLES2::DISABLE_ALPHA, false);
|
||||
}
|
||||
|
||||
void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, const int p_eye, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID *p_light_cull_result, int p_light_cull_count, RID *p_reflection_probe_cull_result, int p_reflection_probe_cull_count, RID p_environment, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass) {
|
||||
|
@ -358,4 +358,8 @@ void main() {
|
||||
#endif
|
||||
|
||||
gl_FragColor = color;
|
||||
|
||||
#ifdef DISABLE_ALPHA
|
||||
gl_FragColor.a = 1.0;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user