1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

1985 Commits

Author SHA1 Message Date
Lukas Tenbrink
963c20565b Remove OAHashMap, in favour of AHashMap.
The two types had (mostly) the same decisions, but `AHashMap` is a faster implementation, and is more consistent with `HashMap`.
2025-05-31 15:50:10 +02:00
clayjohn
8b2dda868b Correctly place viewport and use viewport relative rect for the final blit in Compatibility renderer 2025-05-28 22:11:20 -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 -03:00
Lukas Tenbrink
4cb8a0c77e Add resize_initialized and resize_uninitialized to Vector. These functions serve as replacements for resize, to make sure the caller understands whether elements need to be initialized 'by hand' after the call. 2025-05-26 18:35:41 +02:00
clayjohn
eb4f3a82a3 Ignore destination alpha when blitting to window in compatibility renderer 2025-05-22 22:21:32 -04:00
Thaddeus Crews
452dc667fb Merge pull request #106592 from beicause/shader-fix-editor-mat-default
Shader: Fix the default behavior when mat uniforms are null
2025-05-22 12:15:08 -05:00
Thaddeus Crews
8085fd3102 Merge pull request #93142 from clayjohn/z_clip_scale
Add new shader built ins: `Z_CLIP_SCALE` and `PERSPECTIVE_SCALE`
2025-05-22 12:15:06 -05:00
Thaddeus Crews
dd5c5ed631 Merge pull request #106267 from clayjohn/android-msaa-bug
Use a fragment shader copy instead of a blit copy in the final blit to screen in the Compatibility backend
2025-05-22 12:14:57 -05:00
clayjohn
9a1def8da1 Add new StandardMaterial properties to allow users to control FPS-style objects (hands, weapons, tools close to the camera)
Add new shader built in Z_CLIP_SCALE to easily adjust clipping distance to avoid clipping walls etc.

Add fov_override to StandardMaterial3D to easily have a custom FOV for FPS objects

Add IN_SHADOW_PASS built-in to shaders for tweaking materials without impacting shadow maps
2025-05-21 10:16:05 -03:00
LuoZhihao
4621d3e1f4 Shader: Fix the default behavior when mat uniforms are null 2025-05-21 13:28:39 +08:00
clayjohn
a0e3ade99f Use a fragment shader copy instead of a blit copy in the final blit to screen in the Compatibility renderer to avoid black screen when "Force MSAA 4x is used" on Android devices 2025-05-20 16:34:43 -07:00
Thaddeus Crews
2d42b889d1 Merge pull request #104124 from Ivorforce/alloc-static-calloc
Add `Memory::alloc_static_zeroed` to allocate memory that's filled with zeroes.
2025-05-19 08:01:33 -05:00
Thaddeus Crews
e625565853 Merge pull request #106396 from chocola-mint/canvas-item-add-triangle-array-count
Implement the `count` parameter in `RenderingServer.canvas_item_add_triangle_array`
2025-05-15 10:22:16 -05:00
Thaddeus Crews
fb39aa4fd3 Merge pull request #105833 from marcosc90/perf-web-shader-source
[Web] Optimize `GL.getSource` for known-length shader sources
2025-05-14 09:44:08 -05:00
chocola-mint
101dc9868f Implement the count parameter in RenderingServer.canvas_item_add_triangle_array() 2025-05-14 22:52:30 +09:00
Lukas Tenbrink
3207066e19 Add Memory::alloc_static_zeroed to allocate memory that's filled with zeroes.
This is generally faster than `malloc` followed by `memset` / loop-set to 0.
2025-05-13 01:57:05 +02:00
Capry
9828c365c3 Add support for bent normals for indirect lighting and specular occlusion 2025-05-12 12:52:04 +02:00
Thaddeus Crews
19bb18716e Merge pull request #102399 from clayjohn/cull-mask-overhaul
Overhaul the cull mask internals for Lights, Decals, and Particle Colliders
2025-05-09 11:29:28 -05:00
Thaddeus Crews
821170f054 Merge pull request #106145 from lander-vr/ambient-light-specular-occlusion
Add specular occlusion from ambient light
2025-05-09 11:29:14 -05:00
clayjohn
305216f558 Overhaul the cull mask internals for Lights, Decals, and Particle Colliders
Properly pair and unpair instances based on cull mask to avoid any unnecessary processing and to ensure that changing the cull_mask and layer_mask actually updates culling behavior
2025-05-08 21:39:12 -07:00
landervr
56730d0cb2 Add specular occlusion from ambient light
Co-authored-by: guerro323 <kaltobattle@gmail.com>
2025-05-08 23:52:01 +02:00
BlueCube3310
909f9ca9d4 Compatibility: Disable environment ambient light when affected by light probes 2025-05-07 18:08:54 +02:00
Stuart Carnie
7a423ffdc0 GLES3: Fix errors baking light map with compatibility renderer
Helps #102696
2025-05-06 09:02:34 +10:00
Thaddeus Crews
7cb658cd9d Merge pull request #106086 from clayjohn/ANGLE-BPTC
Check for GL ES version of BPTC extension when using the OpenGL renderer
2025-05-05 11:24:18 -05:00
clayjohn
e7010c2c01 Check for all BPTC Extensions when using the OpenGL renderer.
EXT_texture_compression_bptc is the WebGL version of GL_EXT_texture_compression_bptc which is the same thing as GL_ARB_texture_compression_bptc but some vendors only report one or the other. ANGLE only reports GL_EXT_texture_compression_bptc for example
2025-05-05 08:23:47 -07:00
Thaddeus Crews
f4f1471b57 Merge pull request #105910 from lawnjelly/global_get_fast4
Add `GLOBAL_GET` cached macros.
2025-04-30 09:18:44 -05:00
lawnjelly
f8f350a32a Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
dsmtE
4e68f277c6 add REGION_RECT
fix formatting

fix shader compile (region_rect after draw_data)

fix formatting

fix formatting

Review fix (move region_rect in main + remove useless visual shader options)

fix formatting

fix alphabetic order (+ remove useless action for spatial shaders)

typo + remove TYPE_LIGHT option for  region_rect
2025-04-30 11:07:22 +02:00
Thaddeus Crews
dedc072840 Merge pull request #105837 from clayjohn/sky-acos-bugfix
Fix float/int comparison in acos_approx in sky template shader
2025-04-28 10:01:34 -05:00
Thaddeus Crews
3947cbe3b2 Merge pull request #104386 from Repiteo/core/cpp-math
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05: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
Marcos Casagrande
197b307061 [Web] Optimize GL.getSource for known-length shader sources 2025-04-27 17:44:08 +02:00
Ryan
4497e2a0d3 Add Meshes to the Video RAM Profiler
Apply suggestions from code review

Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
2025-04-23 18:26:56 -04:00
Thaddeus Crews
1f7a8eac9d Merge pull request #101973 from clayjohn/sky-material-opt
Optimize ProceduralSkyMaterial by removing uses of acos and simplifying logic
2025-04-22 18:25:51 -05:00
Thaddeus Crews
2ffd5a3913 Merge pull request #104738 from YYF233333/cleanup_rid_owner
Use `LocalVector` in `RID_Owner::get_owned_list`
2025-04-22 10:44:25 -05:00
Thaddeus Crews
2a96e895e6 Merge pull request #105525 from BlueCube3310/light-probe-sh-impr
Scene shader: Improve and document SH diffuse evaluation for light probes
2025-04-21 08:24:20 -05:00
Yyf2333
1a70a06a43 Change RID_Owner::get_owned_list. 2025-04-21 01:04:27 +08:00
BlueCube3310
5640ddd0a5 Scene shader: Improve and document SH evaluation for light probes 2025-04-19 15:08:02 +02: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
Thaddeus Crews
ad40939b6f Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05:00
Thaddeus Crews
6a9f46931a Merge pull request #104480 from BlueCube3310/image-unsuported-format
Renderer: Warn when images need to be converted due to their formats being unsupported by hardware
2025-04-16 10:44:52 -05:00
Thaddeus Crews
a6979ef664 Merge pull request #97801 from basicer/srgb-color-hint
Add `color_conversion_disabled` shader hint.
2025-04-14 19:39:42 -05:00
Thaddeus Crews
c7e9dc96a4 Rendering: Fix Math constant conversion 2025-04-11 12:33:57 -05:00
Rob Blanckaert
8c54290b4a Add color_conversion_disabled shader hint.
Sometimes shaders want to accept a color as input that is always
in the srgb color space.  This adds a hint to vec3/vec4 to enable
the color picker popup for those vectors but disable color space
conversion.
2025-04-10 21:31:15 -07:00
Thaddeus Crews
94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
BlueCube3310
a861394e13 Renderer: Warn when images need to be converted due to their formats being unsupported by hardware 2025-04-06 19:27:02 +02:00
Yufeng Ying
4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
Rémi Verschelde
afc7398c2b Merge pull request #104616 from ibrahn/init-cmd-q-pending-and-gles3-skymatdata
Fix uninitialized member vars in CommandQueueMT and RasterizerSceneGLES3
2025-03-28 17:30:37 +01:00
Yyf2333
22b5ec17fb Using iterator pattern instead of List::Element *.
Co-authored-by: Adam Scott <ascott.ca@gmail.com>
2025-03-28 13:29:15 +08:00
Ibrahn Sahir
c9352f06f7 Fix uninitialised member vars in CommandQueueMT and RasterizerSceneGLES3 2025-03-25 17:19:16 +00:00