Commit Graph

1325 Commits

Author SHA1 Message Date
bitsawer dab0871d41 Fix invalid RID errors when freeing a mesh with blend shapes 2023-06-19 11:07:15 +03:00
Qiqi Wu c8e3f00e5d GLES3: Remove unimplemented texture_create() declaration 2023-06-16 18:58:23 +08:00
Rémi Verschelde 7dddd8a22c
Merge pull request #78302 from clayjohn/GLES3-screen-warning
Remove outdated warning when using screen texture in GL Compatibility renderer
2023-06-16 10:23:27 +02:00
Rémi Verschelde 9e81aeda33
Merge pull request #78287 from clayjohn/GLES3-texture-replace
Copy texture filter/repeat modes when replacing a texture in the GL Compatibility backend
2023-06-16 10:23:03 +02:00
Rémi Verschelde 1710a7d303
Merge pull request #78285 from clayjohn/GLES3-viewport-filter
Ensure filter/repeat is cached by Viewport texture in GL Compatibility renderer
2023-06-16 10:22:33 +02:00
clayjohn 36a005fafc
Add RENDERING_INFO parameters to GL Compatibility renderer
This also fixes RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME for the RD renderers as it was incorrectly reporting vertex/index count at times

This also adds memory tracking to textures and buffers to catch memory leaks.

This also cleans up some memory leaks that the new system caught.
2023-06-16 09:10:00 +02:00
clayjohn 8a7f02addb Remove outdated warning when using screen texture in GL Compatibility renderer 2023-06-15 18:48:50 -07:00
clayjohn 96b2743782 Ensure filter/repeat is cached by Viewport texture in GL Compatibility renderer 2023-06-15 13:08:55 -07:00
clayjohn 3e211b7f74 Copy texture filter/repeat modes when replacing a texture in the GL Compatibility backend 2023-06-15 13:06:42 -07:00
clayjohn 0b7e2dfdfc Ensure that "detect 3D" is only called when using 3D shaders 2023-06-13 13:20:11 -07:00
Rémi Verschelde 9ce42d176d
Merge pull request #76977 from manueldun/light-shader-builtins
Enable the use of all supported builtins on the light shader
2023-06-09 11:04:46 +02:00
Rémi Verschelde 166643df32
Merge pull request #74937 from bitsawer/fix_uniform_storage
Fix shader uniform storage conversions and crash
2023-06-09 11:04:16 +02:00
Manuel Dun e2321c21db Enable the use of all builtins on the light shader
When using the light process in spatial shader,
the built-ins work as spected, now they work in forward+,
mobile and compatibility renderer.
2023-06-08 14:14:14 -04:00
clayjohn 05142b6228 Properly update array textures when using the OpenGL backend to avoid crash 2023-06-07 15:44:11 -07:00
Rémi Verschelde e75285f69f
Merge pull request #77946 from bruvzg/opengl_blend_cache
[OpenGL] Fix LCD blend mode color caching.
2023-06-07 11:02:30 +02:00
bruvzg a2abea8b98
[OpenGL] Fix LCD blend mode color caching. 2023-06-07 10:55:38 +03:00
MJacred 2c5e2196bd Replace get_rendering_device() call to prevent crashes on OpenGL.
And make OpenGL video adapter info align with Vulkan.
2023-06-06 23:29:36 +02:00
bitsawer 23c375d6b4 Fix shader uniform storage conversions and crash 2023-05-29 15:17:13 +03:00
Rémi Verschelde f2e91eae63
Merge pull request #77224 from patrickdown/implement_texture_2d_layered_initialize
Implemented texture_2D_layered_initialize
2023-05-29 10:29:08 +02:00
patrickdown 391a1bf60e Implemented texture_2D_layered_initialize 2023-05-27 12:53:59 -05:00
Yuri Sizov f6dcd7f51a
Merge pull request #75181 from dalexeev/fix-light-only-mode
Fix "Light Only" mode of `CanvasItemMaterial`
2023-05-27 17:28:29 +02:00
Dani Frank 6d3634e29f fix gles texture uniform array binding 2023-05-26 23:11:02 +03:00
Rémi Verschelde 2ab0f17f3b
Merge pull request #77409 from allenwp/OpenGL3-Blend-Issue76334
Fixed issues with blend modes in OpenGL 3 renderer
2023-05-24 18:36:06 +02:00
Allen Pestaluky 51f0e36509 Fixed issues with blend modes in OpenGL 3 renderer
Added uses_blend_alpha = true for ADD, SUBTRACT, and MULTIPLY blend modes to match the other renderers

Fixes #76334
2023-05-24 10:35:23 -04:00
Rémi Verschelde 852740a627
Merge pull request #76053 from MightiestGoat/fix-sky-auto-exposure
Fix the grainy sky while using debanding.
2023-05-24 08:46:28 +02:00
Rémi Verschelde 05ddc822fb
Merge pull request #77265 from lyuma/aabb_bone_lod_inside
Fix calculation of skinned AABB for unused bones.
2023-05-22 13:49:19 +02:00
Lyuma 791d8001db Fix AABB for unused bones
Fixes bug where bounding box of 1 unit was used in some skinned models and had wrong LODs.
(this could become very large if the mesh is scaled, such as FBX conversions)
Also fixes a mistake in calcualting bone index.
2023-05-19 19:47:52 -07:00
Markus Grafen 8a3e829930 (Re-)Implemented Light3D's property "shadow_reverse_cull_face"
The parameter shadow_reverse_cull_face is now passed to the shadow pass so that the mesh back-faces are used for shadow map calculation.
2023-05-19 19:22:10 +02:00
ChibiDenDen 14e9a61ebc Verify gles3 cached shader load successful 2023-05-17 19:36:30 +03:00
Danil Alexeev 43b0702a02
Fix "Light Only" mode of `CanvasItemMaterial` 2023-05-13 09:06:09 +03:00
Bram Stolk 14494e08d1 Initialize light intensity parameter before use.
Unlike renderer_rd, the gles3 light storage fails to initialize
the intensity of the light.
To avoid using garbage memory, possibly NaN, we use the same
default value that renderer_rd uses.
Fixes #76956
2023-05-11 09:46:46 -07:00
Rémi Verschelde 564d1b34e0
Merge pull request #74711 from BastiaanOlij/add_texture_native_handle
Provide access to internal graphics handles for textures
2023-05-09 19:28:26 +02:00
Rémi Verschelde 1c7a62d2c0
Merge pull request #76092 from ChibiDenDen/shader_cache_gles3
Add shader cache to gles3
2023-05-09 10:45:10 +02:00
Bastiaan Olij c328676d96 For GDExternal use, provides access to internal graphics handles for textures 2023-05-09 13:47:22 +10:00
Rémi Verschelde e370b3538b
Merge pull request #74945 from ChibiDenDen/patch-3
Fix gles3 rendering on android studio emulator
2023-05-08 13:52:28 +02:00
ChibiDenDen 6441210177 Add ARB_get_program_binary to glad to support shader cache over desktop GL 2023-05-06 00:20:37 +03:00
Max Hilbrunner 39d85308fd
Merge pull request #76109 from paddy-exe/fix-node-position-view 2023-05-05 14:35:41 +02:00
Johan Aires Rastén 8452e6cdb3 Add SPECULAR_AMOUNT spatial light shader built-in
Light3D has a light_specular property which is used to set the
intensity of specular contributed by this light source, but it was
previously only used by the default material light shader, and not
possible to use in a custom light() shader.
2023-05-04 09:15:12 +02:00
Patrick e35bbd76a3 Fix Rotation Issue with NODE_POSITION_VIEW Visual Shader Node 2023-05-03 19:59:43 +02:00
ChibiDenDen 5956aa1a6a Fix gles3 rendering on android studio emulator
Use a temporary framebuffer for screen copy from rendertarget to screen.

This solves GLES3 rendering in android studio emulator (before this change there is just a black screen)

Based on discussion in:
https://github.com/godotengine/godot/issues/74828
2023-04-29 16:21:54 +03:00
Johan Aires Rastén 14a8124ffe Add LIGHT_IS_DIRECTIONAL built-in for spatial shaders 2023-04-20 14:33:30 +02:00
clayjohn ab603e347f Clamp normal when calculating 2D lighting to avoid artifacts 2023-04-18 17:26:17 -07:00
ChibiDenDen 4adbfcfbb2 Add shader cache to gles3 2023-04-15 18:41:10 +03:00
mightygoat 69f634ac78 Fix the grainy sky while using debanding 2023-04-15 10:43:46 +05:30
Rémi Verschelde e6e52f9154
Merge pull request #75162 from ecmjohnson/gpuparticles_inf_translate
GPUParticles3D: Translate inactive particles to -INF
2023-04-13 09:53:04 +02:00
Erik Johnson 6229c2a1f9 Translate inactive particles to -INF 2023-04-12 19:32:39 -04:00
clayjohn 9be0a73294 Add EXPOSURE built in to spatial shaders
This allows users to restore light values to pre-pre-exposure amounts
2023-04-12 10:35:13 -07:00
Rémi Verschelde 5e34a28bd7
Merge pull request #73313 from clayjohn/particles-split
Properly calculate lifetime_split for particles
2023-04-12 17:01:17 +02:00
Rémi Verschelde 6e0c7d6a98
Merge pull request #75968 from clayjohn/GL-depth-write
Ensure that depth write state is updated before transparent pass in OpenGL3 renderer
2023-04-12 09:08:30 +02:00
Rémi Verschelde ecbb196728
Merge pull request #75954 from clayjohn/GL-multimesh-one
Check for instancing without relying on instance_count when drawing 2D meshes
2023-04-12 09:08:06 +02:00