Bastiaan Olij
a8ec72cf94
Move roughness limiter and sort into their own classes
2023-03-09 21:58:55 +11:00
Rémi Verschelde
d150bb84a6
Merge pull request #74566 from clayjohn/GL-canvas-texture
...
Avoid copying CanvasTexture when updating proxy
2023-03-08 08:59:04 +01:00
Rémi Verschelde
23bbf6b37c
Merge pull request #74533 from SlugFiller/fix-clip-no-children
...
Fixes a canvas item set to clip children being drawn as black if no children are visible
2023-03-08 08:57:00 +01:00
Rémi Verschelde
a0ff87f48d
Merge pull request #74416 from SlugFiller/fix-skeleton2d-aabb
...
Fix AABB calculation for meshes using Skeleton2D
2023-03-08 08:56:12 +01:00
Rémi Verschelde
1a5239ff1e
Merge pull request #74349 from JohanAR/fix-instance-uniforms
...
Fix instance uniforms breaking when setting a new mesh.
2023-03-08 08:55:48 +01:00
clayjohn
84482ef90b
Avoid copying CanvasTexture when updating proxy
2023-03-07 12:48:32 -08:00
SlugFiller
f25508befb
Fixes a canvas item set to clip children being drawn as black if no children are visible
2023-03-07 09:53:26 +02:00
SlugFiller
06a1fe0364
Fix AABB calculation for meshes using Skeleton2D
2023-03-05 08:21:08 +02:00
Johan Aires Rastén
26aecbfe57
Fix instance uniforms breaking when setting a new mesh.
...
Fixes #58113
2023-03-04 11:49:18 +01:00
Fabio Iotti
528e0d095e
Error on hint_normal_roughness_texture and hint_depth_texture outside of spatial shader
2023-03-03 21:36:48 +01:00
Rémi Verschelde
61d2c85511
Merge pull request #74269 from clayjohn/RD-more-timestamps
...
Add a few more rendering timestamps
2023-03-03 11:09:27 +01:00
clayjohn
1adc4e5875
Add a few more rendering timestamps
2023-03-02 18:15:21 -08:00
Rémi Verschelde
31eccb5501
Merge pull request #74150 from BastiaanOlij/fix_mobile_msaa_2d
...
Use MSAA 2D texture in multipass tonemapper
2023-03-02 11:42:13 +01:00
Rémi Verschelde
29723da272
Merge pull request #73919 from RandomCatDude/volumefog-spotlight-fix
...
Fix spotlight shadows in volumetric fog
2023-03-02 11:23:24 +01:00
Bastiaan Olij
903aa0e385
Use MSAA 2D texture in multipass tonemapper
2023-03-01 18:59:59 +11:00
Rémi Verschelde
0cd1483132
Merge pull request #73959 from clayjohn/GL-mobile-warnings
...
Add warnings for unsupported features in mobile and gl_compatibility backends
2023-02-26 21:39:06 +01:00
clayjohn
c69b14e96e
Add warnings for unsupported features in mobile and gl_compatibility backends
2023-02-26 12:28:02 -08:00
bitsawer
35c970f4f6
Fix shader preprocessor include resource check
2023-02-26 13:59:29 +02:00
RandomCatDude
59c31004f8
fix spotlight shadows in volumetric fog
2023-02-25 16:28:06 +05:00
Bastiaan Olij
4c2f33cfae
Fixing issues with SSIL artifacts
2023-02-24 16:13:18 +11:00
clayjohn
316cf04059
Clean up OUTPUT_IS_SRGB redefinitions
2023-02-23 12:56:42 -08:00
Bastiaan Olij
467d735eb1
Fix issue with default textures requiring arrays when using multiview
2023-02-22 16:50:58 +11:00
Rémi Verschelde
1fc28fe31f
Merge pull request #73698 from clayjohn/SS-bias
...
Increase SSAO and SSIL bias to account for variance in mipmap generation
2023-02-21 21:16:07 +01:00
Rémi Verschelde
5e57205365
Merge pull request #73478 from NewDefectus/master
...
Use the original canvas to calculate light positioning
2023-02-21 21:14:51 +01:00
clayjohn
db9dfb7233
Increase SSAO and SSIL bias to account for variance in mipmap generation
2023-02-21 10:25:33 -08:00
Alon Ran
2d7db30f0d
Use the original canvas to calculate light positioning
2023-02-21 11:57:16 +02:00
Yuri Rubinsky
94831c7209
Forbid passing multiview sampler to the custom function in shaders
2023-02-21 11:23:17 +03:00
Rémi Verschelde
b2584629c8
Merge pull request #73195 from timothyqiu/weblate-comments
...
Improvements and fixes based on Weblate comments
2023-02-17 09:55:39 +01:00
clayjohn
c9c14410e9
Fix sampling bug when SSAO is using half size
2023-02-16 00:37:12 -08:00
clayjohn
f35ca4a9c7
Properly calculate lifetime_split for particles
2023-02-14 14:37:47 -08:00
Rémi Verschelde
1a206d0e22
Merge pull request #73263 from clayjohn/render_priority
...
Notify mesh surface when render_priority changes
2023-02-14 11:05:28 +01:00
clayjohn
d3b3419aff
Notify mesh surface when render_priority changes
...
This ensures that the mesh properly takes render_priority into account when changed
2023-02-13 18:09:33 -08:00
Rémi Verschelde
0668e0f5a9
Merge pull request #69001 from dzil123/fix_rendering_checks
...
Fix various missing rendering parameter checks
2023-02-13 21:07:05 +01:00
Rémi Verschelde
e78b77481e
Merge pull request #73240 from myaaaaaaaaa/worker-h
...
Move some `worker_thread_pool.h` includes out of header files
2023-02-13 21:05:57 +01:00
myaaaaaaaaa
6f88392d02
Move some worker_thread_pool.h includes out of header files
2023-02-13 14:02:01 -05:00
Rémi Verschelde
3815903119
Merge pull request #72838 from BastiaanOlij/update_screen_space_render_buffers
...
Add render buffer support to screen space effects
2023-02-13 19:15:48 +01:00
Haoyu Qiu
84aee17901
Improvements and fixes based on Weblate comments
...
* Description of `ui_text_submit` action should be "Submit Text" instead of "Text Submitted".
* Spell out "Animation" instead of using "Anim.".
* Treat "Max" as regular word instead of writing "Max.".
* Use generic "Set %s" for action name instead of a dedicated "Set target_position".
* Add translator comment for:
* "Inclusive" and "Self" in the profiler.
* Places where it needs the context about being an editor progress label.
* "Duplicated Animation Name" since it's refering to the new name of a duplicated animation.
* Disambiguation of "View Plane Transform", "Paste Selects" and "Display Normal".
* Fix wrong undo action name for renaming an input action.
* Fix missing end quote in a shader error message.
* In class reference:
* Fix duplicated "if" in the description of `signf()`.
* Fix mismatched example output in `String.operator %()`.
* Fix typo in the description of `Decal.texture_emission`.
* Unify description of `String.match()` and `StringName.match()`.
2023-02-13 15:22:18 +08:00
Rémi Verschelde
bd92f124f7
Merge pull request #73060 from clayjohn/screen_texture-size
...
Avoid inserting screen_texture compatibility code when using textureSize
2023-02-11 14:37:30 +01:00
clayjohn
6c1c71d68b
Avoid inserting screen_texture compatibility code when using textureSize
2023-02-10 13:03:02 -08:00
clayjohn
4317f6236f
Do clear request before reading from render target when using CANVAS_BG
2023-02-10 12:12:34 -08:00
Rémi Verschelde
ed85a2c8ce
Merge pull request #70663 from EpEpDragon/feature_buffer_get_data_size_option
...
Add optional size parameter to the RenderDevice buffer_get_data method.
2023-02-10 18:49:28 +01:00
Bastiaan Olij
694c8ec273
Add render buffer support to screen space effects
2023-02-10 10:27:59 +11:00
Markus Sauermann
d249370cd7
Fix crash in editor when setting SubViewport.size
to zero
...
`Viewport::_set_size` now verifies, that the minimum size is at least 2x2.
Also fix `RendererViewport::viewport_set_size` fail condition.
2023-02-10 00:25:45 +01:00
Haoyu Qiu
a40ccc2d7e
Improve some editor strings for localization
2023-02-09 19:32:02 +08:00
clayjohn
04a9933f2e
Mark fma function as high end so it isn't used with the gl_compatibility renderer
2023-02-08 12:56:15 -08:00
Markus Sauermann
826e54fa73
Some code simplifications
...
1. `number_width` isn't used later
2. `return_type` is used only once
3. AudioServer::get_singleton()->get_channel_count() always returns a channel_count of 1 or larger
4. negative `aa->backward` conditional
5. `current_canvas` == `find_world_2d()->get_canvas()`
6. identical if `render_shadows`
2023-02-07 14:30:16 +01:00
clayjohn
56450fb179
Implement cull_mask for decals and lights in mobile and compatibility backends
2023-02-06 12:12:47 -08:00
Yuri Sizov
2bd5302704
Merge pull request #72695 from clayjohn/CanvasGroup-shading
...
Avoid shading CanvasGroup nodes twice
2023-02-04 21:38:25 +03:00
clayjohn
dfbf439081
Avoid shading CanvasGroup nodes twice
2023-02-03 15:40:42 -08:00
Ricardo Buring
497f5576c1
Fix MultiMesh visible_instance_count being ignored after the first frame
...
Co-authored-by: Clay John <claynjohn@gmail.com>
2023-02-03 11:40:39 -08:00
Rémi Verschelde
ddca070bea
Merge pull request #72631 from rburing/custom_aabb_update_dependency
...
Notify dependencies when setting custom mesh AABB
2023-02-03 06:24:51 +01:00
Rémi Verschelde
ec3adb93f7
Merge pull request #72589 from BastiaanOlij/add_layer_slice_support
...
Add layer slice support to render device and render buffers
2023-02-03 06:24:43 +01:00
Bastiaan Olij
093289364f
Add layer slice support to render device and render buffers
2023-02-03 09:48:56 +11:00
Ricardo Buring
086b9e0c59
Notify dependencies when setting custom mesh AABB
...
Fixes SoftBody3D culling issues.
2023-02-02 23:31:27 +01:00
Rémi Verschelde
9caf691c89
Merge pull request #72494 from Chaosus/shader_fix_const_init
...
Fix shader failure when using non-const initializer on a constant
2023-02-02 21:05:27 +01:00
Rémi Verschelde
e52213e2fa
More codespell fixes, do more changes from previous ignore list
2023-02-01 12:11:36 +01:00
Yuri Rubinsky
e034d5f764
Fix shader failure when using non-const initializer on a constant
2023-02-01 13:03:11 +03:00
Rémi Verschelde
7990b76ad8
Merge pull request #63829 from clayjohn/VULKAN-disable-multiview
...
Disable multiview shader versions when xr is disabled
2023-02-01 07:58:32 +01:00
Rémi Verschelde
ab4d8df163
Merge pull request #72485 from BastiaanOlij/add_eye_matrix_access
...
Expose EYE_OFFSET to gdshader code
2023-02-01 07:33:18 +01:00
Rémi Verschelde
0ba7e5a40a
Merge pull request #72464 from clayjohn/RD-skeleton-crash
...
Check if Skeleton exists before reading when calculating blend shapes
2023-02-01 07:31:42 +01:00
Rémi Verschelde
3eb1ac9fd2
Merge pull request #72075 from Maran23/extents-to-size
...
Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal and GPUParticles*3D
2023-02-01 07:30:09 +01:00
Bastiaan Olij
8c77aea9ab
Expose EYE_OFFSET to gdshader code
2023-02-01 12:39:13 +11:00
Marius Hanl
a59819630d
Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal and GPUParticles*3D
...
- Extents are replaced by Size (Size is Extents * 2)
- The UI text displays 'Size'
- Snapping is adjusted to work with Size
- _set and _get handle extents for compatibility
Co-authored-by: ator-dev <dominic.codedeveloper@gmail.com>
2023-01-31 20:04:11 +01:00
clayjohn
cdc6c00b5f
Check if Skeleton exists before reading when calculating blend shapes
2023-01-31 10:10:31 -08:00
Rémi Verschelde
97de7f39e1
Merge pull request #72404 from clayjohn/RD-sky-crash
...
Fix various crashes relating to low roughness_layers
2023-01-31 10:54:41 +01:00
Rémi Verschelde
c24e0065b2
Merge pull request #72433 from clayjohn/Pointlight2D-crash
...
Avoid crash when CanvasTexture used with light decal atlas
2023-01-31 10:54:02 +01:00
Rémi Verschelde
628967e6ba
Merge pull request #72343 from clayjohn/editor-canvas-bg
...
Remove viewport_set_disable_environment in favor of viewport_set_environment_mode
2023-01-31 10:53:05 +01:00
clayjohn
cfd5fe0f29
Avoid crash when CanvasTexture used with light decal atlas
...
The decal atlas is used for Light2Ds, decals, and Light3Ds
2023-01-30 20:59:53 -08:00
clayjohn
9071809021
Remove viewport_set_disable_environment in favor of viewport_set_environment_mode
...
This allows us to set a default value inherited by child viewports and have child viewports set the value themselves which is needed for disabling the environment in the editor
2023-01-30 12:25:49 -08:00
clayjohn
bc64a734d3
Fix various crashes relating to low roughness_layers
2023-01-30 12:16:33 -08:00
Rémi Verschelde
e9de988020
Merge pull request #72031 from reduz/change-high-quality-texture-import
...
Refactor high quality texture import
2023-01-30 20:41:01 +01:00
Rémi Verschelde
58a0c4c69e
Merge pull request #72393 from clayjohn/GLES3-normal-roughness-error
...
Add a shader error when trying to using hint_normal_roughness_texture in the gl_compatibility renderer
2023-01-30 20:26:50 +01:00
Rémi Verschelde
e86953cb53
Merge pull request #72356 from BastiaanOlij/fix_ssao_ssil_probes
...
Fix SSAO/SSIl being applied to reflection probes
2023-01-30 20:26:43 +01:00
clayjohn
97ed3dcf71
Add a shader error when trying to using hint_normal_roughness_texture in the gl_compatibility renderer
2023-01-30 09:04:34 -08:00
Juan Linietsky
28f51ba547
Refactor high quality texture import
...
* Only two texture import modes for low/high quality now:
* S3TC/BPTC
* ETC2/ASTC
* Makes sense given this is the general preferred and most compatible combination in most platforms.
* Removed lossy_quality from VRAM texture compression options. It was unused everywhere.
* Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA).
* Changed MacOS export settings so required texture formats depend on the architecture selected.
This solves the following problems:
* Makes it simpler to import textures as high quality, without having to worry about the specific format used.
* As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
2023-01-30 15:53:23 +01:00
Bastiaan Olij
43a63db7cf
Fix SSAO/SSIl being applied to reflection probes
2023-01-30 15:20:27 +11:00
Rémi Verschelde
23d087354d
Merge pull request #72214 from clayjohn/Skeleton2D-pivot
...
Automatically transform Skeleton2D calculations so pivots are not needed
2023-01-29 02:23:18 +01:00
clayjohn
eb9c2b878a
Automatically transform Skeleton2D calculations so pivots are not needed
2023-01-27 14:55:22 -08:00
bitsawer
0acaccebaf
Fix several shader preprocessor include issues
2023-01-27 14:37:55 +02:00
Rémi Verschelde
6f7793ce1a
Merge pull request #71581 from clayjohn/dependency-changed
...
Flag dirty dependencies when GeometryInstance dependencies change in renderer
2023-01-26 22:57:32 +01:00
Rémi Verschelde
3cacc83526
Merge pull request #72138 from clayjohn/GL-globals
...
Properly append global uniform buffer name in gl_compatibility shaders
2023-01-26 22:52:42 +01:00
Rémi Verschelde
b2164ee75b
Merge pull request #72109 from Chaosus/shader_derivative
...
Add derivative functions with precision to shaders
2023-01-26 22:51:54 +01:00
clayjohn
eefddb07bc
Properly append global uniform buffer name in gl_compatibility shaders
...
Also error when using instance uniforms
2023-01-26 12:14:45 -08:00
Yuri Rubinsky
8c8c333bf2
Add derivative functions with precision to shaders
2023-01-26 20:53:46 +03:00
bitsawer
6f5598979f
Several shader preprocessor parser fixes and improvements
2023-01-26 14:57:23 +02:00
Rémi Verschelde
bc73e32014
Merge pull request #72068 from clayjohn/RD-sky-texture
...
Validate another case of using DATA_FORMAT_A2B10G10R10_UNORM_PACK32 texture with storage flag
2023-01-26 01:12:12 +01:00
Rémi Verschelde
31496c296a
Merge pull request #72078 from bitsawer/fix_optimize_vertices
...
Fix range loop iteration regressions
2023-01-26 01:11:25 +01:00
Rémi Verschelde
4b0363312e
Merge pull request #71455 from BastiaanOlij/fix_stereo_screen_depth
...
Make screen texture and depth texture work in Multiview
2023-01-26 01:11:02 +01:00
Rémi Verschelde
d5d127309b
Merge pull request #72064 from hcoura/fix-vulkan-mobile-gpu-particles
...
RenderForwardMobile - add dependency tracker info on geometry create
2023-01-26 01:08:58 +01:00
bitsawer
8c25bcdb84
Fix range loop iteration regressions
2023-01-26 00:14:39 +02:00
clayjohn
5f94b378ab
Validate another case of using DATA_FORMAT_A2B10G10R10_UNORM_PACK32 texture with storage flag
2023-01-25 11:31:53 -08:00
Henrique Coura
28d8cad02e
RenderForwardMobile - add dependency tracker info on geometry create
2023-01-25 15:25:49 -03:00
Yuri Rubinsky
a6eb6b6b55
Fix array of token names in the shader parser
2023-01-25 18:18:07 +03:00
Bastiaan Olij
85c478e170
Make screen texture and depth texture work in Multiview
2023-01-25 13:35:01 +11:00
Rémi Verschelde
a6042b649a
Merge pull request #71832 from Geometror/fix-spotlight-artifacts
...
Fix some `SpotLight3D` issues (clustering artifacts, leaking light, AABB)
2023-01-24 09:15:26 +01:00
Hendrik Brucker
4bd01a93dc
Fix some SpotLight3D issues (clustering artifacts, light leak)
2023-01-24 01:08:32 +01:00
Rémi Verschelde
600fcf22ed
Merge pull request #71939 from clayjohn/RD-texture-format
...
Add a few more checks to ensure that unsupported image formats are not used in the mobile renderer
2023-01-23 22:30:19 +01:00
Rémi Verschelde
260daf8a13
Merge pull request #71694 from clayjohn/VoxelGI-reflection
...
Use proper space for forward GI reflections
2023-01-23 22:29:54 +01:00
clayjohn
5931d504c1
Add a few more checks to ensure that unsupported image formats are not used in the mobile renderer
2023-01-23 12:38:09 -08:00
Rémi Verschelde
c309de5399
Merge pull request #71910 from jainl28patel/fix_ReflectionProbe_rendering
...
fix ReflectionProbe rendering extents for (10,10,10)
2023-01-23 20:46:22 +01:00
jainl28patel
2da3acf620
fix ReflectionProbe rendering extents for (10,10,10)
2023-01-24 00:32:24 +05:30
clayjohn
ce8a2c6dbf
Ensure that Particles have fully initialized before doing view axis pass in RD renderers
2023-01-23 09:37:18 -08:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell
2023-01-23 11:02:20 +01:00
Rémi Verschelde
d40501faee
Merge pull request #71690 from Calinou/forward-mobile-fix-directionallight3d-shadow-opacity
...
Fix DirectionalLight3D shadow opacity on Forward Mobile rendering backend
2023-01-23 10:24:09 +01:00
Hugo Locurcio
d84c9523f7
Fix DirectionalLight3D shadow opacity on Forward Mobile rendering backend
2023-01-22 22:25:15 +01:00
kobewi
615c517034
Use range iterators in LocalVector loops
2023-01-21 18:44:42 +01:00
Rémi Verschelde
1b948a909f
Merge pull request #71788 from PrecisionRender/fix-filter_linear_mipmap-hint
...
Fix typo in hint when using removed built-in textures
2023-01-21 10:29:18 +01:00
Rémi Verschelde
23d8d44535
Merge pull request #71776 from clayjohn/PointLight2D-indices
...
Stop incrementing light_count once max number of lights are reached in 2D canvas renderer
2023-01-21 10:28:50 +01:00
PrecisionRender
d9698f0e6f
Fix type in hint when using removed built-in textures
2023-01-20 22:06:51 -06:00
clayjohn
d3c3fa32af
Stop incrementing light_count once max number of lights are reached in 2D canvas renderer
2023-01-20 17:04:00 -08:00
Rémi Verschelde
d5838a06fa
Merge pull request #71709 from clayjohn/decals-lights-sorting
...
Sort decals and lights based on camera origin
2023-01-20 23:57:55 +01:00
Rémi Verschelde
de3514b9ab
Merge pull request #71705 from clayjohn/RD-surface-free
...
Add mutex when adding geometry instances to the dirty list in the Forward Clustered renderer
2023-01-20 23:57:26 +01:00
clayjohn
921f99f9e3
Decrement texture_binding count when using screen textures
2023-01-20 12:48:13 -08:00
clayjohn
a804556ab9
Add mutex when adding geometry instances to the dirty list in the Forward Clustered renderer
2023-01-20 10:34:19 -08:00
clayjohn
49bebf2bfb
Sort decals and lights based on camera origin
...
Also implement sort_offset for decals
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-01-20 09:58:17 -08:00
Rémi Verschelde
9fc40123ab
Merge pull request #71679 from kleonc/draw_polyline_line_strip
...
`CanvasItem::draw_polyline` Support thin polylines drawn using line strip
2023-01-20 08:48:56 +01:00
clayjohn
2ccc69cd7d
Use proper space for forward GI reflections
2023-01-19 12:58:59 -08:00
kleonc
728c51e362
CanvasItem::draw_polyline Support thin polylines drawn using line strip
2023-01-19 21:08:25 +01:00
bitsawer
6f57aae0ab
Fix shader preprocessor memory leak
2023-01-19 22:06:59 +02:00
kleonc
f29e39cfd6
RendererCanvasCull Simplify drawing antialiased polyline
2023-01-19 17:08:39 +01:00
clayjohn
faea9f5c10
Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTURE
...
in favour of texture hints
2023-01-18 19:52:47 -08:00
kleonc
43fc483e6c
CanvasItem::draw_arc Clamp angle difference so arc won't overlap itself
2023-01-18 15:16:22 +01:00
clayjohn
b2a31a3bbf
Remove light from dynamic light list when removing scenario
2023-01-17 14:33:15 -08:00
clayjohn
c4a8284dec
Flag dirty dependencies when GeometryInstance dependencies change in renderer
...
Normally dependencies are only set dirty when changed during culling, but that misses changes that happen in the renderer (like a new shader being set in a material)
2023-01-17 12:39:13 -08:00
Rémi Verschelde
9cf0ffe1fa
Merge pull request #71524 from clayjohn/MOBILE-TAA
...
Warn when trying to enable TAA from mobile or gl_compatibility backend
2023-01-17 11:06:46 +01:00
Rémi Verschelde
59dcf64dd6
Merge pull request #71382 from jainl28patel/sprite2d_flip_normal_map
...
fix normal map not flipping in sprite2D
2023-01-17 10:56:44 +01:00
Rémi Verschelde
e1e30f9fc7
Merge pull request #71520 from conradhappeliv/fix-71480
...
Fix GPUParticles2D not recomputing transforms each frame
2023-01-17 10:14:32 +01:00
Conrad H. Appel, IV
ad6dd38795
Fix GPUParticles2D not recomputing transforms each frame
2023-01-16 14:10:58 -08:00
clayjohn
71ed83d301
Warn when trying to enable TAA from mobile or gl_compatibility backend
...
TAA should only be enabled from the forward_plus renderer for now
2023-01-16 13:32:40 -08:00
Rémi Verschelde
0ddd9c3e8f
Merge pull request #71526 from clayjohn/RD-sun-scatter
...
Properly initialize directional_light_count in RD sky shaders
2023-01-16 22:30:54 +01:00
Rémi Verschelde
2156250471
Merge pull request #62236 from MinusKube/master
...
Fix polyline not supporting closed polygons and not having a uniform width
2023-01-16 22:13:07 +01:00
clayjohn
8b3db6e9ce
Properly initialize directional_light_count in RD sky shaders
2023-01-16 13:05:52 -08:00
MinusKube
01af885e69
Fix draw_polyline not supporting closed polygons and not having a uniform offset
2023-01-16 20:27:30 +01:00
Danil Alexeev
a8cbb6245b
Fix scaling issue in draw_line
and similar methods
2023-01-16 12:49:58 +03:00
Raul Santos
7560340ef6
Rename center
method to get_center
in Plane.
2023-01-15 17:18:50 +01:00
Rémi Verschelde
ac104a69b8
Merge pull request #71309 from BastiaanOlij/improve_renderscaling_options
...
Improving communication of scaling settings to renderer implementation
2023-01-14 14:45:02 +01:00
jainl28patel
390f83bf5a
fix normal map not flipping in sprite2D
2023-01-14 11:51:56 +05:30
Rémi Verschelde
a51ca2beaf
Merge pull request #71346 from Chaosus/material_fix_freezing
...
Clear material arrays to prevent freeing of invalid texture RID
2023-01-14 00:44:18 +01:00
clayjohn
ccaebcd5e0
Avoid crashing when custom GLSL shaders are imported when using the gl_compatibility renderer
2023-01-13 12:53:19 -08:00
Yuri Rubinsky
01cddbb12a
Clear material arrays to prevent freeing of invalid texture RID
2023-01-13 23:25:09 +03:00
Bastiaan Olij
478c37deb8
Improving communication of scaling settings to renderer implementation
2023-01-13 12:54:15 +11:00
clayjohn
131036a5ef
Only setup depth framebuffer properties when not rendering ReflectionProbes
2023-01-12 16:19:12 -08:00
Pedro J. Estébanez
d0e37cd04c
Add framework for avoidance of color flash in new windows
2023-01-12 21:42:51 +01:00
Rémi Verschelde
1f171ff18b
Merge pull request #71261 from clayjohn/RD-alpha-aa
...
Take alpha antialising options into account when setting up materials
2023-01-12 08:19:16 +01:00
clayjohn
0ae567b00a
Take alpha antialising options into account when setting up materials
...
This restores the functionality of the alpha antialising options
2023-01-11 21:29:36 -08:00
Rémi Verschelde
0abd60b953
Merge pull request #71130 from clayjohn/RD-normal-roughness
...
Fix multiple issues that make the normal roughness texture unusable
2023-01-12 01:01:24 +01:00
Rémi Verschelde
201673ecd8
Merge pull request #71124 from clayjohn/forward-prepass
...
Only disable depth writing in opaque pipelines
2023-01-12 00:55:10 +01:00
Rémi Verschelde
8cb63cdd55
Merge pull request #70475 from BastiaanOlij/cleanup_luminance
...
Move luminance effect into its own class and use new buffers system
2023-01-11 01:10:37 +01:00
clayjohn
89766848de
Fix multiple issues that make the normal roughness texture unusable
2023-01-09 11:56:36 -08:00
clayjohn
e5abca4990
Only disable depth writing in opaque pipelines
...
This restores the behaviour of the visibility fade
2023-01-09 09:45:43 -08:00
Pedro J. Estébanez
5ca2ba45f1
Make inclusion of Godot version in shader hash universal
2023-01-09 17:47:02 +01:00
Bastiaan Olij
9b549231e4
Move luminance effect into its own class and use new buffers system
2023-01-07 14:40:42 +11:00
EpEpDragon
36d02882b9
Added optional offset and size parameter to RenderDevice buffer_get_data method
2023-01-06 17:08:37 +02:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
...
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.
It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).
We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).
Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Rémi Verschelde
a5e43daca1
Merge pull request #70929 from clayjohn/RD-mobile
...
Use proper indices for lights, decals, and reflection probes in mobile scene shader
2023-01-05 12:57:46 +01:00
Rémi Verschelde
0668b64c32
Merge pull request #70924 from clayjohn/canvas-bg-bugs
...
Always try to clear render target before drawing 3D with Canvas BG mode
2023-01-05 12:57:39 +01:00
clayjohn
aaa9d626f3
Use proper indices for lights, decals, and reflection probes in mobile scene shader
2023-01-04 14:03:48 -08:00
clayjohn
72bc7e5a9d
Always try to clear render target before drawing 3D with Canvas BG mode
...
This is necessary to ensure that we aren't copying garbage data to the 3D renderbuffer
2023-01-03 15:46:03 -08:00
Rémi Verschelde
0160fea1ce
Merge pull request #70884 from clayjohn/Depth-prepass
...
Ignore depth draw optimization when using depth draw alpha prepass
2023-01-03 23:23:29 +01:00
Rémi Verschelde
698ee56e54
Merge pull request #70638 from markusneg/cull-masked-shadows-gd4
...
Visual instance layers are regarded during shadow culling
2023-01-03 23:22:31 +01:00
clayjohn
062fb8b0dc
Ignore depth draw optimization when using depth draw alpha prepass
...
This is necessary as the scene shader still uses alpha in this case so we can't discard fragments that weren't written to the depth buffer
2023-01-03 12:33:07 -08:00
Adam Scott
ea33001b95
Add safety-checks before some servers free()
2022-12-29 16:23:38 -05:00
Markus Grafen
041b64ea7e
visual instance layers are regarded during shadow culling
...
Partially cherry-picked from 16517ecb
. Todos:
- setting Camera cull_mask should mark affected shadows dirty somehow
2022-12-27 18:43:53 +01:00
Bastiaan Olij
8bf16b0ce5
Fix errors related to reflection probe now using a render buffers object
2022-12-26 22:23:22 +11:00
Rémi Verschelde
f064898956
Merge pull request #70253 from BastiaanOlij/cleanup_sky_render
...
Cleanup and improve sky render
2022-12-23 23:44:02 +01:00
Rémi Verschelde
d8a0382e3f
Merge pull request #70476 from BastiaanOlij/move_sdfgi_init
...
Move SDFGI update logic into clustered renderer
2022-12-23 23:43:56 +01:00
Rémi Verschelde
2e07477751
Merge pull request #70214 from Ansraer/speed-maybe
...
[4.x] Use depth prepass to increase opaque render performance
2022-12-23 23:43:50 +01:00
Ansraer
d44a91c2f7
use depth prepass to increase performance
2022-12-23 17:15:46 +01:00
Bastiaan Olij
65ca9e6924
Move SDFGI update logic into clustered renderer
2022-12-24 00:00:11 +11:00
Rémi Verschelde
1cab6c91e9
Merge pull request #69998 from BastiaanOlij/sorting-pivot-4
...
Added options for sorting transparent objects (port of PR #63040 )
2022-12-23 09:47:24 +01:00
Bastiaan Olij
e886a7af81
Cleanup and improve sky render
2022-12-23 19:45:19 +11:00
Bastiaan Olij
6f4f38db07
Added options for sorting transparent objects (port of PR 63040)
2022-12-23 19:30:33 +11:00
Rémi Verschelde
56b828eb82
Merge pull request #70457 from clayjohn/RD-particles-update
...
Avoid updating particles during 2D rendering
2022-12-23 09:11:58 +01:00
Rémi Verschelde
13850d7812
Merge pull request #70455 from clayjohn/RD-particle-trail
...
Check for disabled particle trail particle before initializing particle trail
2022-12-23 09:11:48 +01:00
Yuri Rubinsky
f28348fc5c
Fix shader crash when using boolean type for vertex->fragment varyings
2022-12-23 07:47:49 +03:00
clayjohn
41021b07be
Avoid updating particles during 2D rendering
...
In 2D the particle uniform set isn't obtained until the render pass. So in 2D just avoid rendering if not updated yet.
2022-12-22 12:04:34 -07:00
clayjohn
4d301ee21e
Check for disabled particle trail particle before initializing particle trail
2022-12-22 11:30:59 -07:00
Rémi Verschelde
291add339f
Merge pull request #70422 from clayjohn/RD-trails
...
Disable particle trails particles when parent parent is not active.
2022-12-21 23:38:04 +01:00
clayjohn
eb10c71d6c
Disable particle trails particles when parent parent is not active.
2022-12-21 15:19:57 -07:00
Rémi Verschelde
29464cb9dc
Merge pull request #70418 from clayjohn/RD-particles
...
Ensure that particles are processed at least once before being used
2022-12-21 22:46:30 +01:00
clayjohn
886cae515c
Ensure that particles are processed at least once before being used
2022-12-21 14:06:05 -07:00
Rémi Verschelde
63f95c0e58
Merge pull request #70366 from quentinguidee/refactoring/fix-double-get-singleton
...
Fix double get_singleton()
2022-12-21 09:27:02 +01:00
Quentin Guidée
d9c05f7fbd
Fix double get_singleton()
...
Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com>
2022-12-20 14:26:15 -05:00
Yuri Rubinsky
522d4243bf
Add missing != operator to StringName
2022-12-20 17:25:54 +03:00
Rémi Verschelde
f318d60e06
Merge pull request #65376 from reduz/astc-support
...
Implement basic ASTC support
2022-12-20 12:44:30 +01:00
Juan Linietsky
71d21c7ccb
Implement basic ASTC support
...
Implements basic ASTC support:
* Only 4x4 and 8x8 block sizes.
* Other block sizes are too complex to handle for Godot image compression handling. May be implemented sometime in the future.
The need for ASTC is mostly for the following use cases:
* Implement a high quality compression option for textures on mobile and M1 Apple hardware.
* For this, the 4x4 is sufficient, since it uses the same size as BPTC.
ASTC supports a lot of block sizes, but the benefit of supporting most of them is slim, while the implementation complexity in Godot is very high.
Supporting only 4x4 (and 8x8) solves the real problem, which is lack of a BPTC alternative on hardware where it's missing.
Note: This does not yet support encoding on import, an ASTC encoder will need to be added.
2022-12-20 11:26:30 +01:00
Rémi Verschelde
1dad415131
Merge pull request #70300 from RandomShaper/depth_format
...
Ensure depth buffer format picked actually supports full intended usage
2022-12-19 17:11:24 +01:00
Rémi Verschelde
adc1096b19
Merge pull request #70219 from bruvzg/msdf_outline_scaling
...
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior.
2022-12-19 16:26:56 +01:00
Pedro J. Estébanez
d8283550e6
Ensure depth buffer format picked actually supports full intended usage
2022-12-19 16:23:33 +01:00
Quentin Guidée
e0f1e02cc7
Fix use of comma instead of semicolon
...
Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com>
2022-12-17 20:17:04 -05:00
bruvzg
20d9457f9d
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior.
2022-12-17 22:47:54 +02:00
Rémi Verschelde
2b056115ef
Merge pull request #70091 from clayjohn/bone-aabbs
...
Remove mesh bone_aabbs as they are not used anywhere and calculating them is a pain
2022-12-17 12:32:32 +01:00
Rémi Verschelde
676f60b0cc
Merge pull request #70132 from clayjohn/RT-update
...
Implement render_target_was_used API so that Viewports can properly check if they have been used.
2022-12-17 12:26:51 +01:00
Rémi Verschelde
376290ea86
Merge pull request #70163 from clayjohn/particles-sdf
...
Transform sdf xfrom by particle emission transform when particles are in global space
2022-12-17 12:24:51 +01:00
Rémi Verschelde
740e5a6404
Merge pull request #70172 from clayjohn/RD-boot-filter
...
Enable using filtering on boot image in RD renderer
2022-12-17 12:24:24 +01:00
Rémi Verschelde
3b6d697676
Merge pull request #70133 from lyuma/negative_scale_backface
...
Flip culling when rendering a camera with negative scale
2022-12-17 12:22:18 +01:00
Rémi Verschelde
2b2c372dbc
Merge pull request #70122 from clayjohn/VRS-r8uint
...
Don't attempt to create or use an R8_UINT texture as storage if VRS is not supported
2022-12-17 12:22:03 +01:00
Rémi Verschelde
13593d8644
Merge pull request #70087 from clayjohn/mesh-aabb
...
Cache mesh AABB when modified by skeleton and update instance AABB when skeleton changes
2022-12-17 12:21:01 +01:00
clayjohn
669a87bd89
Enable using filtering on boot image in RD renderer
2022-12-16 13:42:03 -08:00
clayjohn
99a159cd9b
Transform sdf xfrom by particle emission transform when particles are in global space
2022-12-16 11:55:11 -08:00
clayjohn
5e90b90a97
Don't attempt to create or use an R8_UINT texture as storage if VRS is not supported
2022-12-16 09:53:12 -08:00
clayjohn
1b330820bf
Implement render_target_was_used API so that Viewports can properly check if they have been used.
...
For the RD renderer, this does not work for Viewports used in scene shaders yet
2022-12-16 09:50:45 -08:00
Lyuma
80dea918c4
Flip culling when rendering a camera with negative scale
2022-12-15 16:12:10 -08:00
Yuri Rubinsky
5c83e95103
Merge pull request #70016 from Chaosus/refactor_rd_shader_data
...
fixed https://github.com/godotengine/godot/issues/69949
2022-12-15 20:28:26 +03:00
Yuri Rubinsky
807632a90c
Changed STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT
type to enum flags
2022-12-15 14:10:37 +03:00
Rémi Verschelde
762c6d4b36
Merge pull request #69709 from RandomShaper/refactor_spirv_reflection
...
Refactor SPIR-V reflection into a generic RenderingDevice feature
2022-12-15 09:21:35 +01:00
Rémi Verschelde
a194984e96
Merge pull request #70068 from clayjohn/mobile-lights
...
Initialize light index push constants to 0xFFFFFFFF instead of 0xFFFF
2022-12-15 09:20:44 +01:00
Rémi Verschelde
e1bcadd12d
Merge pull request #56804 from Calinou/ssr-add-max-roughness-cutoff
...
Add maximum roughness cutoff to SSR to improve performance
2022-12-15 09:20:29 +01:00
Yuri Rubinsky
56954485ed
Refactor ShaderData
& fix the sorting of shader uniforms
2022-12-15 10:02:59 +03:00
clayjohn
ef246d9156
Remove mesh bone_aabbs as they are not used anywhere and calculating them is a pain
2022-12-14 19:32:19 -08:00
clayjohn
b7088bbf52
Cache mesh AABB when modified by skeleton and update instance AABB when
...
skeleton changes
2022-12-14 18:07:07 -08:00
clayjohn
7b0dd7a3e6
Initialize light index push constants to 0xFFFFFFFF instead of 0xFFFF
2022-12-14 15:20:54 -08:00
Rémi Verschelde
465d4c1d95
Merge pull request #70009 from clayjohn/glow-hq
...
Remove high quality glow as it is not any higher quality than regular glow
2022-12-13 23:32:15 +01:00
Rémi Verschelde
fc517e6c89
Merge pull request #70003 from clayjohn/GLES3-cc
...
Various fixes and documentation for CanvasGroup
2022-12-13 23:31:43 +01:00
clayjohn
bdd4001ef0
Various fixes and documentation for CanvasGroup
...
Properly apply custom materials with CanvasGroups in the GLES3 backend
Properly blur backbuffer when using a partial rect in forward_plus and
gl_compatibility renderers
Properly set fit_margin when clear_margin is set
Fix shader error during backbuffer clear in mobile renderer
2022-12-13 10:22:18 -08:00
clayjohn
5b5cd2b98b
Remove high quality glow as it is not any higher quality than regular glow
2022-12-13 10:15:45 -08:00
Rémi Verschelde
83281e7a42
Merge pull request #69985 from clayjohn/mobile-rim
...
Ensure that rim lighting uses an exponent base greater than zero
2022-12-13 10:12:00 +01:00
Rémi Verschelde
4bfd21b515
Merge pull request #69828 from clayjohn/SSR-roughness
...
Fade out SSR with roughness so that it doesn't show at high roughness amounts
2022-12-13 10:10:56 +01:00
clayjohn
a062798b76
Ensure that rim lighting uses a exponent base greater than zero
...
This avoids the undefined behavior that happens if the base is zero and the exponent is zero
2022-12-12 13:41:28 -08:00
Fabio Iotti
c53c687962
Fix screen texture slightly darker
2022-12-12 21:17:36 +01:00
Pedro J. Estébanez
14e301467e
Refactor SPIR-V reflection into a generic RenderingDevice feature
2022-12-12 14:14:53 +01:00
Yuri Rubinsky
6e48db69a3
Changed RD::PipelineDynamicStateFlags
type to enum flags
2022-12-11 15:37:35 +03:00
Hugo Locurcio
7745bd42a6
Add maximum roughness cutoff to SSR to improve performance
...
In a test scene with mixed rough and non-rough materials, this saves
upwards of 0.15 ms of GPU time with very little visual artifacting
(GTX 1080, 2560×1440).
2022-12-10 17:35:18 +01:00
clayjohn
e6f8c8517c
Fade out SSR with roughness so that it doesn't show at high roughness amounts
2022-12-09 12:59:51 -08:00
Rémi Verschelde
60d7525d84
Merge pull request #69735 from clayjohn/Particles2D-sdf
...
Detect and report if 2D particles use the screen SDF
2022-12-08 09:52:01 +01:00
clayjohn
0a88c68d0a
Detect and report if 2D particles use the screen SDF
...
This ensures that the SDF is updated even if not used in a canvas_item shader
2022-12-07 10:03:08 -08:00
Lily Garcia
e328a0bcf8
Check if VRS is supported on creating VRS object
2022-12-07 13:00:13 +01:00
Rémi Verschelde
bd290ad566
Merge pull request #69636 from Malcolmnixon/vulkan-mobile-sky-matrix
...
Fix mobile renderer sky_transform operations
2022-12-06 15:16:20 +01:00
Malcolm Nixon
0f8a968cd4
Modified the mobile renderer to apply the sky_transform operations in the same order as the forward_plus renderer.
...
Update rasterizer_scene_gles3.cpp
Apply sky_transform order fix to the gles3 renderer.
2022-12-06 06:47:50 -05:00
Rémi Verschelde
43e9ca40ff
Merge pull request #65035 from nathanfranke/fix-aabb-mesh
...
Fix AABB errors on meshes with bones on multiple surfaces
2022-12-06 12:26:03 +01:00
Yaohua Xiong
9bdc0cb16f
draw fish bones for Path2D and Path3D
...
These fish bones are add to indicate the direction and local transforms alone the path.
2022-12-05 15:39:14 +08:00
Nathan Franke
aef261aa2a
fix aabb errors on meshes with bones on multiple surfaces
2022-12-04 14:40:19 -06:00
NumbuhFour
1b09fd5410
Implement CAMERA_VISIBLE_LAYERS as built-in shader variable
2022-12-03 22:41:27 -08:00
Rémi Verschelde
daf168f4c8
Merge pull request #69522 from clayjohn/IBL-black-metal
...
Allow black metallic materials to reflect IBL
2022-12-03 12:46:30 +01:00
Rémi Verschelde
29ddbfa19a
Merge pull request #69514 from clayjohn/IBL-roughness
...
Properly remap roughness when reading from radiance map
2022-12-03 12:46:25 +01:00
clayjohn
1e05dd3504
Allow black metallic materials to reflect IBL
2022-12-02 19:54:59 -08:00
clayjohn
b2b89d7294
Properly remap roughness when reading from radiance map
...
This ensures that we consistently use perceptual roughness which matches the behaviour of most other PBR renderers like Blender, Ue4 and Godot 3
2022-12-02 15:39:20 -08:00
Rémi Verschelde
7ef9947d0e
Merge pull request #68870 from dsnopek/master-webxr-input
...
Get WebXR fully working in Godot 4!
2022-12-02 12:24:40 +01:00
David Snopek
310bf39cd3
Get WebXR fully working in Godot 4!
2022-12-01 21:46:30 -06:00
Rémi Verschelde
1bd7b0b269
Merge pull request #69430 from Rindbee/fix-clip-contents
...
Fix child nodes still being drawn when the visible area of a control with `clip_contents` enabled is `0`
2022-12-01 23:55:18 +01:00
Rindbee
7129718dc5
Fix child nodes still being drawn when the visible area of a control with clip_contents
enabled is 0
2022-12-01 19:47:33 +08:00
clayjohn
f33ffd9ab4
Add Skeletons and Blend Shapes to the OpenGL renderer
...
This uses a similar multipass approach to blend shapes
as Godot 3.x, the major difference here is that we
need to convert the normals and tangents to octahedral
for rendering.
Skeletons work the same as the Vulkan renderer except the bones
are stored in a texture as they were in 3.x.
2022-11-29 09:45:03 -08:00
Yuri Rubinsky
5934eef44c
Changed RenderingDevice::TextureUsageBits
type to enum flags
2022-11-26 13:08:07 +03:00
Rémi Verschelde
5d20dccade
Add MAKE_RESOURCE_TYPE_HINT macro to simplify binding arrays of resources
2022-11-24 14:06:00 +01:00
Rémi Verschelde
714b978044
Merge pull request #69005 from akien-mga/shaderlang-sampler-uniforms-array-type
...
Shader: Set proper resource type hints for sampler uniforms
2022-11-23 08:33:05 +01:00
Markus Sauermann
75d56f4201
Fix parameters for hash_murmur3_one_32
...
In multiple locations in the codebase hash_murmur3_one_32 is used for
generating hash values.
Whenever a sequence of multiple hash-calculation happens within a single
function, the previous hash value is always used as input in the following
hash-calculations. The only exception is get_cache_multipass, where currently the previous
hash value is overridden without utilizing it.
This patch corrects that.
2022-11-22 19:46:54 +01:00
Rémi Verschelde
cb1826deae
Shader: Set proper resource type hints for sampler uniforms
...
Supersedes #64383 .
2022-11-22 15:38:52 +01:00
dzil123
b4437cbaa6
Fix various missing rendering parameter checks
2022-11-22 03:48:32 -08:00
Rémi Verschelde
e7418cac3d
Merge pull request #68942 from Chaosus/barrier_mask_flags
...
Expose `BarrierMask` as flags enum in `RenderingDevice`
2022-11-22 08:31:12 +01:00
Yuri Rubinsky
acaf38cfbc
Expose BarrierMask
as flags enum in RenderingDevice
2022-11-22 09:45:20 +03:00