1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
clayjohn
2e59cb41f4 Optimize glow and tonemap gather step in the mobile renderer
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.
2025-10-30 21:56:26 -07:00
clayjohn
4b84207d2f Use vertex shader workaround for Mali GXX GPUs for glow shader
We applied this same workaround to the tonemap shader and DoF, but didn't apply it to glow since the bug didn't manifest on our test devices.
2025-08-26 11:31:22 -07:00
Matias N. Goldberg
6e7d87fb25 Use fullscreen tri instead of quad 2023-08-05 17:09:06 -03:00
clayjohn
8e41221404 Use raster versions of copy effects for 2D operations when using the mobile renderer
This PR implements a few basic copy operations in raster that weren't available before
2022-11-10 12:47:26 -08: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
Bastiaan Olij
9939cfc4c4 Split out bokeh_dof and copy effects 2022-05-11 11:08:56 +10:00