Commit Graph

2032 Commits

Author SHA1 Message Date
Thaddeus Crews e42575d23f Merge pull request #113956 from allenwp/colour/remove-LinearToSRGB-clamping
Remove clamping from LinearToSRGB visual shader node.
2026-02-27 08:49:33 -06:00
Allen Pestaluky dce001aee7 Remove clamping from LinearToSRGB visual shader node. 2026-02-26 11:49:26 -05: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 671864fb05 Decouple TextureStorage from RenderingServer
By moving RS::TextureDetect(Roughness)Callback and RS::TextureInfo
to RenderingServerTypes.
2026-02-25 20:17:28 +01:00
Rémi Verschelde cb9b4cff90 Decouple MeshStorage from RenderingServer
By moving RS::SurfaceData and RS::MeshInfo to RenderingServerTypes.

This notably allows removing RS dependency from `mesh.h`.
2026-02-25 20:17:28 +01:00
Rémi Verschelde a85df7cc73 Minimize includes in renderer_compositor.h 2026-02-25 20:17:27 +01:00
Rémi Verschelde 0ce92073ae Move RS::ShaderNativeSourceCode to RenderingServerTypes to reduce dependencies on RS
On my machine, this reduces incremental compilation time after an edit of
`rendering_server.h` by 1s, and paves the way for more decoupling in
rendering code.
2026-02-25 20:17:27 +01:00
Rémi Verschelde 25bfae8ff9 Remove RenderingServer::map_scaling_option_to_stretch_mode and cleanup boot splash code
Removes RS as a dependency in `project_settings.cpp` (which was a bug,
`core` shouldn't include `servers`). This doesn't have a big impact on
incremental rebuild time by itself.

Also move helper `get_splash_stretched_screen_rect` to RenderingServerTypes.
2026-02-25 20:17:27 +01:00
Rémi Verschelde a3cb56dd38 Decouple RenderingServer from XR/OpenXR headers
Move BlitToScreen to RenderingServerTypes.
2026-02-25 20:17:23 +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
Thaddeus Crews 637ae4c514 Merge pull request #114336 from LunaCapra/bent-normals-compatibility
Add bent normal map support for the compatibility renderer
2026-02-25 11:25:10 -06:00
Pāvels Nadtočajevs d09f6d879a Fix UTF-8 handling in GLES3 shaders. 2026-02-25 15:08:53 +02: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
Lukas Tenbrink 0ea5ece984 Move binary math functions to Math namespace in math_funcs_binary header. 2026-02-17 12:24:35 +01:00
Thaddeus Crews 2d5b30c476 Merge pull request #115963 from blueskythlikesclouds/reduce-includes-to-rd
Reduce includes to rendering device.
2026-02-12 08:19:16 -06: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
Skyth 8fbf2f1e14 Reduce includes to rendering device.
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2026-02-10 16:58:50 +03:00
Thaddeus Crews 0a843c13f8 Merge pull request #111464 from LiveTrower/clearcoat-improvements
Clearcoat improvements and fixes
2026-02-03 08:14:00 -06: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
Rémi Verschelde 429750f60b Merge pull request #115093 from Ivorforce/hashmap-explicit-copy
Change copy constructors of `HashMap` and `AHashMap` from implicit to explicit
2026-01-31 22:50:51 +01:00
Thaddeus Crews fbbb8a921b Merge pull request #115309 from Ivorforce/localvector-explicit-copy
Change copy constructor of `LocalVector` from implicit to explicit
2026-01-30 09:32:07 -06:00
Colin O'Rourke 63f6e3691c DrawableTextures
Implementing DrawableTextures based on: https://github.com/godotengine/godot-proposals/issues/7379
2026-01-29 01:16:06 -08:00
Hugo Locurcio 10da3ba455 Rename glow structs in Compatibility renderer to match code style guidelines 2026-01-29 01:32:50 +01:00
LiveTrower 60097eb3ce clearcoat fixes and improvements 2026-01-27 18:02:01 -06:00
Lukas Tenbrink c56c297cee Remove geometry_3d include from rendering_server.h, to reduce compile time.
Change `Geometry3D` from class to namespace.
2026-01-27 18:12:38 +01:00
Thaddeus Crews 4738ce72e3 Merge pull request #115026 from rothej/fix-94567-fog-shader-compilation-with-fog-disabled
Fix shader compilation error when writing to `FOG` when `render_mode fog_disabled`
2026-01-26 13:14:27 -06:00
Thaddeus Crews cfc5ec93d4 Merge pull request #114767 from unixfan2/fix/114606-compat-wrong-texunit
Fix sky radiance texunit in compatibility renderer
2026-01-26 13:14:26 -06:00
Lukas Tenbrink 63272b23ef Make LocalVector copy constructor explicit. 2026-01-23 20:52:03 +01:00
Lukas Tenbrink 1825e89787 Change copy constructors of HashMap and AHashMap from implicit to explicit. 2026-01-21 13:01:23 +01:00
Bastiaan Olij aac883849e Apply fixed size properly for mono/stereo rendering. 2026-01-20 23:19:45 +11:00
Joshua Rothe 7a2f188382 Fixing shader compilation error when writing to FOG when render_mode fog_disabled.
Always declares FOG variable regardless of fog state. Previously, only declared
fog if FOG_DISABLED was undefined. This caused errors if the code tried to
write to fog later. Exists as a dummy variable when unused.

Signed-off-by: Joshua Rothe <joshrothe@gmail.com>
2026-01-16 02:12:52 -07:00
Peter Friedrich 6f2eaf0f8e Fix sky radiance texunit in compatibility renderer (fixes #114606) 2026-01-08 23:32:15 +01:00
Capry b5cb821636 Add bent normal map support for the compatibility renderer 2025-12-26 19:33:40 +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
Dario c78c3ba894 Rewrite Radiance and Reflection probes to use Octahedral maps.
Co-authored-by: clayjohn <claynjohn@gmail.com>
2025-12-02 17:48:12 -08:00
Rémi Verschelde 5f12ada7a4 Merge pull request #113432 from TheDying0fLight/set-shader-path-before-compiling
Set shader path before compilation
2025-12-02 14:17:38 +01:00
Simon Döhl 772caa8170 set shader path before compilation 2025-12-02 09:04:19 +01:00
Hugo Locurcio 2cf7af9149 Make all unsupported renderer message features consistently warnings
Previously, some messages indicating a lack of support were errors
instead of warnings. Some messages were also not shown when running
a release export template.

- Use "renderer" terminology consistently instead of "rendering method".
2025-12-01 17:38:12 +01:00
xuhuisheng 047e0e0606 Fix gles3 buffer_free_data error 2025-11-28 16:16:31 +08:00
kobewi a1340f05a9 Allow editing editor settings from project manager 2025-11-12 16:34:43 +01: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
Thaddeus Crews 3c1e479290 Merge pull request #110077 from clayjohn/mobile-glow
Overhaul and optimize Glow in the mobile renderer
2025-10-31 09:23:32 -05: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