Commit graph

1362 commits

Author SHA1 Message Date
jsjtxietian
d48b95a305 fix glMapBufferRange return null when r_index + last_item_index > max_instances 2023-08-27 18:00:35 +08:00
A Thousand Ships
6cb28e481f Fix memory access error for MultiMesh with GLES3
Buffer was incorrectly assigned when invalid data was provided
2023-08-19 16:01:21 +02:00
Rémi Verschelde
5541567c1a
Merge pull request #80151 from WhalesState/Dev1
Fix GLES3 changing 2D shadow atlas size is broken
2023-08-17 11:23:24 +02:00
Mounir Tohami
2987dd0c71 fix GLES3 changing 2d shadow atlas size is broken 2023-08-16 15:58:23 +00:00
bitsawer
41def3740a Fix global shader uniform texture loading 2023-08-15 14:18:26 +03:00
clayjohn
57eb762bae Add option to enable HDR rendering in 2D
This is needed to allow 2D to fully make use of 3D effects (e.g. glow), and can be used to substantially improve quality of 2D rendering at the cost of performance

Additionally, the 2D rendering pipeline is done in linear space (we skip linear_to_srgb conversion in 3D tonemapping) so the entire Viewport can be kept linear.
This is necessary for proper HDR screen support in the future.
2023-08-07 11:24:03 +02:00
Yuri Sizov
bffbc5dd3e Merge pull request #80070 from clayjohn/GLES3-depth-prepass
Enable depth writes during shadow pass and depth pass. Disable during color pass
2023-08-01 17:26:00 +02:00
clayjohn
b986afed46 Enable depth writes during shadow pass and depth pass. Disable during color pass
This fixes an unreported performance bug. Basically, without this change, the depth prepass did nothing
2023-07-30 21:59:28 +02:00
LRFLEW
6effd3cde7 Fix transparent viewport backgrounds with custom clear color 2023-07-30 06:19:47 -05:00
Yuri Sizov
1fe49e7271 Merge pull request #79142 from BastiaanOlij/register_render_buffers
Expose RenderSceneBuffers(RD) through ClassDB
2023-07-27 15:22:27 +02:00
Yuri Sizov
d894a2ff57 Merge pull request #79883 from clayjohn/GLES3-shader-cache-dir
Check if shader cache directory is available before using cache
2023-07-26 18:40:35 +02:00
Bastiaan Olij
4874b96033 Expose RenderingSceneBuffers through ClassDB 2023-07-26 23:48:30 +10:00
Bastiaan Olij
63d6e9c557 Add custom texture create function 2023-07-26 20:46:34 +10:00
Yuri Sizov
3f2e901633 Merge pull request #79865 from clayjohn/discard-shader
Fix use of discard in shaders
2023-07-25 21:26:27 +02:00
Yuri Sizov
08cffc128f Merge pull request #79812 from ParsleighScumble/parsleigh/init-sky-scene-state
Use defaults to initialize sky data in case of no sky
2023-07-25 21:26:23 +02:00
clayjohn
52fb5bf986 Check if shader cache directory is available before using cache 2023-07-25 14:33:37 +02:00
Clay
7c812cd7e9 Fix use of discard in shaders
discard was being included in all shaders set to depth pass opaque, which is the majority of shaders

Instead it should only be used with alpha prepass materials
2023-07-24 23:21:04 +02:00
Parsleigh Scumble
67c13fe4eb Use defaults to initialize sky data in case of no sky 2023-07-24 10:41:13 -07:00
Yuri Sizov
b1f4e58bbf Merge pull request #79772 from Malcolmnixon/gles-skeletons
Unbind the framebuffer when updating meshes
2023-07-24 19:33:27 +02:00
Yuri Sizov
4ba24f6492 Merge pull request #79685 from LRFLEW/glinval
GLES3: Don't call `glTexParameter*` for invalid filter and repeat modes
2023-07-24 19:33:12 +02:00
Yuri Sizov
3e9fadc1dd Merge pull request #79660 from bitsawer/fix_opengl_multimesh
Fix GLES3 multimesh rendering when using colors or custom data
2023-07-24 19:33:05 +02:00
LRFLEW
3e9173f11a GLES3: Don't call glTexParameter* for invalid filter and repeat modes 2023-07-21 19:26:57 -05:00
Malcolm Nixon
679f5bf410 Unbind the framebuffer when updating meshes.
While the vertex shaders used to update the meshes aren't actually rendering to the framebuffer, they may still refuse to run with some framebuffers bound - such as XR with multiple views.
2023-07-21 19:34:12 -04:00
bitsawer
9897f1cfb9 Fix GLES3 multimesh rendering when using colors or custom data 2023-07-20 11:54:34 +03:00
LRFLEW
90f0e97eb9 GLES3: reset anisotropic filtering when changing texture filtering mode 2023-07-17 00:18:39 -05:00
Yuri Sizov
bb15241e06 Merge pull request #77740 from ChibiDenDen/simplify_vulkan
Replace sampler arrays with constant sampler elements, simplify and reuse code for all shaders
2023-07-12 17:16:12 +02:00
Yuri Sizov
a33b548092 Merge pull request #78168 from clayjohn/GLES3-gaussian-rt
Use Gaussian approximation for backbuffer mipmaps in GL Compatibility renderer
2023-07-12 15:08:57 +02:00
Rémi Verschelde
c566b03f26
Merge pull request #78852 from clayjohn/Particles-glitch
Initialize particles instance buffer in case it is used before being updated
2023-07-07 08:28:28 +02:00
clayjohn
35ed7c770b Initialize particles instance buffer in case it is used before being updated 2023-06-29 13:24:40 -07:00
clayjohn
7c37a32897 Use a filter with mipmaps when initializing textures with mipmaps in GL Compatibility renderer
This works around a driver bug in some older devices and should be harmless on any spec-compliant device
2023-06-26 10:45:24 -07:00
clayjohn
cc89321c9c Reset filter/repeat state of textures in GL Compatibility renderer when render target is cleared 2023-06-23 10:57:56 -07:00
Brecht Kuppens
55fc56bfd4 Moved variables closer to usage to fix unused variable warning 2023-06-22 23:01:09 +02:00
Rémi Verschelde
cb73a6e9f9
Merge pull request #78490 from clayjohn/GLES3-particles-subemit
Add warnings and fallbacks for particles sub emitters when using the GL Compatibility rendering backend
2023-06-22 21:02:38 +02:00
Qiqi Wu
df740f6865 free color and depth texture after check framebuffer complete failed 2023-06-22 09:13:24 +08:00
ChibiDenDen
35715e510f replace sampler arrays with constant sampler elements 2023-06-22 01:11:57 +03:00
clayjohn
8a5af8183a Add warnings and fallbacks for particles sub emitters when using the GL Compatibility rendering backend
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-06-21 12:56:52 -07:00
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
clayjohn
9721a27427 Use Gaussian approximation for backbuffer mipmaps in GL Compatibility renderer 2023-06-12 21:51:23 -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