Masses in Godot are specified in kilograms.
This also fixes the SoftBody3D mass being limited to increments of 1 kg,
now allowing adjustments to the nearest gram.
Fixes#91404
Curves are applied as a multiplier, so ranges [-1, 1] or [0, 1] make much more sense than ranges like [-360, 360] or [0, 100]. The actual range is selected with separate min and max parameters.
Also optimize all tonemappers to perform less calculations per-pixel.
Note: unlike `white`, `agx_white` is limited to a minimum of `2.0` and defaults to `16.29`. When using a RGB10A2 render buffer, `agx_white` will be ignored and a value of `2.0` will be used instead to ensure good behavior on the Mobile renderer.
For resources with `resource_local_to_scene` enabled in the sub-scene,
the resource is already set when the sub-scene is instantiated, so does
not need to be set again. Just needs to update the property of the
resource according to the value in the main scene.
This is a follow-up to #65011.
For scenes with **Editable Children** enabled, the main scene will record
more information and resource mapping will be valid for multiple nodes.
Reverts the default value of Environment.glow_hdr_threshold from 0.0
back to 1.0 to restore the expected glow appearance in existing projects.
The default was inadvertently changed from 1.0 to 0.0 in PR #110077,
which caused glow effects to render dramatically different across all
rendering methods (Forward+, Mobile, and GL Compatibility). This broke
backward compatibility with existing projects like the Kenney 3D
Platformer starter kit.
Changed files:
- scene/resources/environment.h
- servers/rendering/storage/environment_storage.h
- drivers/gles3/effects/glow.h
- drivers/gles3/rasterizer_scene_gles3.cpp
- doc/classes/Environment.xml
Setting the value back to 1.0 aligns with documented recommendations
and restores visual consistency.
Fixes#112469
Mobile devices are typically bandwidth bound which means we need to do as few texture samples as possible.
They typically use TBDR GPUs which means that all rendering takes place on special optimized tiles. As a side effect, reading back memory from tile to VRAM is really slow, especially on Mali devices.
This commit uses a technique where you do a small blur while downsampling, and then another small blur while upsampling to get really high quality glow. While this doesn't reduce the renderpass count very much, it does reduce the texture read bandwidth by almost 10 times. Overall glow was more texture-read bound than memory write, bound, so this was a huge win.
A side effect of this new technique is that we can gather the glow as we upsample instead of gathering the glow in the final tonemap pass. Doing so allows us to significantly reduce the cost of the tonemap pass as well.