Commit graph

966 commits

Author SHA1 Message Date
clayjohn
623753a3a2 Use linear mipmap sampling in ToneMapper 2022-04-30 21:30:08 -07: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