Rémi Verschelde
0ec2be1213
Merge pull request #76003 from clayjohn/double-particle-offset
...
Don't store instance transform origin in RD 3D renderer unless requested
2023-04-13 09:56:41 +02:00
Rémi Verschelde
34a842b5d1
Merge pull request #75462 from joao-pedro-braz/use_modelview_for_vertex_transform_when_double_precision_is_enabled
...
Use MODELVIEW_MATRIX when on double precision
2023-04-13 09:53:54 +02:00
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
29edd277e4
Don't store instance transform in RD 3D renderer unless requested
...
Previously, when using doubles builds of the engine, instance transform was stored no matter what which caused world space particles to accumulate the instance transform twice
2023-04-12 14:41:17 -07: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
1b14e1a293
Merge pull request #75908 from Calinou/compute-pipeline-fix-typo
...
Fix `compute_pieline` typo in `RenderingDevice.compute_pipeline_is_valid()`
2023-04-12 09:07:43 +02:00
Yuri Rubinsky
1433c98e9f
Merge pull request #75831 from Chaosus/shader_fix_texture_array_hint_completion
2023-04-12 08:58:59 +03:00
Rémi Verschelde
ef17794d17
Merge pull request #75812 from RandomCatDude/sky-fog-luminance-fix
...
Move sky luminance scaling to before fog is applied
2023-04-11 19:40:36 +02:00
Rémi Verschelde
347a8e20ae
Merge pull request #69324 from RedMser/advanced-settings-errors
...
Make it easier to solve warnings/errors referring to project settings
2023-04-11 19:39:53 +02:00
Hugo Locurcio
8eb0d0e665
Fix `compute_pieline` typo in `RenderingDevice.compute_pipeline_is_valid()`
2023-04-10 22:32:04 +02:00
Yuri Rubinsky
12142f2b50
Fix completion of `source_color` hint for texture arrays in shaders
2023-04-08 20:13:26 +03:00
RandomCatDude
c118314fe8
Apply sky fog after luminance multiplier
2023-04-08 12:52:33 +05:00
Yuri Sizov
cbb2e17369
Merge pull request #75368 from MightiestGoat/fix-limit-interpolation-R0
...
Fix the limit for interpolation of R0 with respect to metallic and the calculation of the cos theata in the Fresnel Shlick term in SSR
2023-04-07 12:40:33 +02:00
Yuri Sizov
08c1b55862
Merge pull request #74891 from jmattspartacus/OccluderPolygon2D_memLeak_53722
...
Fix for OccluderPolygon2D memory leak
2023-04-07 12:37:51 +02:00
mightygoat
2c000cb72f
Fix the limit for interpolation of R0 with respect to metallic and SSR
...
Shlick term
2023-04-06 23:14:47 +05:30
Bastiaan Olij
901cd7e3fe
Fix framebuffers in sky not being created on mobile renderer
2023-04-05 09:43:03 +10:00
Yuri Sizov
9dcfdc2051
Merge pull request #75366 from Chaosus/shader_compiler_fix_operator
...
Fix to some operators in shaders are not compiled properly
2023-04-03 22:32:31 +02:00
Rémi Verschelde
154a29d33a
Merge pull request #74808 from bradc6/feature/AllowCustomOutputShaderGenFilepaths
...
Allow for shaders to be generated outside of the source tree
2023-04-03 16:01:32 +02:00
Bastiaan Olij
ab60d3b65c
Expose viewports render targer RID
2023-03-31 11:34:09 +11:00
João Pedro Braz
63c6f0b93c
Use MODELVIEW_MATRIX for vertex transform when double precision is enabled
...
This commit updates the double precision vertex transform code from
using the MODEL_MATRIX to now use the MODELVIEW_MATRIX instead.
This can be made possible by transforming the MODELVIEW_MATRIX
back into model space (ie, same space as the MODEL_MATRIX) and then using it as if it were the MODEL_MATRIX.
With this in place we now properly handle VERTEX transformations that
a Material Shader might do, such as billboard-ing.
2023-03-29 10:37:30 -03:00
RedMser
ed960453b7
Make solving project setting errors easier
...
Show full project setting path in error messages.
Force filtering for advanced settings if filter is not empty.
2023-03-27 08:10:35 +02:00
Yuri Rubinsky
575e352a61
Fix to some operators in shaders are not compiled properly
2023-03-26 20:50:02 +03:00
Bradley Clemetson
2302c7102f
Allow for external python scripts to call the build python headers via external scripts
...
Change GLES3 to not use a relative path
Make the parameters more explicit and ensure the shaders generated are not using relative paths
2023-03-19 21:18:52 -07:00
Yuri Sizov
ded38c5d75
Merge pull request #73839 from clayjohn/OUTPUT_IS_SRGB
...
Clean up OUTPUT_IS_SRGB redefinitions
2023-03-16 13:03:37 +01:00
James Christie
68149328f1
Set value of line_point_count outside of initialization
2023-03-16 01:20:41 -04:00
Danil Alexeev
ba985ecf3f
Fix `draw_multiline_colors()` for `width < 0`
2023-03-14 09:43:56 +03:00
Rémi Verschelde
0333b4a266
Merge pull request #74708 from BastiaanOlij/fix_rd_texture
...
Merge duplicate rd_texture functions
2023-03-10 22:48:19 +01:00
Rémi Verschelde
0511da260f
Merge pull request #74019 from BastiaanOlij/split_last_effects
...
Move roughness limiter and sort into their own classes
2023-03-10 14:02:14 +01:00
Bastiaan Olij
70dca9ff55
Merge duplicate rd_texture functions
2023-03-10 21:37:01 +11:00
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
Rémi Verschelde
a9a75e643e
Merge pull request #68527 from pkdawson/vertex-array-offsets
...
Add `offsets` parameter to RenderingDevice::vertex_array_create
2022-11-21 11:43:28 +01:00
Markus Sauermann
28af870750
Code simplifications found by cppcheck
...
They are based on:
- Boolean arithmetic simplifications
- setting variables that are not accessed
- constant variables
2022-11-21 08:43:36 +01:00
Rémi Verschelde
137327812b
Merge pull request #68876 from dzil123/renderdummy_texture_replace_null_check
...
RenderDummy::TextureStorage::texture_replace add missing null check
2022-11-20 11:36:04 +01:00
Rémi Verschelde
3a43d44656
Merge pull request #68830 from Ayush-singla27/issuebranch
...
fixed incorrect mesh normals in shaders
2022-11-20 11:35:52 +01:00
clayjohn
0e5a98cdd8
Fix drawing of 2D skeletons in the RD renderer.
...
Also clean up skeleton code in preparation for adding them to GLES3
Properly update Mesh2D AABBs when skeleton is updated
2022-11-18 23:36:40 -08:00
dzil123
8000751d90
RenderDummy::TextureStorage::texture_replace add missing null check
2022-11-18 22:03:46 -08:00
Ayush Singla
75ba0a7957
fixed incorrect mesh normals in shaders
2022-11-19 11:06:03 +05:30
Rémi Verschelde
58cb11b396
Merge pull request #68710 from BastiaanOlij/fix_vrs
...
Fix VRS issues
2022-11-18 16:19:22 +01:00
Yuri Rubinsky
e8f9cd8ac5
Merge pull request #68808 from CherrySodaPop/global-instance-uniform
2022-11-18 09:49:49 +03:00
Lily Garcia
0683bc3783
Fix global uniforms parsed as instance uniform
2022-11-17 17:18:20 -05:00
clayjohn
21ac6d7d8e
Finish implementing Canvas Background mode
2022-11-17 12:51:26 -08:00
Rémi Verschelde
e1ead0fbd1
Merge pull request #68779 from dzil123/fix_renderdummy_mesh_surface_overflow
...
RendererDummy - Fix buffer overflow due to stale mesh_get_surface
2022-11-17 13:48:24 +01:00
dzil123
e9d213e0fd
RendererDummy fix buffer overflow due to mesh_get_surface
2022-11-17 03:41:55 -08:00
dzil123
8fab25f32f
GLES3 TextureStorage - add missing null checks
2022-11-16 23:31:59 -08:00
Bastiaan Olij
616ba8745f
Fix VRS issues
2022-11-17 00:32:42 +11:00
Rémi Verschelde
a6a6af32e2
Merge pull request #68718 from dzil123/fix_fog_shader_buffer_overflow
...
Fix shader compiler asan out of bounds
2022-11-16 09:23:16 +01:00
Yuri Rubinsky
5693286e90
Mark shader built-ins as used when passed to functions as out parameter
2022-11-15 22:06:16 +03:00
dzil123
6f0cd8072f
Fix Fog shader buffer overflow
2022-11-15 06:51:48 -08:00
Rémi Verschelde
245e6454a0
Merge pull request #68673 from clayjohn/RD-alpha-hash
...
Fix alpha hash by correcting typos and doing calculations in object space
2022-11-15 10:28:59 +01:00
Rémi Verschelde
5f78f24b08
Merge pull request #68426 from clayjohn/GLES3-particles
...
Add GPUParticles to the OpenGL3 renderer.
2022-11-15 10:28:44 +01:00
Rémi Verschelde
1e9a61cd40
Merge pull request #68487 from clayjohn/RD-mobile-raster
...
Use raster versions of copy effects for 2D operations when using the mobile renderer
2022-11-15 10:27:43 +01:00
Rémi Verschelde
64d7ce2a6e
Merge pull request #68628 from clayjohn/shadows
...
Implement is_animated and casts_shadows
2022-11-15 10:27:29 +01:00
clayjohn
9ce57050a5
Add GPUParticles to the OpenGL3 renderer.
...
This includes collision (2D SDF, Box, Sphere, Heightmap),
attraction (Box, Sphere), and all sorting modes.
This does not include 3D SDF collisions, trails, or
manual emission.
2022-11-14 23:28:25 -08:00
clayjohn
81d8b502cc
Fix alpha hash by correcting typos and doing calculations in object space
2022-11-14 17:57:49 -08:00
Rémi Verschelde
7a9a173a9f
Merge pull request #68339 from clayjohn/RD-shadow-acne
...
Scale light shadow bias by soft_shadow_scale to reduce shadow acne
2022-11-14 23:25:52 +01:00
Markus Sauermann
3b14f0334c
Remove redundant Variant-types initializations
2022-11-14 19:35:19 +01:00
Rémi Verschelde
63cded6a85
Merge pull request #61884 from Calinou/alpha-hash-use-opaque-pipeline
...
Use opaque rendering pipeline for alpha hash materials
2022-11-14 11:08:35 +01:00
clayjohn
4abf47f407
Implement is_animated and casts_shadows
...
This allows the renderer to correctly decide when to update shadow maps
This PR also adds TIME to a few missing places
2022-11-13 14:09:21 -08:00
Rémi Verschelde
9e97bc5857
Merge pull request #68574 from clayjohn/RD-shadow-time
...
Properly set TIME shader uniform when rendering shadows
2022-11-13 15:50:54 +01:00
clayjohn
aaaa4b8d68
Properly set TIME shader uniform when rendering shadows
2022-11-12 10:51:02 -08:00
Rémi Verschelde
014fac8f28
Merge pull request #67746 from SonnyBonds/fix_cluster_shader_mvk
...
Fix cluster_render.glsl failing on some Macs
2022-11-11 21:05:20 +01:00
Rémi Verschelde
c41b9c5f5b
Merge pull request #67972 from and-rad/vector-field-consistency
...
Fix inconsistency between vector field texture and world space directions
2022-11-11 21:05:00 +01:00
Patrick Dawson
d7136f2d51
Add `offsets` parameter to RenderingDevice::vertex_array_create
2022-11-11 15:45:36 +01:00
Rémi Verschelde
aae4b3d9d0
Merge pull request #68496 from clayjohn/RD-point
...
Ensure user shader is used in depth pass when point size is used
2022-11-11 10:54:55 +01:00
Rémi Verschelde
636d2189d0
Merge pull request #68511 from clayjohn/RD-mobile-sky
...
Enable mipmaps in cubemap roughness shader
2022-11-11 10:54:44 +01:00
Rémi Verschelde
e10f8cbf40
Merge pull request #68186 from pkdawson/expose-texture-rd
...
Expose texture_get_rd_texture for scripts
2022-11-11 10:43:57 +01:00
Rémi Verschelde
43f2213325
Merge pull request #68235 from pkdawson/pr-expose-vertex-array-create
...
Expose RenderingDevice::vertex_array_create to scripting
2022-11-11 10:43:35 +01:00
Rémi Verschelde
1691a33eb9
Merge pull request #67374 from MrBlockers/fix-draw-primitive
...
Fix draw_primitive ignoring texture argument
2022-11-11 10:43:18 +01:00
Rémi Verschelde
2608e71eca
Merge pull request #68425 from clayjohn/RD-doubles-particles
...
Fix GPUParticles not rendering in doubles build of the engine.
2022-11-11 10:42:24 +01:00
clayjohn
3ceb342d37
Enable mipmaps in cubemap roughness shader
2022-11-10 23:41:51 -08:00
clayjohn
a7adc7ab37
Ensure user shader is used in depth pass when point size is used
2022-11-10 15:26:07 -08:00
clayjohn
8e41221404
Use raster versions of copy effects for 2D operations when using the mobile renderer
...
This PR implements a few basic copy operations in raster that weren't available before
2022-11-10 12:47:26 -08:00
Yuri Rubinsky
dca5cb8e40
Merge pull request #68413 from Chaosus/fix_instance_uniforms
2022-11-09 22:55:41 +03:00
Yuri Rubinsky
c07d13182c
Some fixes for instance shader parameters
2022-11-09 21:20:11 +03:00
clayjohn
4aab9cbdfc
Fix GPUParticles not rendering in doubles build of the engine.
...
real_t was mistakenly used in uniform structs causing a mismatch between the GPU uniform and the CPU uniform
2022-11-09 08:58:04 -08:00
clayjohn
a1c3591461
Request redraw in OpenGL3 and mobile renderers when TIME used in shader
2022-11-08 22:52:11 -08:00
Rémi Verschelde
e2b39bfdc4
Merge pull request #68346 from Calinou/particles-rename-trail-length-property
...
Rename GPUParticles2D/3D's `trail_length_secs` to `trail_lifetime`
2022-11-07 15:05:55 +01:00
Hugo Locurcio
ab7a807f2b
Rename GPUParticles2D/3D's `trail_length_secs` to `trail_lifetime`
...
The property already has a "seconds" suffix in the inspector.
The "lifetime" term makes it more obvious that the property is
specified as time, not a distance in units.
The property hint now allows manually entering values greater than
10 seconds.
The internal rendering value's default now matches the particles
nodes' default.
2022-11-07 13:37:40 +01:00
Gábor Pál Korom
6865d2d002
Surface AABBs are now set for mesh surfaces even in headless mode. Sponsored by Migeran ( https://migeran.com ).
2022-11-07 12:53:03 +01:00
clayjohn
5f4a561f6c
Scale light shadow bias by soft_shadow_scale to reduce shadow acne on high quality settings
2022-11-06 10:49:55 -08:00
kobewi
1778301cd0
Add call_deferred() method to Callable
2022-11-04 17:24:34 +01:00
Patrick Dawson
e56fc6b338
Expose vertex_array_create
2022-11-03 22:14:55 +01:00
David Snopek
7fb8b931d7
Collapse three seperate texture storage methods into render_target_set_override()
2022-11-03 13:03:30 -05:00
Patrick Dawson
71d8de2763
Expose texture_get_rd_texture
2022-11-03 05:27:24 +01:00
Rémi Verschelde
2c0544a7b8
Merge pull request #67878 from clayjohn/RD-particles-amount
...
Correctly set number of particle dispatches when setting view axis
2022-11-03 00:32:20 +01:00
Rémi Verschelde
f7c611ab71
Style: Misc docs and comment style and language fixes
...
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Rémi Verschelde
604abb434f
Merge pull request #52350 from BimDav/viewport_canvas_cull
...
Added Viewport canvas cull mask feature
2022-11-02 17:14:24 +01:00
Rémi Verschelde
cb1931b271
Merge pull request #67639 from clayjohn/GLES3-2d-shadows
...
Add 2D shadows and canvas SDF to OpenGL3 renderer
2022-11-02 17:12:20 +01:00
Yuri Rubinsky
0a85d3b0cc
Fix predefined constants to be accessible in the shader includes
2022-11-01 19:53:05 +03:00
BimDav
fcb9be66a2
Viewport canvas cull mask feature
...
Co-authored-by: Valentin Zagura <puthre@gmail.com>
2022-10-31 14:09:49 +01:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
...
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Yuri Rubinsky
099f127cc3
Make code generation for shader boolean uniform instances easier
2022-10-31 11:52:52 +01:00
Rémi Verschelde
87545bf873
Merge pull request #67519 from BastiaanOlij/change_xr_pre_draw_viewport
...
Changing timing of call to xr_interface->pre_draw_viewport
2022-10-31 11:08:34 +01:00
Rémi Verschelde
3312d0a87b
Merge pull request #67907 from clayjohn/RD-model-matrix
...
Correctly rename to read_model_matrix when using shader builtins that rely on model matrix
2022-10-31 11:07:24 +01:00
Rémi Verschelde
d147adc591
Merge pull request #67915 from RevoluPowered/fix-intel-macbook-crash-subgroups
...
Ensure vulkan subgroups are disabled for MoltenVK
2022-10-31 10:53:30 +01:00
Yuri Rubinsky
11e1bac768
Merge pull request #67112 from Chaosus/fix_boolean_uniform_instances
2022-10-28 23:17:23 +03:00
clayjohn
2ec234ff67
Add 2D shadows and canvas SDF to OpenGL3 renderer
...
This is an initial implementation based on the current RD implementation
Performance will improve later
2022-10-28 11:33:23 -07:00
Yuri Rubinsky
468762b3b7
Merge pull request #67498 from Chaosus/fix_shader_crash
2022-10-28 09:25:07 +03:00
clayjohn
31c1a06ab5
Fix ss_effects_flags uniform in clustered forward renderer
...
This comes from an uncaught merge conflict resulting from the split of scene_data into
scene_data and implementation_data
2022-10-27 15:37:38 -07:00
Clay John
0d711cad30
Merge pull request #66107 from devloglogan/ambient-light-disabled-fix
...
Fix ambient_light_disabled render mode flag
2022-10-27 10:08:29 -07:00
Clay John
8fd92ed867
Merge pull request #64710 from MinusKube/window-size-crash
...
Prevent windows from having a size greater than device limit
2022-10-27 10:02:44 -07:00
Clay John
e1caa8797b
Merge pull request #67043 from clayjohn/clip_children
...
Improve behaviour of clip_children by clipping to parent alpha value but still retaining parent color
2022-10-27 09:59:27 -07:00
Clay John
682156e1f0
Merge pull request #66383 from aaronfranke/basis-from-euler
...
Clean up Basis from Euler code
2022-10-27 09:44:21 -07:00
Andreas Raddau
a5828cd0e3
Improved consistency between vector field texture and world space
2022-10-27 15:43:24 +02:00
Gordon MacPherson
381d457a2a
Ensure vulkan subgroups are disabled for MoltenVK
...
We found they don't work on intel macbooks properly at all.
Possible future solutions:
- update to moltenvk.
- update to spirv may resolve it.
2022-10-26 20:12:06 +01:00
Gordon MacPherson
56df8d5f19
Fix EXE_BAD_ACCESS caused by optional argument
...
This argument is now non optional, but this never hits the same bad access.
I voted to simplify the code here since the argument is never used optionally in our codebase.
2022-10-26 19:33:35 +01:00
clayjohn
020ac29fc3
Correctly rename to read_model_matrix when using shader builtins that rely on model matrix
2022-10-26 09:45:35 -07:00
clayjohn
3d28cb3cd3
Correctly set number of particle dispatches when setting view axis
2022-10-25 12:05:40 -07:00
Anders Stenberg
bbb1f900dd
Fix cluster_render.glsl failing on some Macs
...
Some Macs encounter an internal error when compiling cluster_render.glsl
caused by a likely bug in the MVK/Metal
compiler when using gl_HelperInvocation.
2022-10-22 12:27:13 +02:00
MrBlockers
0c4fd03f40
Fix draw_primitive ignoring texture argument
2022-10-21 21:35:13 -04:00
Aaron Franke
7f9a8c99c9
Clean up Basis from Euler code
2022-10-21 17:54:49 -05:00
kobewi
e48c5daddf
Unify usage of GLOBAL/EDITOR_GET
2022-10-18 19:01:48 +02:00
Markus Sauermann
b8031bb7d6
Code simplifications
...
1. Viewport::get_visible_rect().position is always zero.
So Control::get_window_rect is identical to Control::get_global_rect.
Remove Control::get_window_rect since it is not used in the source code.
2. sqrt(a * a) = abs(a) for doubles
3. Simplify affine_inverse combination
4. Simplify calculation in shaders
2022-10-18 12:47:40 +02:00
Bastiaan Olij
b742b4c6e6
Changing timing of call to xr_interface->pre_draw_viewport
2022-10-17 14:19:01 +11:00
Yuri Rubinsky
926d4ebb28
Fix editor crash when assigning some uniform hints to the textures
2022-10-16 19:55:08 +03:00
clayjohn
b6f44859d7
Implement multiple clip_children modes for CanvasItems
2022-10-14 08:02:28 -07:00
kobewi
072f6feaba
Make some Image methods static
2022-10-14 14:34:15 +02:00
clayjohn
09b1a6f85f
Improve behaviour of clip_children by clipping
...
to parent alpha value, but still retaining
parent color
2022-10-13 18:35:12 -07:00
Rémi Verschelde
367a9b8056
Merge pull request #67335 from clayjohn/GLES3-2d-lights
...
Add 2D lights to OpenGL3 canvas renderer
2022-10-13 09:05:36 +02:00
Rémi Verschelde
0aa2d70613
Merge pull request #67320 from Calinou/fix-volumetric-fog-low-density
...
Fix volumetric fog not rendering at densities lower than or equal to 0.001
2022-10-13 09:05:30 +02:00
Rémi Verschelde
f2bd389e21
Merge pull request #67307 from TechnoPorg/lod-radial-distance
...
Use radial distance for making LOD decisions.
2022-10-13 09:05:00 +02:00
clayjohn
e600fb93a5
Add 2D lights to OpenGL3 canvas renderer
...
This is an initial implementation using the same single-pass approach as the RenderingDevice.
2022-10-12 17:55:01 -07:00
Hugo Locurcio
6aebc7b66e
Fix volumetric fog not rendering at densities lower than or equal to 0.001
...
This allows volumetric fog to render with the lowest density that
can be specified in the inspector (0.0001).
2022-10-13 00:45:49 +02:00
TechnoPorg
b04350828e
Use radial distance for making LOD decisions.
...
Previously, only forward basis distance from the camera was used.
This means that unnecessarily high LOD levels were used for objects located to the side of the camera.
The distance from the camera origin is now used, independently of direction.
2022-10-12 07:21:42 -06:00
Clay John
18d2035a3d
Merge pull request #67110 from Chaosus/fix_incorrect_vec3_ubo_fill
...
Fix incorrect offset for vec3 datatypes in `_fill_std140_ubo_empty`
2022-10-11 12:24:48 -07:00
Rémi Verschelde
6da55cd94b
Merge pull request #67270 from RandomShaper/slim_usage_msaa_attachment
...
Restrict MSAA attachment usage to the strictly needed set
2022-10-11 21:16:11 +02:00
Pedro J. Estébanez
ee91531998
Restrict MSAA attachment usage to the strictly needed set
2022-10-11 20:33:21 +02:00
Rémi Verschelde
6d534f6e89
Merge pull request #66221 from Mickeon/painstakingly-appending-ds-en-you-tea-es
...
Rename remaining "*_enable" to "*_enabled"
2022-10-11 16:17:02 +02:00
Rémi Verschelde
422c398962
Merge pull request #67176 from cooperra/negative-scale-culling-fix
...
Vulkan Clustered: Fix culling of negatively-scaled objects
2022-10-11 09:27:34 +02:00
Rémi Verschelde
58eff50bf1
Merge pull request #64268 from timothyqiu/is-finite
...
Add `is_finite` method for checking built-in types
2022-10-11 09:25:46 +02:00
Rémi Verschelde
3306ffefd1
Merge pull request #67000 from RandomShaper/split_render_further
...
Polish rendering driver refactor further
2022-10-11 09:23:32 +02:00
Rémi Verschelde
8017827144
SCons: Re-enable treating `#warning` as error with `werror`
...
Replace all TODO uses of `#warning` by proper TODO comments, and will open
matching bug reports to keep track of them.
We don't have a great track record fixing TODOs, but I'd wager we're even
worse for fixing these "TODO #warning" so we should prohibit this usage.
2022-10-10 16:12:26 +02:00
Robbie Cooper
79d3e090cd
Vulkan Clustered: Fix culling of negatively-scaled objects
...
Negatively scaled objects should be mirrored. This is already implemented, but it breaks when mirrored and non-mirrored instances of the same object are visible together.
It turns out that the code that skips-over repeats in `RenderForwardClustered::_render_list_template` also skips the code that accounts for the culling mode of mirrored objects.
The solution here is to consider the `mirror` flag when determining repeats. This might result in more draw commands than necessary since a mirrored object can split a group of non-mirrored instances in two.
This problem doesn't appear in the mobile renderer because the repeat optimization isn't implemented there yet.
The problem still appears in MultiMeshInstance3D in *all* renderers.
Fixes #62879 and #58546 .
2022-10-10 03:20:59 -04:00
Yuri Rubinsky
f4db4bb7a2
Fix incorrect setup of boolean uniform instances
2022-10-09 08:50:18 +03:00
Yuri Rubinsky
816600382e
Fix incorrect offset for vec3 datatypes in `_fill_std140_ubo_empty`
2022-10-09 06:32:50 +03:00
Rémi Verschelde
658929997d
Merge pull request #67051 from clayjohn/CanvasGroup-clear
...
Allow clearing backbuffer after finishing CanvasGroup
2022-10-08 13:55:48 +02:00
Haoyu Qiu
5da515773d
Add `is_finite` method for checking built-in types
2022-10-08 13:25:08 +08:00
clayjohn
4765e5fa64
Allow clearing backbuffer after finishing CanvasGroup
...
This avoids an issue where having multiple CanvasGroups overlap
would create a weird artifact
2022-10-07 14:13:40 -07:00
clayjohn
7465455079
Fix material overlay overriding shadow casting logic
...
Material overlay should only cast a shadow if it can cast a shadow and
the instance can cast a shadow
2022-10-07 10:15:39 -07:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4.
2022-10-07 11:32:33 +03:00
Rémi Verschelde
29f017378e
Merge pull request #66861 from clayjohn/GLES3-mono-ubo
...
Use a giant UBO to optimize performance in 2D [OpenGL3]
2022-10-07 09:14:13 +02:00
Rémi Verschelde
17c62a692e
Merge pull request #66756 from BastiaanOlij/fix_ssr
...
Fixing artifacts in SSR
2022-10-06 22:27:49 +02:00
Pedro J. Estébanez
24ff292999
Polish rendering driver refactor further
...
Mainly:
- Make `max_descriptors_per_pool` project setting Vulkan-specific.
- Use a common, render driver agnostic magic FourCC for shader binary data.
- Downgrade spirv_reflect to Vulkan-only dependency.
- Add a `RENDER_DRIVER_*` macro to GLSL shader code for per-driver customizations.
2022-10-06 21:08:54 +02:00
clayjohn
154b9c1c91
Use a giant UBO to optimize performance in 2D
...
This removes the countless small UBO writes we had before
and replaces them with a single large write per render pass.
This results in much faster rendering on low-end devices
but improves speed on all devices.
2022-10-06 11:24:45 -07:00
Rémi Verschelde
d935235e9c
Merge pull request #66922 from BastiaanOlij/fix_direct_shadow
...
Make sure atlas rect for directional lights is calculated using floats
2022-10-05 13:38:24 +02:00
Bastiaan Olij
aba356e882
Make sure atlas rect for directional lights is calculated using floats
2022-10-05 22:12:57 +11:00
Rémi Verschelde
ecd4ab1e14
Merge pull request #66683 from clayjohn/SRGB-canvasitem
...
Default CanvasItem materials to use sRGB space for uniform colors
2022-10-05 11:44:52 +02:00
Rémi Verschelde
3a2b0ab73d
Merge pull request #66898 from aaronfranke/proj-mat-columns
...
Rename Projection `matrix` to `columns`
2022-10-05 08:35:26 +02:00
Bastiaan Olij
c7656978ba
Adding getters to RenderTarget and implementing override functionality for XR
2022-10-05 11:37:49 +11:00
Aaron Franke
2cea42cc7f
Rename Projection `matrix` to `columns`
2022-10-04 12:34:19 -05:00
Bastiaan Olij
d09ad714bf
Fixing artifacts in SSR
2022-10-04 23:47:13 +11:00
Rémi Verschelde
e5aa5eb806
Merge pull request #66780 from dsnopek/webxr-emulator-fix
...
Fix rendering in the WebXR emulator
2022-10-04 12:21:27 +02:00
Bastiaan Olij
02b0c22e38
Moving SSEffects settings into class
2022-10-04 11:03:36 +11:00
Bastiaan Olij
ddc4ae1175
Move cluster builder, sdfgi and gi structures to clustered renderer, move light and probe elements into storage and reorganise our render_scene method.
2022-10-04 11:03:32 +11:00
Yuri Rubinsky
a2c32590ee
Fix global uniform crash at editor startup
2022-10-03 15:06:20 +03:00
clayjohn
3126619aa5
Update Instance flags in shaders to match instance flags in engine
2022-10-02 21:37:06 -07:00
David Snopek
ec5c4709bd
Fix rendering in the WebXR emulator
2022-10-02 13:49:53 -05:00
clayjohn
06d0e56559
Default CanvasItem materials to not convert uniform colors to linear space.
...
The 2D renderer in Godot is totally in sRGB space so it is appropriate
to keep 2D uniform colors in sRGB space
2022-09-30 15:15:11 -07:00
Rémi Verschelde
166df0896c
Fix typos with codespell
...
Using codespell 2.3-dev from current git.
And fix typo in `methods.py` for `vsproj=yes` option (still won't work
though).
2022-09-30 14:23:36 +02:00
Rémi Verschelde
67961d875d
Merge pull request #66178 from clayjohn/double-precision-rendering
...
Emulate double precision for regular rendering operation when REAL_T_IS_DOUBLE
2022-09-30 09:59:45 +02:00
Rémi Verschelde
fe40c52be8
Merge pull request #66638 from timothyqiu/rendering-null
...
Add various null checks in RenderingServer
2022-09-30 09:58:58 +02:00
Rémi Verschelde
7a0500d9a3
Merge pull request #66626 from danboo/fix-typo-run-debug-collisons
...
Fix typos - "collison" -> "collision"
2022-09-30 09:58:25 +02:00
Haoyu Qiu
ffdac72eaa
Add various null checks in RenderingServer
2022-09-30 10:18:14 +08:00
danboo
eba8be6e45
Fix typo - "collison" -> "collision"
2022-09-29 13:56:26 -08:00
Rémi Verschelde
6991e9b43d
Merge pull request #66583 from bruvzg/constexpr
...
Use `constexpr` in the conditions with template parameters and `sizeof`s to suppress C4127 warnings.
2022-09-29 10:44:22 +02:00
Rémi Verschelde
315a71103e
Merge pull request #66565 from clayjohn/canvas-lights
...
Clean up canvas light shader API.
2022-09-29 10:43:42 +02:00
bruvzg
ea1848ce0a
Use `constexpr` in the conditions with template parameters and `sizeof`s to suppress C4127 warnings.
2022-09-29 10:38:21 +03:00
Rémi Verschelde
e5857bd6c7
Merge pull request #66548 from akien-mga/msvc-warnings-c4701-c4703
...
Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used
2022-09-28 20:47:50 +02:00
clayjohn
1a0890122f
Clean up canvas light shader API.
...
Expose LIGHT_ENERGY and LIGHT_IS_DIRECTIONAL.
Add LIGHT_DIRECTION
2022-09-28 11:46:58 -07:00
Rémi Verschelde
85fe6ecc32
Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used
2022-09-28 17:05:34 +02:00
Rémi Verschelde
7ab01450cf
Fix MSVC warning C4702: unreachable code
...
Part of #66537 .
2022-09-28 16:46:48 +02:00
Rémi Verschelde
b8870b91b5
Merge pull request #66466 from clayjohn/FXAA-fix
...
Take FXAA samples from half-pixel coordinates to improve quality
2022-09-27 09:58:22 +02:00
Rémi Verschelde
2ad63f68b3
Merge pull request #66370 from bitbrain/fix-light2d-blend-modes
...
Fix broken 2D light blending, addresses #49922
2022-09-27 09:57:44 +02:00
Rémi Verschelde
5ecaa676cc
Merge pull request #66317 from clayjohn/debanding-bug
...
Move deband to end of tonemapping.
2022-09-27 09:54:45 +02:00
clayjohn
dbcc0fa2a6
Take FXAA samples from half-pixel coordinates to improve quality
2022-09-26 11:54:29 -07:00
Yuri Rubinsky
344aa610e3
Add defines to completion list in shaders
2022-09-26 16:04:19 +03:00
Rémi Verschelde
5ae6379e5d
Merge pull request #66394 from bitbrain/fix-unshaded-canvas-modulate
...
Fix Unshaded CanvasItem for Vulkan
2022-09-26 08:24:45 +02:00
Bastiaan Olij
56d6a13fd7
Make dependencies with shader includes in subfolders
2022-09-26 12:29:19 +10:00
Miguel Gonzalez Sanchez
125f0be8b7
do not apply modulate on canvas when unshaded is set
2022-09-25 12:13:46 +01:00
Miguel Gonzalez Sanchez
2047be4516
fix broken 2D light blending, addresses #49922
2022-09-24 20:13:12 +01:00
clayjohn
fe69fedc1a
Move deband to end of tonemapping.
...
This avoids artifacts when using adjustments and color correction
2022-09-23 11:46:40 -07:00
Rémi Verschelde
03410efa15
Merge pull request #66284 from clayjohn/particles-mem-bug
...
Properly initialize motion vectors offset when motion vectors are disabled
2022-09-23 09:45:48 +02:00
clayjohn
aac8d5c406
Properly initialize motion vectors offset when motion vectors are disabled.
...
This fixes an uninitialized memory bug that caused particles to fail in non-LTO builds
2022-09-22 20:36:01 -07:00
Rémi Verschelde
d1a155e3cd
Fix various -Wmaybe-uninitialized warnings from GCC 12.2.1
...
Not sure why I didn't get those before, it may be due to upstream
changes (12.2.1 is a moving target, it's basically 12.3-dev), or simply
rebuilding Godot from scratch with different options.
2022-09-22 11:29:48 +02:00
Micky
c1b5b68eee
Rename remaining "*_enable" to "*_enabled"
...
Material.`proximity_fade_enable` -> `proximity_fade_enabled`
Material.`set_proximity_fade` -> `set_proximity_fade_enabled`
(Material.`is_proximity_fade_enabled` is unchanged)
Area3D.`reverb_bus_enable` -> `reverb_bus_enabled`
(`set_use_reverb_bus` & `is_using_reverb_bus` are unchanged)
RDPipelineRasterizationState:
`depth_bias_enable` -> `depth_bias_enabled`
`set_depth_bias_enable` -> `set_depth_bias_enabled`
`get_depth_bias_enable` -> `get_depth_bias_enabled`
Bonus:
Area3D.`set_reverb_bus` -> `set_reverb_bus_name`
Area3D.`get_reverb_bus` -> `set_get_reverb_bus_name`
2022-09-21 22:47:46 +02:00
clayjohn
27a3014f50
Emulate double precision for regular rendering operation.
...
We calculate the lost precision on the CPU and pass it into the GPU
so that it can calculate an error-corrected version of the vertex position
2022-09-20 23:40:01 -07:00
Rémi Verschelde
7da532275b
Merge pull request #65541 from clayjohn/renderer-setting
...
Split rendering driver project setting into renderer_name and rendering_driver
2022-09-20 09:43:59 +02:00
Logan Lang
e61d8b6f53
enabled ambient_light_disabled render mode flag
2022-09-19 17:12:32 -05:00
Rémi Verschelde
effddbcf12
Merge pull request #66065 from kidinashell/issue-59488
...
SpotLight3D's and OmniLight3D's Projector doesn't work
2022-09-19 22:02:17 +02:00
clayjohn
4a1c7de57c
Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer).
2022-09-19 10:26:10 -07:00
Tobias Widner
422bacbfd1
Fix Vulkan: SpotLight3D's and OmniLight3D's Projector doesn't work
2022-09-19 17:18:45 +02:00
Rémi Verschelde
49891e4c2f
Merge pull request #65915 from clayjohn/VULKAN-mobile-fog
...
Restore fog in vulkan mobile renderer.
2022-09-19 09:23:24 +02:00
clayjohn
2ecc8b9a73
Restore fog in vulkan mobile renderer.
...
The condition accidentally disabled fog whenever it was enabled
2022-09-16 09:18:11 -07:00
Rémi Verschelde
bda63e1b5a
Merge pull request #65833 from JFonS/taa_fix_particles_errors
...
Fix error spam in the renderer when using GPUParticles3D
2022-09-16 11:59:00 +02:00
JFonS
b668268772
Fix error spam in the renderer when using GPUParticles3D
...
The flag INSTANCE_DATA_FLAG_MULTIMESH is used for both multimesh and particles instances, this commit adds a new INSTANCE_DATA_FLAG_PARTICLES flag to discriminate between them.
This flag will also be used in the future to properly support TAA in particles.
2022-09-16 09:44:22 +02:00
Rémi Verschelde
848668ed45
Merge pull request #65794 from Geometror/fix-canvas-backbuffer
...
Fix/restore BackBufferCopy
2022-09-16 09:20:04 +02:00
Clay John
95df3e7c88
Merge pull request #65800 from dsnopek/xr-resize-viewport-3
...
Fix XR rendering in 'opengl3' driver and expose true size via the Viewport node
2022-09-15 18:19:24 -07:00
Bastiaan Olij
02ea1de7d0
Extract shared scene data into a separate class
2022-09-15 12:09:57 +10:00
David Snopek
e82cd46a74
Fix XR rendering in 'opengl3' driver and expose true size via the Viewport node
2022-09-14 20:55:56 -05:00
Hendrik Brucker
e235bca995
Fix/restore BackBufferCopy
2022-09-15 02:36:39 +02:00
Rémi Verschelde
ecaa7b634e
Merge pull request #65322 from ceLoFaN/fix-dof-artifact-at-high-blur
2022-09-15 00:03:40 +02:00
Rémi Verschelde
0a0843a67d
Merge pull request #65654 from JohanAR/emit_subparticle_from_start
...
Allow emit_subparticle from start function
2022-09-14 19:07:33 +02:00
Rémi Verschelde
957aa79ce0
Merge pull request #65789 from clayjohn/sky-update-bug
...
Clear last frame directional light buffer when number of lights changes.
2022-09-14 19:06:19 +02:00
Clay John
f709596631
Merge pull request #65418 from JFonS/taa_multimesh
...
Add motion vectors support for MultiMeshInstance
2022-09-14 09:06:27 -07:00
clayjohn
72d899702b
Clear last frame directional light buffer when number of lights changes.
...
This ensures that the buffers don't go out of sync.
2022-09-14 08:30:35 -07:00
clayjohn
8fa76a5272
Move debanding into internal sky shader code so that it is applied after everything else.
...
This ensures that the debanding does not scale with exposure or any other effect.
2022-09-13 10:39:04 -07:00
Rémi Verschelde
22a09fef5d
Merge pull request #65579 from ZuBsPaCe/fix-viewport-sibling-order
...
Sibling SubViewports must be rendered from top to bottom
2022-09-13 11:01:33 +02:00
Rémi Verschelde
b853110890
Merge pull request #65653 from Chaosus/shader_completion_fix
2022-09-13 10:44:41 +02:00
Rémi Verschelde
0f3f8509ec
Merge pull request #65738 from BastiaanOlij/fix_ssao_ssil_memory_leak
2022-09-13 10:25:11 +02:00
Bastiaan Olij
873366cb2d
Fix uniform buffer being created every frame is SSAO and SSIL half_size is different
2022-09-13 17:49:32 +10:00
clayjohn
96b7cb66df
Fix multiwindow support in GLES3 for X11, Windows, and MacOS.
...
Instead of updating all viewports, then blitting all viewports
to the backbuffer, then swapping all buffers, we run through
all viewports and render, blit, and swap backbuffer before
going to the next viewport.
2022-09-12 17:30:50 -07:00
Rémi Verschelde
79b21e96ad
Merge pull request #65544 from clayjohn/lambert-wrap
...
Apply energy conservation to LAMBERT_WRAP diffuse mode by dividing by PI
2022-09-12 20:42:27 +02:00
clayjohn
97be1fb7b6
Apply energy conservation to LAMBERT_WRAP and TOON diffuse modes by dividing by PI
2022-09-12 08:45:40 -07:00
jfons
74cdee4cb5
Add motion vectors support for MultiMeshInstance
...
Transparently handle changes in multimesh transforms so they get reflected in the motion vectors buffer.
2022-09-12 15:28:12 +02:00
Rémi Verschelde
f211869530
Merge pull request #65594 from clayjohn/SSR-dialectric
2022-09-12 14:23:04 +02:00
Bastiaan Olij
b519d7619c
Fixed MSAA initialisation in clustered forward renderer
2022-09-12 11:07:51 +10:00
Yuri Rubinsky
e4a8646c19
Prevent duplicated hints in shader uniform completion
2022-09-11 15:21:43 +03:00
Johan Aires Rastén
ddfa214d89
Allow emit_subparticle from start function
...
emit_subparticle was previously only allowed from the process function
in a particle shader, which seemed like an unnecessary limitation.
2022-09-11 14:02:36 +02:00
clayjohn
65f0113bc6
Properly scale SSR reflection based on metallic value for dielectric materials
2022-09-09 16:52:02 -07:00
ZuBsPaCe
3d08678e13
Sibling SubViewports must be rendered from top to bottom
...
Sibling SubViewports must be rendered in the same order as in the Scene Tree, from top to bottom. _sort_active_viewports() reversed their order.
Fixes #65545
2022-09-09 17:50:14 +02:00
Yuri Rubinsky
d1be14a9cb
Merge pull request #65473 from Chaosus/shader_fix_completion
2022-09-07 21:23:39 +03:00
Haoyu Qiu
eea02e50a7
Fix crash when executing `VisualShaderNodeParticleMeshEmitter.set_mesh` with headless Godot
2022-09-07 21:31:16 +08:00
Yuri Rubinsky
47145800a6
Remove `shader_type` from completion (when it does not need any more)
2022-09-07 16:19:36 +03:00
Rémi Verschelde
5062aafc2d
Merge pull request #64417 from aaronfranke/has-space
...
Replace AABB/Rect2/Rect2i has_no_* methods with has_* methods
2022-09-06 17:00:44 +02:00
ceLoFaN
e844b95eaf
Fix DoF artifacting at high blur amounts
2022-09-05 21:38:40 +03:00
Aaron Franke
817ae95667
Replace AABB has_no_volume with has_volume
...
Also replace has_no_surface with has_surface
2022-09-04 23:03:36 -05:00
Haoyu Qiu
52f290ae4d
Fix crash when executing `CSGMesh3D.set_mesh` with headless Godot
2022-09-05 09:15:22 +08:00
MinusKube
f5a808192b
Prevent windows from having a size greater than device limit
2022-09-04 22:48:54 +02:00
Rémi Verschelde
3a62c294c7
Merge pull request #65170 from KoBeWi/your_argument_is_TypedArray
2022-09-02 13:57:02 +02:00
Rémi Verschelde
c82bbc38a5
Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param
2022-09-02 13:49:53 +02:00
Rémi Verschelde
d63c6fc463
Merge pull request #60185 from Calinou/environment-fog-and-sky-affect
2022-09-01 23:52:34 +02:00
Hugo Locurcio
699e9f7966
Add Environment properties to control fog rendering on background sky
...
Values lower than 1.0 can be used to make the fog rendering not fully
obstruct the sky. This can be desired when using fog as a purely
atmospheric effect, without intending to use fog for open world fog
fading.
When set to 0.0, fog rendering behavior will be similar to Godot 3.x
where sky rendering was never affected by fog.
2022-09-01 19:07:39 +02:00
kobewi
7adc8376ed
Change Array arguments to TypedArray
2022-09-01 13:13:19 +02:00
Bastiaan Olij
2cd84be64d
Extracting render buffers and changing it to a more generic solution
2022-09-01 20:01:45 +10:00
Yuri Rubinsky
8191b3c110
Rename `uniform` to `parameter` across the engine
2022-09-01 11:42:57 +03:00
clayjohn
385ee5c70b
Implement Physical Light Units as an optional setting.
...
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.
In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 -07:00
Rémi Verschelde
c40855f818
Merge pull request #65130 from BastiaanOlij/fix_mobile_signed_tangent
...
Fix vector type for signed tangent in mobile shader
2022-08-31 09:12:31 +02:00
Rémi Verschelde
d58a1d65a9
Merge pull request #63413 from Calinou/volumetric-fog-add-per-light-energy-2
...
Add a per-light volumetric fog energy property
2022-08-31 08:47:03 +02:00
Bastiaan Olij
708222bb9a
Fix vector type for signed tangent in mobile shader
2022-08-31 16:35:54 +10:00
Haoyu Qiu
ad6d6a7893
Remove unnecessary `print_line` in RendererDummy
2022-08-31 09:44:02 +08:00
Hugo Locurcio
09bedcead4
Add a per-light volumetric fog energy property
...
Per-light energy gives more control to the user on the final result of
volumetric fog. Specific lights can be fully excluded from volumetric fog
by setting their volumetric fog energy to 0, which improves performance
slightly. This can also be used to prevent short-lived dynamic effects
from poorly interacting with volumetric fog, as it's updated over several
frames by default unless temporal reprojection is disabled.
Volumetric fog shadows now obey Light3D's Shadow Opacity property as well.
The shadow fog fade property was removed as it had little visible impact
on the final scene's rendering.
2022-08-30 20:03:38 +02:00
Rémi Verschelde
c1b178be38
Merge pull request #65068 from BastiaanOlij/fix_dummy_mesh_allocation
2022-08-30 19:49:36 +02:00
Rémi Verschelde
02d510bd07
Merge pull request #63003 from Geometror/msaa-2d
2022-08-30 14:54:20 +02:00
Bastiaan Olij
9efff344b8
Dummy mesh support was added to the dummy renderer but incomplete. This completes it
2022-08-30 16:28:39 +10:00
Aaron Franke
10a56981dc
Rename String `plus_file` to `path_join`
2022-08-29 19:38:13 -05:00
sakrel
728fb6ea95
Fix updating OccluderPolygon shapes
2022-08-29 03:51:53 +02:00
Rémi Verschelde
4808d01b2b
Merge pull request #64223 from Calinou/taa-fxaa-use-negative-mipmap-lod-bias
...
Automatically use negative mipmap LOD bias when TAA and/or FXAA are enabled
2022-08-26 23:11:25 +02:00
Rémi Verschelde
f9f2446972
Merge pull request #64367 from Mickeon/rename-var-to-str
...
Rename `str2var` to `str_to_var` and similar
2022-08-26 23:04:06 +02:00
Micky
59e11934d8
Rename `str2var` to `str_to_var` and similar
...
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.
- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`
- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
Rémi Verschelde
7013c68619
Merge pull request #64422 from bruvzg/make_fonts_unbearably_ugly_2.0
2022-08-26 11:59:07 +02:00
Micky
723bf85145
Rename ParticlesMaterial to ParticleProcessMaterial
...
Also affects their file names, related classes and documentation.
2022-08-26 02:53:08 +02:00
Hugo Locurcio
45bc1a3790
Automatically use negative mipmap LOD bias when TAA and/or FXAA are enabled
...
This improves texture sharpness when TAA and/or FXAA are enabled,
without requiring manual user intervention.
2022-08-25 19:38:18 +02:00
Rémi Verschelde
5d78ab4388
Merge pull request #64749 from tefusion/fix_skeleton_editor_mesh_free_errors
...
Fix typo in RendererSceneCull which caused mesh_free errors
2022-08-25 18:54:25 +02:00
Yuri Rubinsky
d4a10e7e04
Allow using integer varyings with `flat` interpolation modifier
2022-08-25 13:21:02 +03:00
Rémi Verschelde
91e5f48ea7
Merge pull request #64009 from KoBeWi/arrayy_lmao
...
Replace Array return types with TypedArray (part 2)
2022-08-24 08:18:56 +02:00
kobewi
1abdffe7a0
Replace Array return types with TypedArray 2
2022-08-23 23:21:32 +02:00
Rémi Verschelde
8317ff74d6
Merge pull request #63091 from MinusKube/editor-window-render-bug
2022-08-23 12:59:34 +02:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support.
2022-08-23 08:47:21 +03:00
tefusion
a2c422a6da
Fix typo in RendererSceneCull
...
Frees skeleton 3d gizmo now correctly
2022-08-22 22:09:56 +02:00
Rémi Verschelde
7b4927bb5f
Merge pull request #60309 from The-O-King/oct
2022-08-22 19:29:21 +02:00
Omar El Sheikh
61522d8491
Add Blendshape Support
...
Update the blendshape shader to decode/encode octahedral normals
2022-08-20 20:59:28 -07:00
Hugo Locurcio
0c5f254956
Merge pull request #64110 from Geometror/fix-light-shadow-off
2022-08-20 17:06:03 +02:00
Yuri Rubinsky
499fd0a4e7
Add `defined` keyword support to shader preprocessor
2022-08-20 11:26:59 +03:00
Max Hilbrunner
5e0d2b5097
Merge pull request #62046 from clayjohn/vertexless-draw
...
Allow creating meshes without vertex positions
2022-08-20 05:32:28 +02:00
Hendrik Brucker
18585c69b3
Fix OmniLight/SpotLight shadow opacity calculation
2022-08-20 01:05:44 +02:00
clayjohn
bbbcdd725a
Remove requirement to have vertex positions when creating a mesh. Meshes can now be constructed from an index buffer alone
2022-08-19 14:50:12 -06:00
Yuri Rubinsky
8779f51a5e
Merge pull request #63960 from bitsawer/fix-macro-expansion
2022-08-19 23:37:47 +03:00
Max Hilbrunner
019d6584ee
Merge pull request #64167 from clayjohn/screen-texture-hint
...
Add shader uniform hints for screen textures
2022-08-19 21:51:39 +02:00
Max Hilbrunner
117c530e1d
Merge pull request #64342 from clayjohn/DOF-scale
...
Properly scale depth in bokeh_dof effect
2022-08-19 21:16:32 +02:00
Yuri Rubinsky
35cfaafda8
Merge pull request #64459 from Chaosus/shader_elif
2022-08-19 07:01:22 +03:00
Aaron Franke
f91934872d
Use a const ref for the bone AABB in rendering code
2022-08-18 12:20:11 -05:00
Clay John
982ff7d925
Merge pull request #64416 from aaronfranke/aabb
...
Don't try to merge unused bone AABBs in the rendering server
2022-08-17 23:56:05 -06:00
Yuri Rubinsky
13ab70ed2a
Add `elif` directive to shader preprocessor
2022-08-15 22:06:49 +03:00
Aaron Franke
e0d80b37e9
Don't try to merge unused bone AABBs in the rendering server
2022-08-14 23:30:48 -05:00
Yuri Rubinsky
22df2c527b
Implement coloring for disabled branches in the shader editor
2022-08-14 13:57:26 +03:00
Omar El Sheikh
78881b3cc3
Octahedral Normal/Tangent Compression
...
Implementation of Octahedral normal compression into Godot 4.0
2022-08-13 08:09:32 -07:00
Hendrik Brucker
e96b1a2c0c
Implement MSAA for 2D [Vulkan only]
2022-08-13 01:09:48 +02:00
clayjohn
7d6287f616
Properly scale depth in bokeh_dof effect so that setting distance to blur effect is accurate again
2022-08-12 16:39:05 -06:00
Yuri Rubinsky
f2a6168414
Merge pull request #64310 from Chaosus/shader_texture_funcs
2022-08-12 21:28:22 +03:00
Yuri Rubinsky
e21aad968d
Add `textureQueryLod/Levels` functions to the shader language
2022-08-12 20:44:57 +03:00
Yuri Rubinsky
7822fbc9e2
Add `textureProjGrad` function to the shader language
2022-08-12 12:01:37 +03:00
Hugo Locurcio
ff9118d103
Merge pull request #64225 from Calinou/3d-scaling-bilinear-use-negative-mipmap-bias
2022-08-11 21:41:37 +02:00
clayjohn
7c848ee591
Detect if VRS supported before creating default VRS texture
2022-08-10 13:27:19 -06:00
Hugo Locurcio
b06890c2b7
Use negative mipmap LOD bias for sub-native bilinear 3D scale
...
This provides a benefit similar to FSR 1.0 (greater texture sharpness
at the cost of some graininess at sub-native resolution scales), but
without the added performance cost of FSR 1.0.
2022-08-10 17:16:02 +02:00
MinusKube
be09a87ff9
Fix viewport sorting being wrong on parent/child relation
2022-08-10 01:23:23 +02:00
clayjohn
028ef2edc8
Add shader uniform hints for screen textures so users can specify custom filter and repeat modes.
...
At this time, it works best in the Vulkan Renderers as they support using multiple samplers with the same texture.
In GLES3 this feature really only allows you to use the screen texture without mipmaps if you want to save the cost of generating them.
2022-08-09 12:29:49 -04:00
Bastiaan Olij
f50f0844e9
Fix resource leaks in VoxelGI
2022-08-09 15:18:03 +10:00
bruvzg
e7464e7a30
Fix macOS and iOS defines in the rendering code.
2022-08-08 17:51:31 +03:00
Rémi Verschelde
8734ef1f7a
Merge pull request #62547 from clayjohn/ref_vec_pbr
2022-08-08 10:18:32 +02:00
Rémi Verschelde
f754dd20be
Merge pull request #62454 from Geometror/reflect-refract-vec2-vec4
...
Allow for vec2/vec4 to be used in reflect and refract
2022-08-07 19:16:05 +02:00
Hendrik Brucker
b8d5f4bdd5
Allow vec2 and vec4 for reflect and refract
2022-08-07 18:03:16 +02:00
Hugo Locurcio
baaa7503c7
Add a shadow opacity property to Light3D
...
This can be used to make shadows translucent for a specific light.
The light distance fade system also uses this to smoothly fade the shadow
when the light fade transition distance is greater than 0.
2022-08-07 11:06:32 +02:00
bitsawer
691e067ef5
Fix shader preprocessor macro expansion
2022-08-05 17:41:24 +03:00
Juan Linietsky
f999f52f0a
Add a Framebuffer cache
...
Adds a FramebufferCache singletion that operates the same way as UniformSetCache.
Allows creating framebuffers on the fly (and keep them cached if re-requested) such as:
```C++
RID fb = FramebufferCache::get_singleton()->get_cache(texture1,texture2);
```
2022-08-05 13:37:29 +02:00
Hugo Locurcio
db22b7ded0
Rename shader parameter uniform setter/getter methods for consistency
...
`shader_uniform` is now consistenly used across both per-shader
and per-instance shader uniform methods. This makes methods easier
to find in the class reference when looking for them.
2022-08-04 23:17:06 +02:00
Rémi Verschelde
8a9700c8a7
Force disable S3TC support on Android/iOS since we don't handle it
...
Fixes #63909 for now.
This could be improved in the future if we want to properly support S3TC on mobile.
2022-08-04 18:27:56 +02:00
Rémi Verschelde
2c0c76c415
Merge pull request #61851 from Calinou/particles-default-global-coordinates
2022-08-03 11:38:23 +02:00
Rémi Verschelde
b27f06550c
Merge pull request #51531 from Calinou/decal-projector-add-nearest-mipmap-aniso
2022-08-03 11:37:28 +02:00
Rémi Verschelde
15fdf7bc86
Merge pull request #58611 from Calinou/ssr-fix-blend-margin
...
Fade screen-space reflection towards inner margin
2022-08-03 07:54:59 +02:00
Yuri Rubinsky
988041b74c
Merge pull request #63847 from Zylann/shader_switch_uint
2022-08-03 08:05:19 +03:00
Hugo Locurcio
d041ca6c02
Add Nearest Mipmap Anisotropic filter option to decals and projectors
...
This is consistent with the BaseMaterial3D filtering options.
It can be used for high-quality pixel art textures that remain sharp
when viewed at oblique angles, but prevents them from becoming grainy
thanks to mipmaps.
2022-08-03 03:49:15 +02:00
Hugo Locurcio
d38671827b
Fade screen-space reflection towards inner margin
...
- Fade reflection towards inner margin and clip it at screen edges
instead of external margin.
- Round edges of the fade margin if both are being cut off to prevent
sharp corners.
Co-authored-by: puchik <puchik@users.noreply.github.com>
2022-08-03 01:55:42 +02:00
Marc Gilleron
779a5cd34a
Allow shading language to use `switch` statement with uints
2022-08-02 23:08:41 +01:00
Hugo Locurcio
84076513b1
Use global coordinates for particles by default
...
Particles won't move or rotate anymore with the node (or its parents)
by default. This new default behavior is generally more suited
to most use cases. Local coordinates can still be enabled on a per-node basis.
This affects both 2D and 3D particles, and both CPU and GPU-based particles.
2022-08-02 23:25:02 +02:00
Rémi Verschelde
f450f242b9
Merge pull request #62639 from Calinou/line-antialiasing-decrease-feather-width
2022-08-02 21:00:01 +02:00
Patrick Exner
fe5901310e
Add spatial built-ins (camera-pos, object-pos, camera-eye etc.)
2022-08-02 17:30:41 +02:00
clayjohn
2640e9ee22
Disable multiview shader versions when xr is disabled
2022-08-02 09:55:53 -04:00
Rémi Verschelde
8cce479c01
Merge pull request #51672 from Calinou/shader-add-hint-transparent-texture
...
Add `hint_transparent` to use a transparent black placeholder texture
2022-08-02 07:15:59 +02:00
Rémi Verschelde
bda2274969
Merge pull request #63627 from and-rad/vector-field-attractor-fix
...
Fix vector field particle attractor texture sampling
2022-08-02 07:13:04 +02:00
Rémi Verschelde
2cdef4d532
Merge pull request #63589 from RandomShaper/sdfgi_debug_pc
...
Keep SdfgiDebug shader's push constant size <= 128
2022-08-02 07:11:58 +02:00
Rémi Verschelde
8de2cc04a7
Merge pull request #63793 from RandomShaper/fix_unbound_resource
...
Fix uniform set creation error due to null RID
2022-08-02 07:10:20 +02:00
Hugo Locurcio
813f6a5d57
Add `hint_transparent` to use a transparent black placeholder texture
...
This can be used in shaders to avoid the need to supply a transparent
placeholder texture manually.
2022-08-01 23:38:06 +02:00
Rémi Verschelde
67c5741c03
Merge pull request #63767 from kubecz3k/fix/headless-collision
2022-08-01 22:04:09 +02:00
Pedro J. Estébanez
2df767d31e
Fix uniform set creation error due to null RID
2022-08-01 21:59:13 +02:00
Yuri Rubinsky
9ec6de1767
Merge pull request #63766 from Chaosus/fix_shader_instance_uniform
2022-08-01 15:04:54 +03:00
Yuri Rubinsky
81c44718ca
Fix passing values to the instance uniforms in the shader
2022-08-01 13:45:29 +03:00
Jakub Grzesik
3c55637459
fix for headless collision shape generation
...
this commit implements just enough of dummy mesh_storage so collision shapes are still generated in the headless mode
implementation was inspired by rasterizer_dummy.h from Godot3
2022-08-01 12:38:07 +02:00
Rémi Verschelde
121d6fdace
Merge pull request #63754 from BastiaanOlij/storage_struct_private
...
Changed storage structs to private
2022-08-01 09:37:36 +02:00
Rémi Verschelde
de53e91b85
Merge pull request #55276 from Calinou/volumetric-fog-tweak-default-gi-inject
...
Tweak default fog settings for better appearance
2022-08-01 07:55:53 +02:00
Rémi Verschelde
677f565ce8
Merge pull request #63587 from clayjohn/specular-occlusion
...
Treat specular less than 0.02 as occlusion
2022-08-01 07:54:57 +02:00
Bastiaan Olij
81c6f73109
Changed storage structs to private
2022-08-01 11:59:14 +10:00
Hugo Locurcio
e35e79b802
Tweak default fog settings for better appearance
...
- Increase the default non-volumetric fog density to 0.01 to make
adjustments more visible.
- Use a less saturated non-volumetric fog color by default
(a mix of the sky and horizon colors of the new default
ProceduralSkyMaterial).
- Set Volumetric Fog Gi Inject to 1.0 by default. Injecting GI results
in more realistic appearance of volumetric fog, at a very low
performance cost.
2022-08-01 02:04:20 +02:00
clayjohn
0c65ed38a6
Treat specular less than 0.02 as occlusion
...
This is a very common hack used in almost all PBR renderers to allow removing specular contribution in dielectric materials
2022-07-31 15:45:21 -07:00
Hugo Locurcio
a0795b4347
Tweak VoxelGI defaults for better quality
...
Overall brightness is similar to the previous settings, but lighting
now fades off more naturally and reflections feature indirect lighting.
Performance is identical.
- Enable Use Two Bounces by default.
- Decrease Propagation to 0.5 to compensate for the second bounce.
2022-07-31 18:05:24 +02:00
Hugo Locurcio
0e26fee3b7
Make Decal's `modulate` property affect emission color as well
...
This can be used to recolor special effects such as fake area fog
without having to create separate textures for each color.
- Improve the Decal class documentation.
2022-07-30 21:41:48 +02:00
LinuxUserGD
6e6569aa78
fix 'Comparison result is always the same' warnings
2022-07-29 19:45:22 +02:00
Rémi Verschelde
7199314eb3
Merge pull request #63595 from reduz/remove-signal-connect-binds
...
Remove Signal connect binds
2022-07-29 18:10:39 +02:00
Andreas Raddau
dfc6035ce1
Fix vector field particle attractor texture sampling
2022-07-29 16:52:54 +02:00
Juan Linietsky
d4433ae6d3
Remove Signal connect binds
...
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Pedro J. Estébanez
278950f731
Keep SdfgiDebug shader's push constant size <= 128
2022-07-29 13:25:11 +02:00
Rémi Verschelde
2bf8c4a6d0
Merge pull request #63527 from BastiaanOlij/rework_environment
...
Restructure environment in render implementation
2022-07-29 08:05:40 +02:00
Bastiaan Olij
f579125eeb
Restructure environment in render implementation
2022-07-29 12:24:32 +10:00
Rémi Verschelde
8e0f328a80
Merge pull request #59840 from Calinou/renderingserver-global-uniform-rename
2022-07-28 20:34:17 +02:00
Hugo Locurcio
4b42379c8f
Rename RenderingServer global shader uniform methods to be more explicit
...
The `global_shader_uniform` name is longer, but it makes it much
easier to find the methods when searching in the class reference.
2022-07-28 18:46:59 +02:00
Hugo Locurcio
e24029edc3
Allow changing mipmap LOD bias when FSR 1.0 scaling is not used
...
Mipmap LOD bias can be useful to improve the appearance of distant
textures without increasing anisotropic filtering (or in situations
where anisotropic filtering is not effective).
`fsr_mipmap_bias` was renamed to `texture_mipmap_bias` accordingly.
The property hint now allows for greater precision as well.
2022-07-28 17:51:13 +02:00
Rémi Verschelde
82811367cb
Merge pull request #63571 from RandomShaper/conservative_validate_vrs
2022-07-28 15:34:47 +02:00
Pedro J. Estébanez
5f71b55380
Improve handling of the format of the VRS image
...
- Validate format conservatively. (This is to have VRS images created regardless whether VRS attachments are supported, which avoids errors in places where the code assumes such images were created on low-spec GPUs.)
- Create a non-layered default VRS image, which is what Vulkan (and D3D12, by the way) expect.
2022-07-28 12:24:03 +02:00
Rémi Verschelde
199ea349f5
Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local
2022-07-28 10:03:07 +02:00
Bastiaan Olij
1dd671014b
Add startup flag to override XR mode settings
2022-07-28 11:50:34 +10:00
Rémi Verschelde
bb94e16bd8
Merge pull request #63406 from Zylann/init_viewport_fields
2022-07-27 12:29:05 +02:00
Rémi Verschelde
a7335b00e6
Merge pull request #62362 from clayjohn/VULKAN-halo
2022-07-27 11:17:34 +02:00
Rémi Verschelde
cade90a807
Merge pull request #58296 from Calinou/decal-distance-fade-tweak-defaults
2022-07-27 09:44:47 +02:00
Rémi Verschelde
d5ec1a9650
Merge pull request #63477 from Chaosus/shader_fix_fog
2022-07-27 09:35:30 +02:00
clayjohn
7e7c6995e3
Use full size mipmaps for reflections when in high-quality mode
2022-07-26 23:53:05 -07:00
Yuri Rubinsky
05bc55b2ad
Merge pull request #63522 from Chaosus/shader_fix_projection
2022-07-27 09:38:14 +03:00
Yuri Rubinsky
2dc59a3eea
Fix incorrect conversion of default value for mat4 uniform in shaders
2022-07-27 09:06:18 +03:00
Yuri Rubinsky
bbf76faf86
Fix `FOG` built-in in spatial/fragment shader
2022-07-27 08:31:06 +03:00
Bastiaan Olij
0bd042c601
Change RendererSceneRender::GeometryInstance so more code is shared among renderers
2022-07-27 12:32:07 +10:00
Hugo Locurcio
a151a74a98
Tweak Decal distance fade defaults and add property hints
...
The new default values are more usable in real world scenarios
when smooth fading of distant decals is desired for performance reasons.
The Decal distance fade property hints were adjusted based on the
GeometryInstance3D visibility range fade property hints. `or_greater`
was also added to allow specifying larger values if needed.
2022-07-27 03:15:46 +02:00
Rémi Verschelde
2d2b85d400
Merge pull request #62972 from Chaosus/shader_groups
...
Implement shader uniform groups/subgroups
2022-07-26 15:16:33 +02:00
Rémi Verschelde
f94b4dbe22
Merge pull request #63236 from halgriffiths/fix-texture-rect-transpose
...
send FLAGS_TRANSPOSE_RECT to Vulkan
2022-07-26 13:22:32 +02:00
Yuri Rubinsky
886c2d9681
Implement shader uniform groups/subgroups
2022-07-26 11:26:09 +03:00
Bastiaan Olij
bad5c659a4
Move Sky(RD) into environment
...
Move Fog logic from render scene render to fog
2022-07-26 10:19:40 +10:00
Juan Linietsky
c7255388e1
Remove ThreadWorkPool, replace by WorkerThreadPool
...
The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient.
It can also be better debugged.
2022-07-25 15:39:50 +02:00
Rémi Verschelde
49b0aa93e3
Merge pull request #63424 from Chaosus/shader_preprocessor_inc_fix
2022-07-25 14:56:06 +02:00
Yuri Rubinsky
be3fb7a216
Fix errors when using built-ins in shaderinc
2022-07-25 12:33:04 +03:00
Rémi Verschelde
90019676b0
Code quality: Fix header guards consistency
...
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
Rémi Verschelde
3084a48ace
Merge pull request #63219 from reduz/implement-vector4-projection
2022-07-25 11:13:27 +02:00
Marc Gilleron
5690f47135
Initialize default values for viewports in rendering server.
...
Example with TAA: by default it is `false` in project settings and in
the Viewport node. When the scene tree is created, Viewport.set_use_taa()
is called with the value from ProjectSettings. But because the default
values are already the same, RenderingServer isn't called.
The Viewport struct in the RenderingServer does not initialize this field,
so TAA gets randomly enabled when the game starts with default settings.
2022-07-24 21:39:06 +01:00
reduz
455c06ecd4
Implement Vector4, Vector4i, Projection
...
Implement built-in classes Vector4, Vector4i and Projection.
* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.
These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.
**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
Yuri Rubinsky
6d992abb54
Fix some errors after shader preprocessor PR
2022-07-23 09:38:59 +03:00
Rémi Verschelde
fe929d4787
Merge pull request #62513 from reduz/shader_preprocessor_remake
2022-07-23 00:02:33 +02:00
Rémi Verschelde
4f7bfacfcd
Merge pull request #62478 from BastiaanOlij/split_effects_20220628
2022-07-22 23:44:52 +02:00
reduz
f649678402
Clean up Shader Preprocessor
...
* Moved preprocessor to Shader and ShaderInclude
* Clean up RenderingServer side
* Preprocessor is separate from parser now, but it emits tokens with include location hints.
* Improved ShaderEditor validation code
* Added include file code completion
* Added notification for all files affected by a broken include.
2022-07-22 22:53:03 +02:00
Yuri Roubinsky
7b94603baa
Adding shader preprocessor support
...
Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
2022-07-22 22:51:57 +02:00
halgriffiths
d37ebc2bdc
send FLAGS_TRANSPOSE_RECT to Vulkan
2022-07-22 13:49:04 +01:00
luz paz
38aaaa3cf9
Fix various typos not caught by codespell
...
Revert upstream `core/input/gamecontrollerdb.txt`. Upstream fix: https://github.com/gabomdq/SDL_GameControllerDB/pull/600
2022-07-21 07:38:23 -04:00
bruvzg
8823eae328
Rename OSX to macOS and iPhoneOS to iOS.
2022-07-21 09:37:52 +03:00
Bastiaan Olij
eefcb5ed67
Move screen space effects into a separate class
2022-07-19 13:27:39 +10:00
Rémi Verschelde
abe8b88702
Merge pull request #62834 from RandomShaper/fix_vk_sky_error
...
Bind correct default resource type in GI
2022-07-18 23:39:21 +02:00
Rémi Verschelde
d29e17d9d2
Merge pull request #63057 from sakrel/vulkan-fix-2d-shadows
2022-07-18 21:53:12 +02:00
Rémi Verschelde
9276c65522
Merge pull request #62265 from d-robbins/specular_shininess_used
2022-07-18 21:35:46 +02:00
Rémi Verschelde
5bea531228
Merge pull request #62848 from RandomShaper/shader_writability_improvement
2022-07-18 15:11:42 +02:00
Pedro J. Estébanez
4ac2008782
Make SDFGI direct light shader follow the same-writability rule
2022-07-18 14:46:29 +02:00
David R
c2b0a873c2
added usage_defines for SPECULAR_SHININESS
...
added usage defines for opengl3 renderer
2022-07-18 00:45:42 +02:00
Bastiaan Olij
d139131aab
Adding Variable Rate Shading support to Godot
...
Improve GI renderer and add VRS support
Implement render device has_feature and move subgroup settings to limit_get
2022-07-17 15:42:24 +10:00
Fabian Keller
2bf9e6090c
rename translate(d) to translate(d)_local in Transform 2D/3D
2022-07-16 11:47:54 +02:00
sakrel
16a8967757
Fix DirectionalLight2D and PointLight2D shadows not rendering correctly
2022-07-15 23:55:15 +02:00
Rémi Verschelde
7e49c8c30e
Merge pull request #62947 from BastiaanOlij/fix_mesh_instance_free
2022-07-14 00:05:25 +02:00
Hugo Locurcio
21ea1c3835
Rename soft shadow quality project settings for easier searching
...
`rendering/quality/shadows` is now `rendering/quality/positional_shadow`
to explicitly denote that the settings only affect positional light shadows,
not directional light shadows.
Shadow atlas settings now contain the word "atlas" for easier searching.
Soft shadow quality settings were renamed to contain the word "filter".
This makes the settings appear when searching for "filter" in the
project settings dialog, like in Godot 3.x.
2022-07-13 19:56:02 +02:00
Bastiaan Olij
6930ad2777
Fix typo, call mesh_instance_free not mesh_free
2022-07-12 22:30:08 +10:00
Hugo Locurcio
0f18bd244e
Fix dead link in TAA resolve shader comment
...
Spartan Engine has recently removed its own internal TAA in favor
of FSR 2.0. The link has been changed to point to a fixed commit,
so the link will keep working as long as the repository exists.
2022-07-09 22:51:54 +02:00
Pedro J. Estébanez
ba39230ef3
Bind correct default resource type in GI
2022-07-08 19:07:28 +02:00
Xentripetal
f514b82fd3
Account for relative z-indexes when y-sorting
2022-07-08 09:18:00 -05:00
Rémi Verschelde
99df193bea
Merge pull request #62277 from RandomShaper/depth_buffer_no_sampling
...
Rationalize certain cases of texture usage flags
2022-07-08 11:34:09 +02:00
Yuri Rubinsky
3dc1a1dbfb
Prevent possible crash when mesh is freed
2022-07-06 19:52:54 +03:00
lawnjelly
1f69666209
Remove Octree
...
Octree is no longer used in 4.x.
2022-07-06 14:10:05 +01:00
Rémi Verschelde
55fca1cb94
Merge pull request #62344 from BastiaanOlij/extract_dependencies
2022-07-06 13:24:46 +02:00
Hugo Locurcio
c9037a8d2c
Remove unused anisotropy setter/getter methods in VoxelGI
...
These methods weren't exposed to the scripting API.
Anisotropy was used in earlier iterations of VoxelGI, but it was
removed as it was too expensive.
2022-07-06 02:40:49 +02:00
Hugo Locurcio
cf1ce8494d
Improve antialiased line drawing sharpness and respect of original width
...
Antialiased lines with a width of 2 pixels or more now use a smaller
feather width of 1.25 instead of 2.0. This makes them look sharper
and better preserves their original shape while still having good
antialiasing quality.
This also improves the appearance of thin antialiased lines by
slightly increasing their feather size (from 1.0 to 1.25). It
makes them appear a tad thicker, but the antialiasing quality is
much improved by doing this.
2022-07-02 18:45:42 +02:00
Rémi Verschelde
6bbfd160b0
SCons: Properly track codegen script dependency for generated GLSL headers
2022-07-02 16:01:48 +02:00
Hugo Locurcio
f9e6b292e2
Remove debugging print following GI reorganization
2022-07-01 20:08:10 +02:00
clayjohn
93c82ab4b9
Evaluate specular reflections using specular dominant direction instead of assuming mirror reflections
2022-06-29 23:36:18 -07:00
Rémi Verschelde
2d28bb8364
Merge pull request #62482 from JFonS/fix_crash_canvas_mode
2022-06-28 15:31:51 +02:00
Rémi Verschelde
d53f1fb388
Merge pull request #60935 from Calinou/geometryinstance3d-gi-mode-default-static
...
Use the Static global illumination mode in GeometryInstance3D by default
2022-06-28 14:40:53 +02:00
JFonS
8102db90bc
Fix crash in Environment "Canvas" background mode.
2022-06-28 13:25:18 +02:00
Rémi Verschelde
16d9918b51
Merge pull request #62467 from RandomShaper/descriptor_rw_matters
...
Consider uniform writability part of the interface of the set
2022-06-28 08:25:38 +02:00
Je06jm
c2550e1cc0
Fixed FSR. Before, it was commiting the
...
raw render to the screen. Now, it commits
the fsr upscaled image
2022-06-27 18:01:12 -06:00
Pedro J. Estébanez
fc6ac4a155
Consider uniform writability part of the interface of the set
2022-06-27 21:56:18 +02:00
Bastiaan Olij
ecfcfd97fa
Split dependency logic
...
Split FOG
Split visibility notifier
Final cleanup of storage classes
2022-06-28 00:10:29 +10:00
Pedro J. Estébanez
678a9ca221
Rationalize certain cases of texture usage flags
...
- Check for exhaustive usage flags for depth buffer
- Remove uneeded storage flag from normal-roughness buffer
2022-06-27 11:28:38 +02:00
Bastiaan Olij
4e8e10a186
Fix typo in roughness shaders
2022-06-26 12:43:21 +10:00
Bastiaan Olij
6224b00365
Moved cube_to_dp and cubemap logic into CopyEffects
2022-06-24 18:04:28 +10:00
Hugo Locurcio
610363add0
Use the Static global illumination mode in GeometryInstance3D by default
...
This makes VoxelGI and SDFGI work out of the box with primitive meshes,
loaded OBJ meshes and CSG nodes.
2022-06-23 22:34:23 +02:00
Rémi Verschelde
051fb86fb0
Merge pull request #61221 from BastiaanOlij/split_gi_effects
2022-06-23 12:28:10 +02:00
Rémi Verschelde
d8ef904ffc
Merge pull request #35758 from zmanuel/eliminate-draw-pending
...
Remove redundant thread sync counter draw_pending
2022-06-22 18:20:41 +02:00
Rémi Verschelde
e21db7723a
Merge pull request #62286 from JFonS/taa_global_time
2022-06-22 16:59:08 +02:00
Rémi Verschelde
95cafc7bcf
Merge pull request #62305 from JFonS/taa_molten_mobile_workaround
2022-06-22 16:58:31 +02:00
jfons
0f38e79617
Move TIME to a global shader variable
...
This makes it work consistently for motion vectors in all functions, including user-defined ones.
2022-06-22 12:24:37 +02:00
JFonS
9b4e07f866
Workaround MoltenVK shader conversion error
2022-06-22 11:58:50 +02:00
Bastiaan Olij
997810e417
Split GI effects and fix stereoscopic rendering of GI effects
2022-06-22 12:50:17 +10:00
Rémi Verschelde
40c360b870
Merge pull request #62122 from reduz/implement-movie-writer
...
Implement a Movie Maker mode
2022-06-21 14:24:14 +02:00
reduz
5786516d4d
Implement Running Godot as Movie Writer
...
* Allows running the game in "movie writer" mode.
* It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time).
* If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult.
* Implements a simple, default MJPEG writer.
This new features has two main use cases, which have high demand:
* Saving game videos in high quality and ensuring the frame rate is *completely* stable, always.
* Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this).
**Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly).
Usage:
$ godot --write-movie movie.avi [scene_file.tscn]
Missing:
* Options for configuring video writing via GLOBAL_DEF
* UI Menu for launching with this mode from the editor.
* Add to list of command line options.
* Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
2022-06-21 11:28:47 +02:00
reduz
141c375581
Clean up Hash Functions
...
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
2022-06-20 12:54:19 +02:00
Rémi Verschelde
3a2b409c5a
Merge pull request #62106 from BastiaanOlij/eye_offset
...
Introduce eye_offset for correcting stereoscopic reflections
2022-06-18 10:40:57 +02:00
Bastiaan Olij
b4821fe2e0
Introduce eye_offset for correcting stereoscopic reflections
...
Use view instead of vertex for reflections.
2022-06-17 19:39:34 +10:00
Hugo Locurcio
787a1e006b
Fix glow in Mix mode not working correctly when FXAA is enabled
...
Glow must be performed after FXAA to ensure correct appearance.
2022-06-15 22:23:56 +02:00
clayjohn
a94110d0c6
Remove GLES2 shader constraints from GLES3
2022-06-14 12:01:52 -07:00
Hugo Locurcio
0225c6d31a
Tweak Light3D property hints for greater flexibility
...
- Specular can now be set above 1.0.
- Blur can be set to 0 to disable shadow blurring entirely, which is useful
on lights that have a non-zero size.
- When shadow blurring is disabled, lights that have a non-zero size will
not use PCSS-like soft shadows, speeding up shadow rendering
considerably.
- Some property hints now allow more precise values.
2022-06-13 14:31:46 +02:00
Hugo Locurcio
5d9e996f68
Use opaque rendering pipeline for alpha hash materials
...
This has several benefits:
- Transparency sorting issues inherent to alpha blending no longer occur.
- Alpha hash materials can now cast shadows (also works with
GeometryInstance3D Transparency's property for alpha hash materials).
- Higher performance.
2022-06-10 11:14:04 +02:00
Yuri Rubinsky
c9ae83b5ab
Prevent defining float constant without number after exponent in shaders
2022-06-10 11:35:56 +03:00
Yuri Rubinsky
5dd7a1030d
Fix incorrect sky rotation based on camera axis
2022-06-09 22:40:40 +03:00
Yuri Rubinsky
d8842f1a4b
Fix `TIME` compilation for custom functions in spatial shader
2022-06-09 20:12:25 +03:00
jfons
36382ab7eb
Workaround MoltenVK error found in TAA implementation
2022-06-09 16:40:00 +02:00
clayjohn
a0338553b5
Assign VIEWPORT_SIZE after validating screen_size to avoid crash when using ReflectionProbe
2022-06-08 15:01:12 -07:00
Rémi Verschelde
48dcafeed9
Merge pull request #61794 from clayjohn/VULKAN-viewport-size
...
Use RenderBuffer size instead of half extents for VIEWPORT_SIZE
2022-06-08 07:16:25 +02:00
clayjohn
b6649828cd
Use RenderBuffer size instead of half extents for VIEWPORT_SIZE in Vulkan spatial shaders
2022-06-07 15:01:20 -07:00
jfons
ba832d83b2
Initial TAA implementation
...
Initial TAA support based on the implementation in Spartan Engine.
Motion vectors are correctly generated for camera and mesh movement, but there is no support for other things like particles or skeleton deformations.
2022-06-07 13:14:44 +02:00
Rémi Verschelde
361a401fbb
Merge pull request #61554 from Chaosus/shader_fix_hints
2022-06-03 17:26:18 +02:00
Bastiaan Olij
69b66ec425
Ensure has_os_features is safely called as it can't be called from within the construct of RenderingServerDefault on which it relies
2022-06-01 20:47:32 +10:00
Rémi Verschelde
d8b0a8cd29
Merge pull request #61572 from clayjohn/ssao-license
2022-05-31 18:56:16 +02:00
clayjohn
06f356d41e
Add and improve license attribution for SSAO and SSIL shader code
2022-05-31 09:42:50 -07:00
Yuri Rubinsky
cf240a7ae0
Refactor shader hints
2022-05-31 11:51:47 +03:00
clayjohn
2ba53547c9
Fix error with !rb spam when using background color mode with reflection probes
2022-05-28 18:11:28 -07:00
clayjohn
7b71545652
Remove mesh and particles RD dependencies from canvas rendering server
2022-05-26 10:43:37 -07:00
Rémi Verschelde
20a1b85589
Merge pull request #61425 from clayjohn/GLES3-2D
2022-05-26 01:16:52 +02:00
clayjohn
fb860265e0
Implement 2D Meshes and MultiMeshes in GLES3 backend
2022-05-25 15:46:24 -07:00
Hugo Locurcio
e85459dcd1
Add Cone and Cylinder shapes to FogVolume
...
This complements the existing Ellipsoid and Box local fog shapes.
This can be used to represent a light cone coming from a SpotLight.
2022-05-25 12:35:53 +02:00
GanidhuAbey
3c95a70081
Fix particle system from going inactive early
...
Prevents particles from freezing and dissapearing by resetting
it's inactive time when particles are emitted.
2022-05-24 17:31:21 -06:00
Rémi Verschelde
12ddaa36a6
Merge pull request #60641 from clayjohn/Sky-ign
...
Use IGN instead of white noise for sky dithering
2022-05-24 23:34:41 +02:00
clayjohn
3e20c1347d
Add clipping, backbuffer, and CanvasGroups to 2D GLES3 renderer
...
As well as significant consequent cleanup in the RenderTarget, Texture, and Canvas renderer code
2022-05-24 11:00:34 -07:00
clayjohn
4f82b1bd20
Use IGN instead of white noise for sky dithering
2022-05-24 10:57:07 -07:00
Rémi Verschelde
1314e6cbcc
Merge pull request #60803 from Chaosus/shader_hint_rename
...
Rename `hint_albedo`, `hint_white/black` in shaders
2022-05-24 08:15:33 +02:00
Rémi Verschelde
126470caa1
Merge pull request #61226 from Chaosus/shader_fix_keyword_completion
2022-05-23 19:05:29 +02:00
Hugo Locurcio
209d7eb7ea
Fix typo in occlusion culling warning method name
2022-05-23 09:34:28 +02:00
trollodel
fe3371a9a9
Add timestamps to some rendering effects
2022-05-21 17:47:28 +02:00
Rémi Verschelde
a53434639f
Merge pull request #61214 from somnathsarkar/particle-attractor-fix
...
Fix GPUParticles3D disappearance at attractor origins
2022-05-21 08:48:36 +02:00
Somnath Sarkar
99911bfa79
Fix GPUParticles3D disappearance at attractor origins
2022-05-20 19:56:32 -04:00
reduz
45af29da80
Add a new HashSet template
...
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
Yuri Rubinsky
29ff04acf2
Fix incorrect keyword completion after period in shader editor
2022-05-20 18:40:57 +03:00
Windy Darian
a3e016e07e
Fix normal and tangent blending in blend shapes
2022-05-20 07:59:45 -04:00
Aaron Record
900c676b02
Use range iterators for RBSet in most cases
2022-05-19 12:09:16 +02:00
Haoyu Qiu
fc3b845c07
Add dedicated macros for property name extraction
...
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NO_EDITOR
* Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
2022-05-19 14:08:47 +08:00
Yuri Rubinsky
5322b171de
Fix tonemapper shader to correctly apply alpha channel
2022-05-18 06:43:07 +03:00
clayjohn
600d8105d8
Fix custom irradiance bug in Vulkan mobile renderer
2022-05-16 11:57:41 -07:00
reduz
746dddc067
Replace most uses of Map by HashMap
...
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
(order matters) but use is discouraged.
There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Somnath Sarkar
52aeaf5d16
Fix computation of screen_uv
2022-05-16 00:00:01 -04:00
Rémi Verschelde
349aa9c884
Merge pull request #60894 from derammo/derammo_opengl3_windows
2022-05-13 15:07:13 +02:00
Bastiaan Olij
fe8c8eeba8
Copy_to_fb is available in both raster and clustered renderers, remove unwanted checks
2022-05-13 13:19:42 +10:00
Rémi Verschelde
9cf9054c3e
Merge pull request #60976 from Calinou/fsr-rename-property-hint
2022-05-12 23:12:03 +02:00
Rémi Verschelde
ff30a09993
Merge pull request #60643 from clayjohn/GLES3-3D
2022-05-12 21:08:02 +02:00
clayjohn
652adcd5bf
Basic 3D rendering
2022-05-12 10:37:27 -07:00
Hugo Locurcio
0cdd7d88ad
Rename remaining references of FSR to FSR 1.0
...
With FSR 2.0 around the corner, we should avoid any ambiguity by
explicitly stating the version number.
2022-05-12 18:22:43 +02:00
reduz
8b7c7f5a75
Add a new HashMap implementation
...
Adds a new, cleaned up, HashMap implementation.
* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing ).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).
This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
2022-05-12 11:21:29 +02:00
clayjohn
2bf8831dd6
SceneShader compiling
2022-05-11 21:00:21 -07:00
clayjohn
3bb8e6a9fe
SkyShaders working
2022-05-11 21:00:21 -07:00
derammo
96c21bc749
opengl3 driver now works on windows including multi window
...
fixed and simplified gl_manager_windows
swap buffers now called for all windows
fixed missing pixel format setting in additional windows
this makes them work in OpenGL contexts
changed verbose error printing to write once
this error message happens very frequently while opengl3 is not finished
removed dead code no longer needed after changes
fixed comments that were misinformation
window messages during window creation now handled
these were previously discarded
messages now tunnel the required context
changed failure to create opengl3 window on windows to be more fatal
marked a problem with pen code
conditional compilation of vulkan and opengl3 on windows fixed
windows debug builds now show messages on debug console also
rendering driver selection box now shows only compiled drivers
marked some problematic code
thanks to akien-mga for patiently rewriting my style mistakes
2022-05-11 16:12:40 -04:00
Bastiaan Olij
9939cfc4c4
Split out bokeh_dof and copy effects
2022-05-11 11:08:56 +10:00
Rémi Verschelde
d8935b27a9
Fix warnings found by Emscripten 3.1.10
...
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.
2022-05-10 13:03:13 +02:00
Yuri Roubinsky
a8bbe570ca
Rename `hint_albedo`, `hint_white/black` in shaders
2022-05-09 22:50:18 +03:00
Yuri Roubinsky
8ed84a9f01
Fix instance uniform shader crash in custom functions
2022-05-09 17:10:42 +03:00
Rémi Verschelde
8fb02635d4
Merge pull request #60772 from MightiestGoat/multimesh-uniform-set
...
Fix the uniform set creation of multimesh with a invalidated buffer
2022-05-05 16:55:48 +02:00
mightygoat
61df370810
Check multimesh before uniform set creation
2022-05-05 12:25:02 +05:30
mightygoat
10209e31eb
Fix the uniform set creation of multimesh with a invalidated buffer
2022-05-05 06:59:47 +05:30
Rémi Verschelde
477b53d280
Merge pull request #60568 from Chaosus/shader_keyword_completions
...
Add keyword completion to shader editor
2022-05-04 23:27:33 +02:00
Rémi Verschelde
c114823471
Merge pull request #58298 from Calinou/decal-distance-fade-use-easing
2022-05-04 21:50:20 +02:00
Aaron Franke
fa7a7795f0
Rename Basis get_axis to get_column, remove redundant methods
2022-05-03 09:37:47 -05:00
Rémi Verschelde
6530d46d67
Merge pull request #51102 from Calinou/renderingserver-add-api-version-getter
...
Add `get_video_adapter_api_version()` to RenderingServer
2022-05-03 14:44:55 +02:00
Rémi Verschelde
931838b330
Merge pull request #60627 from aaronfranke/rename-elements
...
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03 14:40:01 +02:00
Hugo Locurcio
180e5d3028
Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`
...
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Hugo Locurcio
31194f5b1c
Add `get_video_adapter_api_version()` to RenderingServer
...
This method can be used to get the graphics API version currently in
use (such as Vulkan). It can be used by projects for troubleshooting
or statistical purposes.
2022-05-03 01:18:35 +02:00
Hugo Locurcio
618c88c71b
Make Decal distance fade smoother
...
`smoothstep()` avoids the sudden transparency jump when entering or
leaving a decal's distance fade margin distance. This in turn helps
make opacity transitions less noticeable to the player, as it's
less likely to catch the player's eye.
2022-05-02 23:14:00 +02:00
Rémi Verschelde
7f181494d1
Merge pull request #60705 from awsker/fix-viewport-clearing
...
Viewport would be cleared even when clear_mode was set to never clear
2022-05-02 21:25:42 +02:00
Rémi Verschelde
c273ddc3ee
Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`
...
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.
Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.
Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
awsker
9522419e97
Viewport would be cleared even when clear_mode was set to VIEWPORT_CLEAR_NEVER
2022-05-02 11:03:39 +02:00
Yuri Rubinsky
c25c837f21
Merge pull request #60682 from Chaosus/shader_vec3_hint_color
2022-05-01 11:23:42 +03:00
Yuri Roubinsky
5eb3a0ef4a
Add `hint_color` support for `vec3` in shaders
2022-05-01 09:47:35 +03:00
clayjohn
623753a3a2
Use linear mipmap sampling in ToneMapper
2022-04-30 21:30:08 -07:00
Aaron Franke
1bf94dff3a
Rename Basis "elements" to "rows"
2022-04-29 08:02:56 -05:00
Aaron Franke
b831fb0a54
Rename Transform2D "elements" to "columns"
2022-04-29 08:02:39 -05:00
Yuri Roubinsky
15032e01e6
Add keyword completion to shader editor
2022-04-29 08:40:43 +03:00
Rémi Verschelde
cab171c54e
Merge pull request #60547 from BastiaanOlij/split_tonemapper_effect
...
Splitting tonemapper into its own class
2022-04-28 08:33:44 +02:00
Bastiaan Olij
3b2267ba6d
Splitting tonemapper into its own class
2022-04-28 15:00:30 +10:00
Rémi Verschelde
8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2
2022-04-27 10:08:26 +02:00
Hugo Locurcio
eb497bbaa7
Fix "ortogonal" -> "orthogonal" typo in rasterizer code
2022-04-26 21:49:44 +02:00
Yuri Roubinsky
643e75bea9
Prevent shader crash when using precision on boolean types
2022-04-26 12:30:24 +03:00
NNesh
2f33414dab
Fix clearing backbuffer if there are no items
2022-04-25 22:31:40 +05:00
Rémi Verschelde
fbfecc1dea
Merge pull request #60407 from JFonS/fix_color_pass_lm
2022-04-25 16:03:08 +02:00
bruvzg
be611c1c05
Implement Label3D node.
...
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
Joan Fons
0d57bbaae5
Add missing color pass flags to the valid list
...
Some valid flag combinations were missing, causing error spam in certain situations.
2022-04-21 12:37:56 +02:00
bruvzg
de4c97758a
Fix more issues found by cppcheck.
2022-04-20 10:34:00 +03:00
Yuri Rubinsky
f4b0c7a1ea
Merge pull request #60175 from Geometror/visual-shader-vector4
2022-04-20 08:33:42 +03:00
Clay John
c77bbde7ae
Merge pull request #60214 from JFonS/fix_depth_prepass
...
Fix depth pre-pass on all face cull modes
2022-04-19 11:37:34 -07:00
Bastiaan Olij
0b4fd92a17
Moved particles into ParticlesStorage
2022-04-17 13:13:22 +10:00
Bastiaan Olij
b6faf6c6c0
Move light, reflection probe and lightmap into LightStorage
2022-04-17 13:13:18 +10:00
Bastiaan Olij
6b28d94e77
Merge canvas and decal into TextureStorage and add render target
2022-04-17 12:59:50 +10:00
Rémi Verschelde
8fee88947e
Merge pull request #60213 from JFonS/fix_depth_state
2022-04-13 18:28:49 +02:00
Joan Fons
1270b542bb
Fix depth pre-pass on all face cull modes
...
The default shadow material was used for depth rendering disregarding the cull mode of the original material. This commit adds a check so the default shadow material is only used when the original material has back-face culling.
2022-04-13 17:37:28 +02:00
Joan Fons
259e50f447
Fix regression in rasterizer state
...
Fixes a regression introduced by the color pass flags rework. The various rasterizer state structs were not being reset for each flag combination, which meant some state changes were wrongly applied to some flag combinations.
2022-04-13 16:21:40 +02:00
Rémi Verschelde
46ef52162e
Color: Rename `to_srgb`/`to_linear` to include base color space
...
This helps reduce confusion around sRGB <> Linear conversions by making
both input and output color spaces explicit.
2022-04-13 11:45:52 +02:00
Hendrik Brucker
cf58d23a72
Add Vector4 to VisualShader
2022-04-12 19:09:29 +02:00
Yuri Rubinsky
3d63f6e36d
Merge pull request #60171 from Chaosus/restore_aa
2022-04-12 18:09:58 +03:00
Rémi Verschelde
724dd82f92
Merge pull request #60069 from Calinou/fsr-fix-editor-enum
2022-04-12 14:33:52 +02:00
Rémi Verschelde
a7b1d85828
Merge pull request #59825 from Chaosus/shader_fix
...
Fix incorrect parsing array's `length()` at return statement in shader
2022-04-12 12:40:54 +02:00
Yuri Roubinsky
6e9535a9c8
Restore antialiasing for `draw_line`
2022-04-12 13:03:56 +03:00
Hugo Locurcio
1a41a177e4
Use less blur for distant directional shadow splits
...
This makes the transition between shadow splits less noticeable,
specially when the expensive Blend Splits property is disabled.
2022-04-11 19:37:49 +02:00
Rémi Verschelde
0fb3d69bb7
Merge pull request #60137 from JFonS/fix_default_shadow_tex
...
Fix Vulkan validation errors on default depth textures
2022-04-11 17:38:21 +02:00
Yuri Rubinsky
31d2304ac4
Merge pull request #57899 from Chaosus/fix_aa
2022-04-11 18:29:54 +03:00
Rémi Verschelde
dcdc6954f8
Merge pull request #60138 from JFonS/fix_spec_constants
2022-04-11 14:18:50 +02:00
jfons
c4c0ef116a
Fix specialization constant updates in color passes
...
The color pass specialization constants were not being updated after splitting them to their own array.
2022-04-11 12:40:17 +02:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted.
2022-04-11 13:28:51 +03:00
jfons
bdc239a5a9
Fix Vulkan validation errors on default depth textures
...
The validation layers were complaining that we use DEFAULT_RD_TEXTURE_WHITE (which is RGBA8) in places where it's sampled as a depth texture. This commit adds the new default texture DEFAULT_RD_TEXTURE_DEPTH and uses it where needed.
2022-04-11 11:53:49 +02:00
Hugo Locurcio
d15b69118d
Fix 3D scaling enum size in the editor and improve descriptions
2022-04-09 17:53:45 +02:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck.
2022-04-06 14:34:37 +03:00
Rémi Verschelde
f8ab79e68a
Zero initialize all pointer class and struct members
...
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Yuri Roubinsky
0864c9abaa
Fix incorrect parsing array's `length()` at return statement in shader
2022-04-03 09:55:04 +03:00
Bastiaan Olij
b8be7903f3
Move storage for Mesh, MeshInstance, MultiMesh and Skeleton into MeshStorage
2022-04-02 16:29:04 +11:00
Yuri Rubinsky
9c5818d212
Merge pull request #59774 from Chaosus/shader_fix
2022-04-01 21:37:44 +03:00
jfons
e69d762dd0
Add color pass flags to Forward Clustered renderer
...
This commit removes a lot of enum values related to the color render pass in favor of a new flag-bases approach. This means instead of hard-coding all the possible option combinations into enums, we can write our logic by checking a bit-mask.
The changes in rendering_device_vulkan.cpp add support for unused attachments. That means RenderingDeviceVulkan::framebuffer_create() can take null RIDs in the attachments vector, which will result in VK_ATTACHMENT_UNUSED entries in the render pass.
This is used in this same PR to establish fixed locations for the color pass attachments (only color and separate specular so far, but TAA will add motion vectors as well). This way the attachment locations in the shader can stay the same regardless of which attachments are actually used.
Right now all the combinations of flags are generated, but we will need to add a way to limit the amount of combinations in the future.
2022-04-01 12:12:49 +02:00
Yuri Roubinsky
d47035a6fb
Fix shader crashing when attempting to access `length()` at global space
2022-04-01 08:39:29 +03:00
Rémi Verschelde
155a94fabe
Merge pull request #59385 from BastiaanOlij/extract_shader_storage
2022-03-31 19:19:03 +02:00
Rémi Verschelde
a647fb3e62
Fix typos with codespell
...
Using codespell 2.2-dev from current git.
Fix a couple incorrect uses of gendered pronouns.
2022-03-31 14:07:29 +02:00
Bastiaan Olij
36defd1179
Extract global variable, shader and material storage
2022-03-31 21:49:42 +11:00
Dimitris Nikolaidis
02572884f4
Fix canvas_group not being freed in RendererCanvasCull::free
2022-03-29 15:45:27 +03:00
Yuri Roubinsky
509598e8c0
Remove `SHADOW_ATTENUATION` spatial light shader built-in
2022-03-29 08:43:31 +03:00
reduz
360dea5348
Add GDExtension support to Script
...
* Ability to create script languages from GDExtension
* Some additions to gdnative_extension.h to make this happen
* Moved the GDExtension binder to core
This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x.
Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
2022-03-27 16:13:00 +02:00
nevarek
cc196393e3
Fix shader undefined variable
2022-03-25 01:40:04 -07:00
Bastiaan Olij
0fe06e9467
Extract Decal and Decal atlas from Storage class
2022-03-21 12:22:43 +11:00
Bastiaan Olij
0b5a9e4f6e
Call the correct texture free method on texture storage cleanup
2022-03-20 20:10:44 +11:00
nevarek
7543e22358
Add inverse projection matrix to fragment shader globals
2022-03-18 20:44:51 -07:00
Yuri Roubinsky
0d9aecd967
Rename several transform built-ins in shaders
2022-03-18 12:10:55 +03:00
Rémi Verschelde
756178d342
Merge pull request #59087 from clayjohn/sky-mode
...
Replace DirectionalLight3D's `use_in_sky_only` with `sky_mode` enum
2022-03-18 00:09:35 +01:00
Rémi Verschelde
9263e4e63b
Merge pull request #58954 from Ansraer/alpha_scissor
...
[4.0] Fix alpha scissor support
2022-03-17 22:27:43 +01:00
Hugo Locurcio
c45d2c242b
Replace DirectionalLight3D's `use_in_sky_only` with `sky_mode` enum
...
3 options are available:
- Light and Sky (default)
- Light Only (new)
- Sky Only (equivalent to `use_in_sky_only = true`)
Co-authored by: clayjohn <claynjohn@gmail.com>
2022-03-17 14:00:02 -07:00
Rémi Verschelde
6228063972
Another `-Wsign-compare` fix
...
Fixing CI while afk, fun.
2022-03-17 21:42:35 +01:00
Rémi Verschelde
0e9764607a
Fix `-Wsign-compare` warning after #58993
2022-03-17 21:22:32 +01:00
Rémi Verschelde
e142c10fc5
Merge pull request #58993 from notSanil/device-limit-exceeded-fix
2022-03-17 19:55:40 +01:00
Ansraer
30a89b3f98
Fix alpha scissor support
2022-03-17 16:17:27 +01:00
notSanil
36fa7059ed
Fix device limit exceeding for uniform buffer
2022-03-16 16:52:35 +05:30