Commit Graph

24 Commits (cb1569345a6f17da08241e645ab03cb2e1b78d2f)

Author SHA1 Message Date
clayjohn 8ee3897048 Clean up Volumetric Fog blending behavior
Use proper blending everywhere to be consistent and avoid multiplying by opacity twice.
2025-11-07 11:11:44 +07:00
Colby Klein bdbbed8ea9 Revise fog blending to fix over-darkening/borders.
This can result in low fog densities being a bit brighter, which may need slight adjustment in your scenes.

In exchange, volumetrics now blend smoothly together with the scene and regular fog.

Fixes #101514
2025-10-24 13:15:26 +07:00
Kaleb Reid bac9427325 Fix sky energy in fog sun scatter + colour space discrepancy in compatibility 2025-06-04 13:59:53 +07:00
Dario 5a30a7e7cd Add shader baker to project exporter.
Metal Support contributed by Migeran (https://migeran.com) and Stuart Carnie.

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
Co-authored-by: Gergely Kis <gergely.kis@migeran.com>
2025-05-27 12:45:27 +07:00
clayjohn d2dce41681 Fix float/int comparison in acos_approx in sky template shader
Strict GLSL implementations will not automatically convert `0` to a float
2025-04-27 17:06:34 +07:00
clayjohn 6fede0b951 Optimize SkyMaterials by removing uses of acos and simplifying logic
The results looks almost the same and run much faster.
2025-04-17 22:50:11 +07:00
Alex Threlfo 5f617663aa fix: separate sky luminance and user brightness calculations around fog 2024-12-20 11:25:11 +07:00
clayjohn 02efdb28dc Unify y-flip behavior for sky in RD backends 2024-11-19 16:59:04 +07:00
Thaddeus Crews b37fc1014a
Style: Apply new `clang-format` changes 2024-09-20 08:09:48 +07:00
clayjohn 578049b7b9 Add fixed fog to the sky in the Compatibility renderer
And apply luminance multiplier after fog in RD renderer
2024-08-17 23:33:26 +07:00
Khasehemwy d950f5f838
Use Reverse Z for the depth buffer 2024-04-04 13:54:15 +07:00
Matias N. Goldberg 79c9edab3b Draw sky as a fullscreen triangle 2023-08-05 17:55:43 +07:00
Yuri Sizov bb15241e06 Merge pull request #77740 from ChibiDenDen/simplify_vulkan
Replace sampler arrays with constant sampler elements, simplify and reuse code for all shaders
2023-07-12 17:16:12 +07:00
ChibiDenDen 35715e510f replace sampler arrays with constant sampler elements 2023-06-22 01:11:57 +07:00
Bastiaan Olij 66272ea26e Fix volumetric fog in stereo by projection vertex in combined space 2023-06-20 14:36:14 +07:00
mightygoat 69f634ac78 Fix the grainy sky while using debanding 2023-04-15 10:43:46 +07:00
RandomCatDude c118314fe8 Apply sky fog after luminance multiplier 2023-04-08 12:52:33 +07:00
Bastiaan Olij e886a7af81 Cleanup and improve sky render 2022-12-23 19:45:19 +07:00
clayjohn 8fa76a5272 Move debanding into internal sky shader code so that it is applied after everything else.
This ensures that the debanding does not scale with exposure or any other effect.
2022-09-13 10:39:04 +07:00
Rémi Verschelde d63c6fc463 Merge pull request #60185 from Calinou/environment-fog-and-sky-affect 2022-09-01 23:52:34 +07:00
Hugo Locurcio 699e9f7966
Add Environment properties to control fog rendering on background sky
Values lower than 1.0 can be used to make the fog rendering not fully
obstruct the sky. This can be desired when using fog as a purely
atmospheric effect, without intending to use fog for open world fog
fading.

When set to 0.0, fog rendering behavior will be similar to Godot 3.x
where sky rendering was never affected by fog.
2022-09-01 19:07:39 +07:00
clayjohn 385ee5c70b Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.

In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 +07:00
Hugo Locurcio 4b42379c8f
Rename RenderingServer global shader uniform methods to be more explicit
The `global_shader_uniform` name is longer, but it makes it much
easier to find the methods when searching in the class reference.
2022-07-28 18:46:59 +07:00
Bastiaan Olij bad5c659a4 Move Sky(RD) into environment
Move Fog logic from render scene render to fog
2022-07-26 10:19:40 +07:00