Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL: Environment glow not implemented yet #66455

Closed
Tracked by #66458
Calinou opened this issue Sep 26, 2022 · 14 comments · Fixed by #87360
Closed
Tracked by #66458

OpenGL: Environment glow not implemented yet #66455

Calinou opened this issue Sep 26, 2022 · 14 comments · Fixed by #87360

Comments

@Calinou
Copy link
Member

Calinou commented Sep 26, 2022

Related to #66457.

Godot version

4.0.beta (53d2a9a)

System information

Fedora 36, GeForce GTX 1080 (NVIDIA 515.65.01)

Issue description

Glow has no effect on the displayed scene when enabled in OpenGL, regardless of the value of Bloom or HDR Threshold.

Both glow and adjustments are enabled on the example below.

OpenGL

2022-09-26_19 51 05

Vulkan

2022-09-26_19 51 30

Steps to reproduce

  • Switch to the OpenGL driver in the Project Settings.
    • Make sure to start the editor with single-window mode enabled afterwards. This can be done by enabling Single Window Mode in the Editor Settings before changing the driver, or by opening the project in the editor directly with the --single-window command line argument.
  • Add a WorldEnvironment node, a Camera3D node and a MeshInstance3D in front of the camera.
  • Enable glow and adjustments. Change brightness/contrast/saturation to make a visible difference in the scene.

Minimal reproduction project

test_opengl_glow_adjustments_editor.zip

@Calinou Calinou added this to the 4.0 milestone Sep 26, 2022
@Calinou Calinou changed the title OpenGL: Environment glow and adjustments have no effect in the editor, but are visible in the running project OpenGL: Environment glow and adjustments not implemented yet Sep 26, 2022
@Calinou Calinou changed the title OpenGL: Environment glow and adjustments not implemented yet OpenGL: Environment glow not implemented yet Sep 26, 2022
@clayjohn clayjohn modified the milestones: 4.0, 4.x Dec 13, 2022
@naturally-intelligent
Copy link

Any word on the status of this issue?

It's the one missing piece for my 2D project. My machine just isn't fast enough to use Forward+ mode, it's painful.

(And even in that mode glow doesn't seem to have an effect). Was thinking of digging into this to see if I could help

@Calinou
Copy link
Member Author

Calinou commented Feb 27, 2023

Any word on the status of this issue?

We don't know for sure yet if this will be addressed in the Compatibility renderer, given its low-end focus. Either way, this can only be done for a future 4.x release, not 4.0.

There is no tonemapping/post-processing pass being run yet, as the mere act of running this pass is expensive on low-end devices (even if you do nothing within that pass).

(And even in that mode glow doesn't seem to have an effect).

See #62110. The Compatibility renderer is also SDR-only in 2D, so you will have to use a similar workaround if glow is ever implemented in that renderer.

@naturally-intelligent
Copy link

Seems like a shocking decision as I don't see how any developer would want to use a 2D game engine that can't do Glow. And Forward+ is far too slow for a 2D game, even without glow. I know this is a low-quality comment, but it really worries me that this isn't a priority

There must be a screen shader alternative? If so we should be noting that solution or link to it here

@akien-mga
Copy link
Member

akien-mga commented Feb 27, 2023

You can use 3.x if 4.0 isn't suitable for your needs.

Seems like a shocking decision as I don't see how any developer would want to use a 2D game engine that can't do Glow.

That's completely wrong, most 2D games don't need glow. Only very specific graphics style do. And those can use the Forward+ renderer, stay on 3.x, or wait for the 4.x release that will implement glow for the low end renderer.

Complaining here won't make it happen faster. For the record, the OpenGL renderer was planned to be first released in 4.1. You can consider that it's not available yet and that will match the original plan.

@naturally-intelligent
Copy link

naturally-intelligent commented Mar 2, 2023

When running 4.0-stable this message appears in console, and as a popup in editor (in rc6 too):

WARNING: Glow is not supported when using the GL Compatibility backend yet. Support will be added in a future release.

It is also mentioned in the GDQuest Godot 4 reveal video: https://youtu.be/chXAjMQrcZk?t=130

@naturally-intelligent
Copy link

Poking around at 3.5 branch to find the code to bring over:

https://github.com/godotengine/godot/blob/3.5/drivers/gles3/rasterizer_scene_gles3.cpp

EffectBlurShaderGLES3 effect_blur_shader;

https://github.com/godotengine/godot/blob/3.5/drivers/gles3/shaders/effect_blur.glsl

@NeonBurst

This comment was marked as off-topic.

@naturally-intelligent
Copy link

Related article:

https://godotengine.org/article/rendering-priorities-4-1/

Related discussion thread:

https://www.reddit.com/r/godot/comments/12r2en6/godot_41_rendering_priorities_update_the_first_of/

"Hopefully we will have a solution for people who want to use the post process glow in 2D in time for 4.2 or 4.3."

Hard to find a clear answer, but seems like this is marked for 4.2 or 4.3, each of which has ~4 months release schedule, so possibly see this feature in 8-12 months?

@clayjohn
Copy link
Member

@naturally-intelligent Note, that the reddit discussion thread is about using the existing glow in 2D, not about supporting 3D glow in the OpenGL backend.

This PR is planned to be implemented by the end of June. I.e. in time for 4.1 as the rendering priorities article says.

Also, to be fair, it would be done a lot sooner if someone is willing to work on it. But if no one volunteers, then I will do it as soon as I can, which could mean it will be done in a couple of months

@naturally-intelligent
Copy link

@clayjohn I thought this feature would cover both 3D and 2D glow in OpenGL?

I'm very interested in 2D glow for sure! Also made a proposal here:
godotengine/godot-proposals#6725

As for helping I identified primary 3.X glow code in an above comment, but I don't know what the equivalent code pathway is to get this into 4.0. Also it seems there are other features required first, as mentioned above, and particular specifications in how devs want the glow to be achieved that I don't quite grasp.

@naturally-intelligent
Copy link

Have a partially-working solution using Godot nodes:

https://github.com/naturally-intelligent/godot-4-glow-2d

Need help figuring out a way to clip glow behind other sprites.

@Joopster
Copy link

Joopster commented Feb 8, 2024

Any solution for this yet? Would really like to use this in my 2d opengl project.

@Calinou
Copy link
Member Author

Calinou commented Feb 8, 2024

Any solution for this yet? Would really like to use this in my 2d opengl project.

Glow is being implemented in #87360, although we can't guarantee it'll be merged for 4.3.

@theromis
Copy link
Contributor

theromis commented Mar 8, 2024

on MacOS current dev build with attached project getting weird artifact, is it expected?
Environment set to Canvas, Custom Color works fine
Screenshot 2024-03-07 at 17 50 43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants