-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
[4.0] Add support for glow maps #54574
Conversation
Shouldn't it default to |
As discussed with @clayjohn on rocketchat I removed the
The effect already turns itself of if no glow map is provided, but I can also change the default value. I think I will set it to 0.8 instead of 1, that is what I have been using during testing so far. |
Huh, must have lost the docs during the rebase. Should be fixed now. |
I tested this feature locally, it's working pretty well overall: Testing project: test_glow_map.zip Two things I noticed:
Edit: Colored glow maps work too! |
Fixed the doc typo, mix mode (that was a stupid oversight, no clue how I missed that) and added braces to the if statements.
In theory I could add another variable to the Params uniform to adjust the UV based on the texture-vs-screen ratio. However, I am not sure if that is an ideal solution. There is other stuff that will change on monitors with unusual resolution and aspect ratios as well, so it might be better if developers write their own logic to swap out the glow map depending on the resolution. |
Updated the PR with the suggested documentation changes. And yeah, colored glow maps is something I really want to explore myself in the future. I suspect that using three different voronoi id (not distance) noise textures in the rgb channels of a glow map would make for a really trippy effect. Maybe even make those textures tiling and somehow animate them? |
Thanks! |
This PR is a minor enhancement for the glow post processing effect and allows users to provide a glow map (e.g. lens dust).
The influence of this glow map can be controlled with the glow_map_strength float variable, which defaults to 0 (=glow map turned off).
Here is an example screenshot I took while using a low res lens-dust jpg I found on google as the glow map:
Disclaimer: I originally wrote this for one of my projects, before deciding to turn it into a PR. I did my best to clean things up as much as I could, but in the processes ended up nearly doubling the number of tone mapping pipelines. Would greatly appreciate some feedback on that part in particular from someone with more rendering experience.Nevermind, after discussing it on rocketchat that change was reverted. The new
#ifdef
blocks were removed and the glow map was moved to binding 1 of set 2.