Commit Graph

510 Commits

Author SHA1 Message Date
Thaddeus Crews fa09dd17a6 Merge pull request #116634 from mooflu/gles-reflection-probe-crash-115256
Check render target before dereferencing reflection probe.
2026-05-25 12:52:36 -05:00
Frank Becker 8dd82dc221 Check rt before dereferencing it.
There is no render target for reflection probe.
2026-05-25 10:29:53 -07:00
Wilson E. Alvarez e86de1802b Free LTC RIDs 2026-05-02 21:39:36 -04:00
CookieBadger 7c532acc09 change LTC lookup table texture format to RGBAF and set p_8bit_dst to true in gaussian_blur 2026-04-27 21:35:46 +02:00
Thaddeus Crews 7ce1853014 Merge pull request #108219 from CookieBadger/area-light-integration
Add Rectangular Area Light Source
2026-04-14 07:10:56 -05:00
clayjohn 63c49cc668 Ensure that sky shader automatic mode consistently uses the fallback
This is necessary so that the proper backing textures can be allocated for the sky shader
2026-04-08 10:49:18 -07:00
CookieBadger 7b7bd1dcea Add AreaLight3D 2026-04-04 01:37:10 +02:00
Thaddeus Crews 872cfabf3d Merge pull request #79731 from Calinou/viewport-add-nearest-3d-scaling
Add a nearest-neighbor scaling option to Viewport's Scaling 3D Mode property
2026-04-02 12:33:13 -05:00
Rémi Verschelde 231b5dc0d4 Merge pull request #117142 from blueskythlikesclouds/compatibility-canvas-background-exposure-fix
Fix exposure not working with canvas background on Compatibility.
2026-03-26 16:01:20 +01:00
Hugo Locurcio 5df0c8b271 Add a nearest-neighbor scaling option to Viewport's Scaling 3D Mode property
This is useful for 3D games with a pixel art appearance, or when
using a resolution scale of `0.5` to improve performance without
compromising crispness too much when not using FSR 1.0.

The property hints now allow decreasing the scale further to accomodate
for pixel art use cases, as well as increased precision in the value
(useful for a scale of `0.3333`).

Co-authored-by: Daniel Savage <dansvg@gmail.com>
Co-authored-by: Kaleb Reid <78945904+Kaleb-Reid@users.noreply.github.com>
2026-03-25 00:05:54 +01:00
lawnjelly 6a3c9e5909 SCU - update to accelerate new folders 2026-03-17 08:55:36 +00:00
Skyth 0448fee005 Fix exposure not working with canvas background on Compatibility. 2026-03-09 16:13:57 +03:00
Allen Pestaluky eff40f8c92 Apply tonemapping in post of Compatibility when using canvas background mode. 2026-03-05 13:45:51 -05:00
Thaddeus Crews 4296a0c158 Merge pull request #116752 from BastiaanOlij/cleanup_is_frustum
Clean up `is_frustum` projection code
2026-03-04 14:32:33 -06:00
Rémi Verschelde e3b60a1530 Move RenderingMethod::RenderInfo to RenderingServerTypes
Also move RS::scaling_3d_mode_type to RenderingServerEnums.
2026-02-25 20:17:28 +01:00
Rémi Verschelde f5a290ac46 Move RenderingServer enums to a dedicated RenderingServerEnums (RSE) namespace
A number of headers in the codebase included `rendering_server.h` just for
some enum definitions. This means that any change to `rendering_server.h` or
one of its dependencies would trigger a massive incremental rebuild.

With this change, we decouple a number of classes from `rendering_server.h`,
greatly speeding up incremental rebuilds for that area.

On my machine, this reduces incremental compilation time after an edit of
`rendering_server.h` by 60s (from 2m57s).
2026-02-25 19:43:03 +01:00
Bastiaan Olij 2c49923c39 Cleanup projection code so we don't need our frustum override in the renderer 2026-02-25 21:16:38 +11:00
Thaddeus Crews 582a4f0d5a Merge pull request #115520 from Calinou/codestyle-tweak-opengl-glow-enum-name
Rename glow structs in Compatibility renderer to match code style guidelines
2026-02-23 11:58:56 -06:00
Rémi Verschelde cd650f2336 GLES3: Move some static utils to new RasterizerUtilGLES3
This helps remove dependencies on RasterizerGLES3 in many files, which is
useful as RasterizerGLES3 basically includes everything, so it brings a lot
of transient includes.
2026-02-20 11:29:39 +01:00
Rémi Verschelde 13bb08286e GLES3: Remove unnecessary includes 2026-02-20 11:29:38 +01:00
Rémi Verschelde 715748bab4 GLES3: Tidy up includes for consistency 2026-02-20 11:20:44 +01:00
Josh Jones b8389cc76b Support output to HDR monitors
Co-authored-by: Alvin Wong <alvinhochun@gmail.com>
Co-authored-by: Allen Pestaluky <allenpestaluky@gmail.com>
2026-02-11 22:13:26 -07:00
jon1solution 979d3e58d0 Keeping the top N lights per mesh in the culling phase.
Previously, each mesh was paired up with the first N of each Omni- and Spot-lights.
Now each light is scored based on its distance to the mesh, energy, and range.
The new code uses a heap to track the best N lights (of each type) for predictability.
2026-02-02 08:59:30 -08:00
Hugo Locurcio 10da3ba455 Rename glow structs in Compatibility renderer to match code style guidelines 2026-01-29 01:32:50 +01:00
Bastiaan Olij 3a486ef46c Fix OpenGL motion vector regression 2025-12-21 11:23:49 +11:00
Bastiaan Olij 6c52ba9625 OpenGL: Split the ubos for motion vectors into separate uniforms 2025-12-19 11:51:18 +11:00
Kaleb Reid 05830dfbfb Check if sun scatter is enabled when using SKY_MODE_AUTOMATIC 2025-12-04 22:58:05 -08:00
Allen Pestaluky 628df323e2 Add agx_white, agx_contrast and HDR support to the AgX tonemapper.
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.
2025-12-03 09:01:39 -05:00
Claude 802eb0b1a0 Fix glow visual compatibility regression (issue #112469)
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
2025-11-07 04:07:41 +00:00
Rémi Verschelde 85e47d6fac Merge pull request #109447 from jon1solution/ssao-in-gles3
Implement a very simple SSAO in GLES3.
2025-11-01 19:04:57 +01:00
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
jon1solution 31ee691fbf Implemented a very simple SSAO in GLES3. 2025-10-27 06:02:04 -07:00
Skyth c128886c63 Overhaul screen space reflections. 2025-10-21 19:23:38 +03:00
Clay John 36b92128b1 Merge pull request #110671 from allenwp/environment-glow-consistent
Blend glow before tonemapping and change default to screen.
2025-10-14 21:29:43 -07:00
Allen Pestaluky cafc012b05 Blend Environment glow before tonemapping and change default blend mode to screen.
Additionally, change the minimum `tonemap_white` parameter to `1.0`; users can increase `tonemap_exposure` for a similar effect to decreasing `tonemap_white` below `1.0`.

Co-authored-by: Hei <40064911+Lielay9@users.noreply.github.com>
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2025-10-10 12:08:08 -04:00
Allen Pestaluky bd9d1bf070 Add material debanding for use in Mobile rendering method.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2025-10-08 16:22:41 -04:00
Thaddeus Crews cb164a38f2 Merge pull request #107384 from Kaleb-Reid/compat-directional-cull-mask
Implement DirectionalLight3D cull masks in Compatibility
2025-10-07 11:54:42 -05:00
Thaddeus Crews d1d28c0bcf Merge pull request #111223 from Ivorforce/remove-iterator-include
Replace `std::size` usage with `std_size` to avoid `<iterator>` include.
2025-10-06 09:06:49 -05:00
Thaddeus Crews 12aa435bbb Merge pull request #107740 from Kaleb-Reid/compat-directional-shadow-scatter
Apply sun scatter from lights with shadows in compatibility
2025-10-06 09:06:44 -05:00
Thaddeus Crews 43a9999852 Merge pull request #111260 from devloglogan/compat-motion-vec-fix
Add null check when getting motion vector fbo
2025-10-06 09:06:30 -05:00
Kaleb Reid 79b1a6defc Implement DirectionalLight3D cull masks in Compatibility 2025-10-04 16:08:27 -07:00
Lukas Tenbrink 1db0a60dc0 Replace std::size usage with std_size to avoid <iterator> include. 2025-10-05 00:26:11 +02:00
devloglogan 39c449fc60 Add null check when getting motion vector fbo 2025-10-04 13:18:59 -05:00
Kaleb Reid e1f19d14dd Always use RenderSceneBuffers to manage backbuffer in Compatibility 3D 2025-10-04 01:06:09 -07:00
Kaleb Reid c20ab940aa Apply sun scatter from lights with shadows in compatibility 2025-10-04 00:35:31 -07:00
Thaddeus Crews d9ba9ba3da Merge pull request #97151 from devloglogan/motion-vectors
Implement motion vectors in compatibility renderer
2025-10-03 12:01:10 -05:00
Aaron Franke 3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
devloglogan 8fef9a689e Implement motion vectors in compatibility renderer 2025-09-30 09:42:17 -05:00
Lukas Tenbrink bc7c05bfbd Use an array instead of TightLocalVector in RasterizerSceneGLES3::_render_uv2, to avoid allocation. 2025-09-22 16:16:28 +02:00
João Pedro Xavier d6aca93c1a Fix bug where material with double-sided shadows ignores backface culling on compatibility renderer 2025-08-19 20:21:10 -07:00