clayjohn
e69968b794
Only copy the relevant portion of the screen when copying to backbuffer in Compatibility backend
2023-11-11 00:17:26 +01:00
clayjohn
9c5adac342
Properly rename INSTANCE_ID and VERTEX_ID in canvas item shaders in the compatibility backend
2023-11-07 17:55:51 +01:00
jsjtxietian
716fd3edfc
Add shadows_disabled macro in Compatibility renderer
2023-11-07 18:55:26 +08:00
Rémi Verschelde
44a54f4500
Merge pull request #84252 from clayjohn/ensure_tangents
...
Enhance checks and user experience around tangent arrays in meshes.
2023-11-02 09:11:32 +01:00
clayjohn
d1043a5f93
Enhance checks and user experience around tangents.
...
Ensure `ensure_tangents` option actually creates tangent array. Even if it is just a dummy array.
Allow mesh to generate its own tangents when using compression. This allows users to compress meshes without tangents.
Warn users if they are trying to read from tangents without providing tangents.
2023-11-01 22:40:42 +01:00
David Snopek
67d8102f95
Fix WebXR on desktop emulator by reseting active texture unit
2023-10-31 16:18:38 -05:00
Rémi Verschelde
dcbee437f7
Merge pull request #84197 from bruvzg/opengl_utf8
...
Parse OpenGL and Vulkan strings as UTF-8.
2023-10-30 17:47:51 +01:00
bruvzg
25dc729dd4
Parse OpenGL and Vulkan strings as UTF-8.
2023-10-30 17:24:31 +02:00
Rémi Verschelde
acbc341a58
OpenGL: Fix uninitialized memory usage for GPUPartciles interp_to_end
...
Fixes #84072 .
2023-10-30 15:08:24 +01:00
Rémi Verschelde
c5c90fd7b7
Merge pull request #83998 from chybby/83380-soft-shadows
...
Fix reading shadow filter quality from project settings in compatibility
2023-10-26 16:02:08 +02:00
Rémi Verschelde
2dafd06114
Merge pull request #83906 from clayjohn/GL-vertex-padding
...
Add padding to normal attribute in Compatibility renderer to match the RD renderers
2023-10-26 16:00:56 +02:00
Rémi Verschelde
253711ec98
Merge pull request #82430 from RandomShaper/fix_gles3_tex_free
...
[GLES3] Avoid freeing proxy textures clearing onwer's data
2023-10-26 15:58:55 +02:00
Adam Chyb
b9446dde7e
Fix reading shadow filter quality from project settings in compatibility
...
Fixes #83380 .
2023-10-26 23:57:42 +11:00
Rémi Verschelde
815b24d280
Merge pull request #83491 from jsjtxietian/pass-screen-size-when-render-shadow
...
Pass viewport size to shadow pass instead of using Vector2i(1,1)
2023-10-26 12:09:21 +02:00
jsjtxietian
26d32554bd
Pass viewport size to shadow pass instead of using vector2i(1,1)
2023-10-26 15:25:22 +08:00
Rémi Verschelde
f021d33940
Merge pull request #81167 from bitsawer/fix_sdfgi_editor_change
...
Reset SDFGI when changing editor scene tabs
2023-10-25 10:27:03 +02:00
clayjohn
a88e519f18
Add padding to normal attribute in Compatibility renderer to match the RD renderers
2023-10-24 22:32:34 +02:00
Rémi Verschelde
261fe7ce6a
Merge pull request #83704 from clayjohn/misc-mesh-fixes
...
Some more fixes for compressed meshes
2023-10-24 10:54:23 +02:00
Rémi Verschelde
64f80295e5
Merge pull request #83199 from Repiteo/texture-storage-default-scale
...
Fix `TextureStorage` not assigning default scale
2023-10-24 10:53:56 +02:00
clayjohn
8f9cd4e1e3
Some more fixes for compressed meshes
...
This cleans up a few more cases of uint32_t->uint64_t
Importantly this fixes an edge case in the axis-angle compression by
using the pre-existing Basis methods instead
2023-10-24 09:38:12 +02:00
Rémi Verschelde
50d17f6b8c
Merge pull request #83613 from clayjohn/surface_upgrade_tool
...
Add an editor tool to automatically upgrade and re-save meshes
2023-10-24 00:10:37 +02:00
clayjohn
318ef8461f
Implementation of tool to automatically upgrade and re-save meshes
2023-10-23 22:39:48 +02:00
Rémi Verschelde
814de86494
Merge pull request #83493 from clayjohn/light-pair-bug
...
Ensure that only visible paired lights are used
2023-10-23 12:40:07 +02:00
BlueCube3310
f31371c04e
Automatically ensure correct normals in Compatibility renderer
2023-10-22 15:00:11 +02:00
David Snopek
58775a6c67
Fix GPUParticles3D
on the Meta Quest 2 with OpenGL renderer
2023-10-21 16:49:24 -05:00
Clay
623a050269
Ensure that only visible paired lights are used
...
This is a longstanding issue in both the Mobile and GL Compatibility renderer.
Meshes pair with all lights that touch them, and then at draw time, we send all paired lights indices to the shader (even if that light isn't visible). The problem is that non-visible lights aren't uploaded to the GPU and don't have an index. So we end up using a bogus index
2023-10-17 13:02:46 +02:00
mrjustaguy
09a2a7c54e
Remove PSSM Fade
2023-10-13 12:01:23 +02:00
Thaddeus Crews
9ee41c707e
Fix texture storage not assigning default scale
...
• Print errors if an invalid value is passed
2023-10-12 12:02:24 -05:00
Rémi Verschelde
b1371806ad
Merge pull request #82431 from bitsawer/fix_gpuparticles_free
...
Fix errors when freeing GPUParticles
2023-10-12 00:22:33 +02:00
Rémi Verschelde
775ab4e983
Merge pull request #83141 from BastiaanOlij/fix_shadow_size
...
Fix compatibility shadow size not being initialised
2023-10-11 18:30:55 +02:00
Bastiaan Olij
59cd86f89d
Fix compatibility shadow size not being initialised
2023-10-11 22:02:38 +11:00
Rémi Verschelde
4b7cc99bc1
Merge pull request #79169 from reduz/debug-canvas-item-redraw
...
Debug CanvasItem redraw
2023-10-11 08:40:05 +02:00
Rémi Verschelde
55282ddc10
Merge pull request #79527 from QbieShay/qbe/particles-rework
...
Particle internal refactor and additions for more artistic control
2023-10-10 22:48:50 +02:00
QbieShay
c228fe1a0d
Particle internal refactor and additions for more artistic control
...
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Co-authored-by: Mew Pur Pur <85438892+MewPurPur@users.noreply.github.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
2023-10-10 20:03:35 +02:00
Rémi Verschelde
a28dab7e82
Merge pull request #79711 from adamscott/web-non-blocking-main-thread
...
Add `proxy_to_pthread` option to `platform=web`
2023-10-09 23:22:22 +02:00
Adam Scott
78c2a08fae
Add proxy_to_pthread
option to platform=web
...
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2023-10-09 11:50:01 -04:00
Rémi Verschelde
a1d7c62df7
Merge pull request #83003 from AThousandShips/null_check_extra
...
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-10-09 15:37:14 +02:00
A Thousand Ships
f18aa00e85
Replace ERR_FAIL_COND
with ERR_FAIL_NULL
where applicable
2023-10-08 17:23:33 +02:00
A Thousand Ships
034c0f1624
Replace sanity
with safety
for checks
2023-10-08 16:22:24 +02:00
Rémi Verschelde
c05f521e16
Merge pull request #82892 from clayjohn/tangent-binormal-transform
...
Only perform modelview transform on tangent and binormal when vertex shader is in local space
2023-10-06 12:53:05 +02:00
clayjohn
af1d81d95a
Only perform modelview transform on tangent and binormal when vertex shader is in local space
2023-10-05 22:08:36 -06:00
clayjohn
04846c1d6d
Avoid default fallback material when using world_vertex_coords
...
This avoids z-fighting between the opaque shader and the depth prepass shader
2023-10-05 19:11:48 -06:00
clayjohn
51ed3aef63
Vertex and attribute compression to reduce the size of the vertex format.
...
This allows Godot to automatically compress meshes to save a lot of bandwidth.
In general, this requires no interaction from the user and should result in
no noticable quality loss.
This scheme is not backwards compatible, so we have provided an upgrade
mechanism, and a mesh versioning mechanism.
Existing meshes can still be used as a result, but users can get a
performance boost by reimporting assets.
2023-10-05 12:02:23 -06:00
bitsawer
6f88ed73be
Fix GLES3 instanced rendering color and custom data defaults
2023-09-29 11:44:37 +03:00
Yuri Sizov
7ae0fa1083
Merge pull request #77496 from clayjohn/GLES3-shadows
...
Implement 3D shadows in the GL Compatibility renderer
2023-09-28 20:03:53 +02:00
clayjohn
cb7200b028
Implement 3D shadows in the GL Compatibility renderer
2023-09-28 09:39:26 +02:00
SlugFiller
d468582ef8
Fix build on MSVC 2017
2023-09-27 19:49:59 +03:00
bitsawer
898d1a2d5f
Fix errors when freeing GPUParticles
2023-09-27 11:46:31 +03:00
Pedro J. Estébanez
a67559931b
[GLES3] Avoid freeing proxy textures clearing onwer's data
2023-09-27 10:44:56 +02:00
bitsawer
f1062f25eb
Add device info to GLES3 shader cache key hash
2023-09-26 13:01:31 +03:00
bruvzg
1887a9df19
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
...
Co-authored-by: Riteo <riteo@posteo.net>
2023-09-21 14:21:00 +03:00
Rémi Verschelde
9a1b4f338b
Merge pull request #81160 from paddy-exe/canvas-uv-world-space
...
Add render mode to use world coordinates in canvas item shader
2023-09-19 09:03:18 +02:00
Yuri Sizov
48e1c19dea
Merge pull request #81583 from AThousandShips/null_check_drivers_platform
...
[Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-09-15 19:48:18 +02:00
bitsawer
af7b870e2a
Improve GLES3 scene renderer compatibility with older devices
2023-09-14 16:34:29 +03:00
A Thousand Ships
3565d1bf7e
[Drivers,Platform] Replace ERR_FAIL_COND
with ERR_FAIL_NULL
where applicable
2023-09-12 20:13:32 +02:00
Rémi Verschelde
3815b2f98e
Merge pull request #81315 from conorlawton/z-billboard-y-velocity-no-scale
...
Fix z-billboard + y to velocity transform alignment to correctly respect non-uniform scale
2023-09-08 23:14:27 +02:00
Conor Lawton
9ecafcc491
Fixed z-billboard-y-velocity to correctly respect non-uniform scale instead of averaging scale
2023-09-08 20:01:57 +01:00
Rémi Verschelde
8de6405288
UWP: Remove platform port, needs to be redone from scratch for 4.x
...
The UWP platform port was never ported to the Godot 4.0+ API,
and it's now accumulating bitrot as it doesn't compile, and thus
we no longer propagate platform changes in it.
So we finally remove to acknowledge this state. There's still some
interest in reviving the UWP port eventually, especially as support
for Direct3D 12 will soon be merged, but when that happens it will
be easiest to redo it from scratch.
2023-09-07 15:01:59 +02:00
Rémi Verschelde
8f3042ed46
Merge pull request #81395 from jsjtxietian/fix-clear-color-alpha-value-affect-2d-editor-in-compatibility
...
Fix clear color's alpha value will affects 2D editor in Compatibility mode
2023-09-07 13:54:10 +02:00
jsjtxietian
e21a485dbc
Fix clear color's alpha value will affects 2D editor in Compatibility mode
...
When the rt's transparency is false, force the alpha of the clear color to one
2023-09-07 12:56:34 +08:00
Milan Gruner
45a33cc749
Implement render mode fog_disabled and BaseMaterial3D setting Disable Fog
2023-09-05 18:15:02 +02:00
bitsawer
836705d7a9
Reset SDFGI when changing editor scene tabs
2023-08-30 19:50:05 +03:00
Patrick
c98ab5aba3
Add option to use world coordinates in canvas item shader
...
By using the render mode `world_vertex_coords` you can automatically use the vertex coordinates in world space
2023-08-30 15:32:18 +02:00
Rémi Verschelde
fd7b27a473
Merge pull request #80909 from adamscott/web-fix-max-uniform-buffer-size-overflow
...
Fix integer value for `GL_MAX_UNIFORM_BLOCK_SIZE` overflowing
2023-08-28 15:03:50 +02:00
Juan Linietsky
407b16ab00
Debug CanvasItem redraw
...
I wanted to add this tool for years and always forget. This command line option:
```
$ godot.exe -e --debug-canvas-item-redraw
```
Allows to see when a canvas item is redrawn. This helps find out if something
in the UI is refreshing in a way it should not. Examples as such:
* Signals causing more of the UI to redraw.
* Container resizing causes more UI elements to redraw.
* Something using a timer is redrawing all time time, which can go unnoticed.
To my surprise, the editor UI is redrawing very efficiently. There is some
weird stuff with the scene tabs, redrawing when the inspector changes but most
things for the most part are fine.
2023-08-28 12:53:56 +02:00
jsjtxietian
d48b95a305
fix glMapBufferRange return null when r_index + last_item_index > max_instances
2023-08-27 18:00:35 +08:00
Adam Scott
9c7db7397f
Fix integer value for GL_MAX_UNIFORM_BLOCK_SIZE overflowing
2023-08-25 10:19:25 -04: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