Commit Graph

793 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Bastiaan Olij b8be7903f3 Move storage for Mesh, MeshInstance, MultiMesh and Skeleton into MeshStorage 2022-04-02 16:29:04 +11: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
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
Yuri Roubinsky 509598e8c0 Remove `SHADOW_ATTENUATION` spatial light shader built-in 2022-03-29 08:43:31 +03: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
Bastiaan Olij 57e5a33623 Split dummy renderer classes into separate files
Split canvas_texture_storage and texture_storage from render_storage class
2022-03-16 17:43:10 +11:00
Rémi Verschelde cfd21adf64
Merge pull request #49092 from BastiaanOlij/multiview_clustered
Add multiview support to the clustered forward renderer
2022-03-16 00:17:57 +01:00
Rémi Verschelde 51bbcbdec2
Merge pull request #45263 from KoBeWi/😕 2022-03-15 13:18:27 +01:00
snowapril b6f72f2b4a Fix D_GGX code which can cause divide-by-zero val
When given roughness is lower than 0.01, d value in original code will
be zero. This can make last return value as NAN because of
divide-by-zero. This is well addressed in issue #56373.

Modified code is referenced on D_GGX function of google/filament
(https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L54-L79)

Signed-off-by: snowapril <sinjihng@gmail.com>
2022-03-14 13:25:05 +09:00
Rémi Verschelde 7ed8d52fb2
Merge pull request #58819 from vreon/fix-eyedir-z
Fix flipped EYEDIR.z in sky shaders
2022-03-13 00:55:32 +01:00
kobewi 39d429e497 Change some math macros to constexpr
Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`.
2022-03-09 16:24:32 +01:00
Jesse Dubay d437355f55 Sky renderer: Only flip Z when calculating panorama_coords 2022-03-08 19:51:43 -08:00
Rémi Verschelde 1561737055
Merge pull request #49447 from Calinou/remove-shadow-color-property
Remove unused `shadow_color` property from Light3D
2022-03-08 07:48:05 +01:00
Rémi Verschelde f488a841c7
Merge pull request #58779 from techiepriyansh/forward-mobile-ambient-accum 2022-03-07 16:46:33 +01:00
Jesse Dubay ff2a5c04b1 Sky renderer: Don't invert Z component of light direction 2022-03-06 23:58:54 -08:00
reduz b0ca03b0a2 Add a UniformSet cache
* Changed syntax usage for RD::Uniform to create faster with a single RID
* Converted render pass setup to use this in clustered renderer to test.

This is the first step into creating a proper uniform set cache system to simplify large parts of the codebase.
2022-03-06 13:03:33 +01:00
Jesse Dubay 80345f7d4e Fix flipped EYEDIR.z in sky shaders 2022-03-05 17:49:32 -08:00
Priyansh Rathi 8c37cfa5bb
use the computed value ambient_accum for ambient_light in scene_forward_mobile.glsl 2022-03-05 14:24:40 +05:30
Hugo Locurcio aea104deb7
Remove unused `shadow_color` property from Light3D
This shadow color property was no longer effective since the shaders
were optimized to improve occupancy.
2022-03-04 23:12:18 +01:00
Rémi Verschelde c787f59931
Merge pull request #58734 from Calinou/tweak-render-timestamp-names
Tweak render timestamp names for explicitness and consistency
2022-03-04 20:43:08 +01:00
Rémi Verschelde 3078b92dff
Merge pull request #58512 from Calinou/light3d-add-distance-fade 2022-03-04 12:26:29 +01:00
Hugo Locurcio c509a3a3a5
Tweak render timestamp names for explicitness and consistency
- Add 2D and 3D in timestamp names when needed to avoid ambiguity.
- Use present tense in all render timestamp names.
- Add a space after ">" (begin) and "<" (end) symbols.
- Remove redundant "End" in render timestamp names (indicated by "<").
2022-03-04 08:46:12 +01:00
Bastiaan Olij e4b7a69bb6 Add multiview/stereoscopic rendering support to the clustered forward renderer 2022-03-03 20:06:14 +11:00
Rémi Verschelde 0036a41a10
Revert "Fix particle trail glitch" 2022-03-01 20:16:10 +01:00
Rémi Verschelde e7176e6c85
Merge pull request #58614 from Calinou/ssr-roughness-quality-enum-fix-typo
Fix typo in SSR roughness quality enum value names
2022-02-28 10:51:20 +01:00
Hugo Locurcio 83efe4d8b0
Fix typo in SSR roughness quality enum value names 2022-02-28 01:06:26 +01:00
floppyhammer 1675c5375e Fix particle trail glitch 2022-02-26 13:53:06 +08:00
Hugo Locurcio b1a295b739
Implement distance fade properties in OmniLight3D and SpotLight3D
This can be used to fade lights and their shadows in the distance,
similar to Decal nodes. This can bring significant performance
improvements, especially for lights with shadows enabled and when
using higher-than-default shadow quality settings.

While lights can be smoothly faded out over distance, shadows are
currently "all or nothing" since per-light shadow color is no longer
customizable in the Vulkan renderer. This may result in noticeable
pop-in when leaving the shadow cutoff distance, but depending on the
scene, it may not always be that noticeable.
2022-02-25 15:17:35 +01:00
Darryl Ryan 3ce5cceef9 Filament specular fix. Clamp dot product between normal and view vectors. Fixes #58459. 2022-02-23 18:16:52 +00:00
Bastiaan Olij a78a9fee71 Implementing OpenXR driver 2022-02-23 12:02:24 +01:00
clayjohn fe49244611 Use Filament specular models and parametrization 2022-02-22 19:39:41 -08:00
floppyhammer 0d5472dd1a Fix GPUParticles2D emission offset in global coords 2022-02-22 17:50:01 +08:00
Rémi Verschelde c77348b468
Merge pull request #58419 from clayjohn/Vulkan-anisotropy-crash 2022-02-22 09:09:16 +01:00
clayjohn 2da35d2b94 Fix shader compilation error with anisotropy 2022-02-21 22:58:33 -08:00
clayjohn 9d104ad839 Use properly use non-perceptual roughness when filtering radiance 2022-02-21 22:53:12 -08:00
Rémi Verschelde 7a68ee5134
Merge pull request #58266 from clayjohn/revert-sky-change 2022-02-18 12:07:40 +01:00
Rémi Verschelde 488116e4d8
Merge pull request #58236 from bruvzg/win_min_fix 2022-02-18 09:07:10 +01:00
clayjohn e0384fb70e Revert "Fix default sky process mode not being Real-Time"
This reverts commit aa1cba1d53.
2022-02-17 23:13:10 -08:00
Rémi Verschelde e1b8a86b2b
Merge pull request #58177 from clayjohn/VULKAN-prefiltered-radiance 2022-02-17 17:53:42 +01:00
bruvzg 0c27667124 [Windows] Fix Vulkan driver crash on sub-window minimization. 2022-02-17 13:34:08 +02:00
clayjohn 48728a79b6 Use prefiltered radiance 2022-02-16 21:37:18 -08:00
Rémi Verschelde b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
clayjohn a38c3a763a Properly exclude lights that are marked as sky only 2022-02-16 00:16:56 -08:00
Hugo Locurcio aa1cba1d53
Fix default sky process mode not being Real-Time
The change in 09563e4bd8 wasn't
consistently carried out everywhere needed.
2022-02-16 01:51:48 +01:00
reduz 4f73d3beb4 Add Particle Shader Userdata
* Adds optional vec4 USERDATA1 .. USERDATA6 to particles, allowing to store custom data.
* This data is allocated on demand, so shaders that do not use it do not cost more.
2022-02-15 19:20:31 +01:00
Rémi Verschelde 5a6da0b2a9
Merge pull request #57905 from V-Sekai/fix_instance_clear_warnings
Free surface vertex_buffers after vertex_arrays to silence warnings
2022-02-15 08:32:32 +01:00
Rémi Verschelde af91a42b0a
Merge pull request #57904 from V-Sekai/fix_double_free_warning
Fixes some 'Attempted to free invalid ID' warnings in mobile renderer
2022-02-15 08:30:44 +01:00
Rémi Verschelde 18d6b75ba8
RendererRD: Remove binding specifier for push constants
This is unsupported and glslang made it raise an error in 11.7.0:
https://github.com/KhronosGroup/glslang/pull/2810

Co-authored-by: Clay John <claynjohn@gmail.com>
2022-02-11 18:42:32 +01:00
Rémi Verschelde 2921cf6a99
Merge pull request #57888 from dusakus/depanoramize-spot-projector
remove normal_to_panorama from spotlight projector
2022-02-11 10:41:00 +01:00
Hugo Locurcio 66d27df12f
Fix 3D sky update performance regression 2022-02-10 20:21:28 +01:00
Rémi Verschelde e4e6813baf
Merge pull request #57535 from Calinou/visibility-range-fade-use-easing 2022-02-10 18:18:53 +01:00
Rémi Verschelde 11cefc2b28
Merge pull request #57104 from clayjohn/VULKAN-sky-conflict 2022-02-10 17:46:42 +01:00
Rémi Verschelde 7332aff3fd
Merge pull request #54677 from Calinou/voxelgi-default-low-quality 2022-02-10 17:35:52 +01:00
Rémi Verschelde c6199da8b8
Merge pull request #39965 from Calinou/tweak-sdfgi-defaults 2022-02-10 17:31:54 +01:00
Rémi Verschelde 2fafcfebdf
Merge pull request #57707 from Calinou/sdfgi-tweak-default-num-cascades 2022-02-10 17:27:42 +01:00
Rémi Verschelde 67c6442844
Merge pull request #57628 from Calinou/shadow-atlas-default-enable-16-bits 2022-02-10 17:19:37 +01:00
SaracenOne 824ece9d89 Free surface vertex_buffers after vertex_arrays due dependencies 2022-02-10 10:34:34 +00:00
SaracenOne 71eb3f6df5 Fix _free_render_buffer_data freeing shared half_texture and half_fb 2022-02-10 10:04:18 +00:00
Bartłomiej Dusak 38423565e4 remove normal_to_panorama from spotlight projector 2022-02-09 23:47:44 +01:00
Rémi Verschelde a6abeb6b20
Merge pull request #57682 from clayjohn/VULKAN-canvas-blur 2022-02-07 10:16:50 +01:00
Rémi Verschelde 3ae38edc8e
Merge pull request #56844 from Calinou/ssr-fix-background-line-master
Fix visible background line in intersections in screen-space reflections
2022-02-06 23:22:15 +01:00
Hugo Locurcio 7721e19ccc
Tweak default SDFGI settings for better quality
- Enable Read Sky Light to get proper outdoors lighting out of the box.
- Set bounce feedback to 0.5 by default to get a better quality result.
  - Higher values may cause infinite feedback with bright surfaces.
- Increase the number of frames to converge to improve quality
  at the cost of latency. Most scenes are fairly static after all.
- Use 75% Y scale by default as most scenes are not highly vertical.

- Reorder the Y scale enum to go from the lowest Y scale to the highest.
  Also rename the "Disabled" setting to "100%" for clarity.
2022-02-06 15:28:59 +01:00
Hugo Locurcio b9cfc74f29
Decrease the default number of SDFGI cascades to 4
This improves rendering performance noticeably, especially when the
camera moves fast.

On a medium-sized test scene on a GTX 1080 in 2560×1440, going
from 6 to cascades saves 0.5 ms of frame time while looking visually
identical (as most of the scene fits within the 4 cascades).
2022-02-06 15:01:25 +01:00
clayjohn 60d8df3fee Optimize and fix backbuffer gaussian blur 2022-02-05 15:03:39 -08:00
theoniko 0c0ff5da50 Fix copy paste bug in renderer_rd/effects_rd.cpp 2022-02-05 06:41:30 +01:00
Hugo Locurcio e4eafb254a
Enable 16-bit shadow atlas by default in the RenderingServer methods
16-bit shadow atlases are already the default in the project settings,
but low-level methods used 24-bit shadows by default.

This makes low-level methods more consistent with the default project
settings to avoid accidental performance issues when users change
the shadow size at run-time.
2022-02-04 16:41:08 +01:00
Hugo Locurcio 20464fd103
Make visibility range alpha fade smoother
`smoothstep()` avoids the sudden transparency jump when entering or
leaving an object's alpha 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-02-01 23:54:44 +01:00
Anilforextra fc27636999 Vectors: Use clear() and has().
Use clear() instead of resize(0).

Use has() instead of "find(p_val) != -1".
2022-02-02 00:11:09 +05:45
orosmatthew b0202c3a7d Fix orthogonal camera auto LOD calculation
- Do not take orthogonal camera's distance into account when calculating LOD.
- Only take into account screen size taken up.
2022-01-30 11:54:27 -05:00
Nathan Franke 8a0a3accee
simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
Rémi Verschelde 58324f4df8
Merge pull request #54574 from Ansraer/glow_map 2022-01-26 13:39:51 +01:00
Rémi Verschelde d9fd16c8e4
Merge pull request #53954 from Chaosus/fix_quit_errors 2022-01-25 20:09:52 +01:00
jfons 238862bddb Minor fixes to shadow atlases:
* Erase shadow owner *before* setting it to RID().
* Add default texture in shadow atlas debug view to avoid error spam when no atlas is present.
* Fix typo.
2022-01-24 15:55:32 +01:00
clayjohn 430d5d64aa Update Sky lights in sky setup function 2022-01-23 15:06:49 -08:00
Rémi Verschelde 7e3b92f81f
Merge pull request #55360 from Calinou/rename-bake-mode-properties 2022-01-20 17:35:32 +01:00
Ansraer 90652b1755 add support for glow maps 2022-01-20 16:47:25 +01:00
lawnjelly b411a731fe Add nodiscard to core math classes to catch c++ errors.
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
2022-01-20 13:07:49 +00:00
Rémi Verschelde cba2fd2e80
Revert "Add new scaling modes for splash screen"
This reverts commit fcc9f5ce39.

The feature is good but the implementation still needs more work.
A new PR will be made with a rework of this commit.
2022-01-19 16:09:52 +01:00
Rémi Verschelde 8b8e858778
Merge pull request #54489 from briansemrau/texture-delete-update 2022-01-19 10:10:54 +01:00
Samuel Pedrajas fcc9f5ce39
Add new scaling modes for splash screen
Removes the `fullsize` option which is superseded by `stretch_mode`.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-01-18 23:29:11 +01:00
Rémi Verschelde 01eefa2c50
Merge pull request #56761 from Calinou/sdfgi-allow-any-number-of-cascades 2022-01-18 16:21:39 +01:00
clayjohn ba431a9306 Fix volumetric fog memory leak on resize 2022-01-17 21:30:48 -08:00
Hugo Locurcio 2dc7b03a82
Allow using between 1 and 8 cascades for SDFGI
This provides more flexibility between performance and quality
adjustments, especially when using SDFGI for small-scale levels
(which can be useful for procedurally generated scenes).
2022-01-17 16:49:02 +01:00
Hugo Locurcio d6c7d4ab5d
Fix visible background line in intersections in screen-space reflections
Adjusting the step grading by one resolves the issue without affecting
performance or introducing adverse artifacts.
2022-01-16 18:08:07 +01:00
Rémi Verschelde a27b85378b
Merge pull request #56309 from Calinou/remove-pvrtc-support 2022-01-16 11:15:34 +01:00
clayjohn abd0003e4c Remove mistakenly added push constant from SSR 2022-01-15 17:03:55 -08:00
Hugo Locurcio 40be15920f
Remove support for PVRTC texture encoding and decoding
On the only platform where PVRTC is supported (iOS),
ETC2 generally supersedes PVRTC in every possible way. The increased
memory usage is not really a problem thanks to modern iOS' devices
processing power being higher than its Android counterparts.
2022-01-14 21:08:22 +01:00
luz paz 858bcd5058 Fix various typos
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inh,inout,leapyear,lod,nd,numer,ois,ony,paket,ro,seeked,sinc,switchs,te,uint,varn,vew`
2022-01-13 23:20:01 -05:00
clayjohn 9b1f242feb Fix cannot use gaussian blur error 2022-01-12 21:58:37 -08:00
Rémi Verschelde 585231a172
Merge pull request #56492 from akien-mga/remove-author-docstrings 2022-01-12 15:24:17 +01:00
Rémi Verschelde bfd0afca58
Merge pull request #55656 from clayjohn/GLSL3-compiler 2022-01-12 11:33:48 +01:00
clayjohn 99064d57db New OpenGL batching canvas renderer 2022-01-11 22:26:18 -08:00
Anilforextra 6c3a0460a8 Use List Initializations for Vectors. 2022-01-12 10:15:12 +05:45
Anilforextra c9f5d88f3a Use fill() to fill an entire image instead of setting pixels individually. 2022-01-08 17:43:15 +05:45
SaracenOne cd842b65bf Fix queueing a texture and regular uniform update in RD backend in succession. 2022-01-06 16:05:07 +00:00
Fernando Cosentino ca79373d13
Added material_overlay property to MeshInstance3D
Applying overlay materials into multi-surface meshes currently
requires adding a next pass material to all the surfaces, which
might be cumbersome when the material is to be applied to a range
of different geometries. This also makes it not trivial to use
AnimationPlayer to control the material in case of visual effects.
The material_override property is not an option as it works
replacing the active material for the surfaces, not adding a new pass.

This commit adds the material_overlay property to GeometryInstance3D
(and therefore MeshInstance3D), having the same reach as
material_override (that is, all surfaces) but adding a new material
pass on top of the active materials, instead of replacing them.
2022-01-05 11:47:51 +01:00
JFonS 7c5c351766
Merge pull request #56220 from williamd67/GPULightmapper-implement-sky-ambient-light
GPULightmapper: react on sky ambient properties
2022-01-05 10:55:05 +01:00
Rémi Verschelde e976cd0b29
Merge pull request #56208 from williamd67/GPULightmapper-sky-upside-down 2022-01-05 10:51:19 +01:00
Rémi Verschelde c7bbb3a621
Merge pull request #56278 from GanidhuAbey/dof_msaa_bug 2022-01-05 10:47:27 +01:00
bruvzg 679fe92bb3
Fix incorrect format and buffer used for bone weights. 2022-01-05 08:44:59 +02:00
Rémi Verschelde ba2bdc478b
Style: Remove inconsistently used `@author` docstrings
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.

`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
2022-01-04 20:42:50 +01:00
Rémi Verschelde eab30316ee
Merge pull request #55332 from Calinou/voxelgidata-tweak-default-dynamic-range
Decrease the default dynamic range in VoxelGIData to 2.0
2022-01-04 17:18:28 +01:00
Rémi Verschelde 3a5a3473be
Merge pull request #54791 from NHodgesVFX/master
[4.x] add more OpenGL attributes
2022-01-04 16:52:27 +01:00
Yuri Roubinsky bba9d9be14
Merge pull request #56486 from Chaosus/shader_fix_render_mode 2022-01-04 18:44:11 +03:00
Rémi Verschelde 095c72b03e
Merge pull request #55790 from Calinou/renderingserver-add-device-type-getter
Add `RenderingServer.get_video_adapter_type()` method
2022-01-04 16:43:23 +01:00
Rémi Verschelde 851fb16350
Merge pull request #56305 from Calinou/rename-lod-threshold 2022-01-04 15:28:06 +01:00
Rémi Verschelde ff211c8e5a
Merge pull request #55386 from Calinou/allow-disable-depth-prepass 2022-01-04 15:25:11 +01:00
Yuri Roubinsky 5123ffe4a7 Fix `world_vertex_coords` render mode usage in the shaders 2022-01-04 17:06:12 +03:00
JFonS e432181dc3
Merge pull request #55418 from Calinou/voxelgi-dynamic-map-use-16-bit-depth
Use 16-bit depth to improve dynamic VoxelGI performance
2022-01-04 14:17:47 +01:00
Rémi Verschelde 7f66c16c03
Merge pull request #51206 from clayjohn/Vulkan-ASSGI 2022-01-04 10:00:17 +01:00
Rémi Verschelde 34de6d16aa
Merge pull request #54409 from clayjohn/VULKAN-glow-flicker 2022-01-04 09:59:07 +01:00
Rémi Verschelde 370f0a162d
Merge pull request #55424 from Calinou/voxelgi-remove-unused-struct-fields
Remove unused struct fields in VoxelGIData
2022-01-04 09:50:00 +01:00
Rémi Verschelde a97889abe4
Merge pull request #55422 from Calinou/gi-shader-remove-unused-define
Remove unused code in GI shaders
2022-01-04 09:49:42 +01:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Yuri Roubinsky fd9c92d4ab Add a shader warning when the uniform buffer limit is exceeded 2022-01-03 16:24:56 +03:00
Rémi Verschelde c6c834e745
Merge pull request #56187 from Chaosus/fix_default_texture 2022-01-03 13:08:25 +01:00
Yuri Roubinsky ab239e9abb Fix incorrect updating global uniform buffer 2021-12-31 13:31:01 +03:00
Hugo Locurcio df09bc38cb
Rename Lod Threshold to Mesh Lod Threshold
This makes it more obvious that the setting only affects mesh LOD,
not manual (H)LOD achieved using visibility ranges.
2021-12-29 00:11:50 +01:00
GanidhuAbey 133486bfba fixed depth of field bug with msaa 2021-12-26 23:13:47 -08:00
William Deurwaarder 68a5dad226 GPULightmapper: react on sky ambient properties
The panorama texture creation, used by GPULightmapper, has been adjusted to
also take the sky ambient properties into account.
2021-12-24 15:47:42 +01:00
William Deurwaarder 246fbd5442 GPULightmapper: cube to panorama copy function flip y based on flag
Cube to panorama copy function unconditionally flipped y, while other copy functions flipped y base on FLAG_FLIP_Y. Condition is added.
2021-12-24 00:47:42 +01:00
Yuri Roubinsky 8e5008dfbd Fix default texture of unassigned sampler with hint_normal 2021-12-23 11:15:46 +03:00
Hugo Locurcio e962900f23
Rename and reorder bake mode properties for consistency
The order now goes from least to most computationally expensive:

- Disabled
- Static
- Dynamic
2021-12-14 12:01:12 +01:00
Hugo Locurcio 92e9cca5be
Rename `hint_aniso` to `hint_anisotropy` in the shader language
The word "anisotropy" is used in full form in BaseMaterial3D's
anisotropy-related properties.
2021-12-10 17:41:17 +01:00
Hugo Locurcio b3174e7af9
Add `RenderingServer.get_video_adapter_type()` method
This can be used to distinguish between integrated, dedicated, virtual
and software-emulated GPUs. This in turn can be used to automatically
adjust graphics settings, or warn users about features that may run
slowly on their hardware.
2021-12-10 17:10:47 +01:00
Rémi Verschelde bdf8340e59
Merge pull request #43181 from nathanfranke/string-empty
Replace String comparisons with "", String() to is_empty()
2021-12-10 08:56:31 +01:00
Rémi Verschelde f0b5cd51b6
Merge pull request #55714 from Geometror/fix-fog-spotlight 2021-12-09 18:05:17 +01:00
Nathan Franke 49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Hendrik Brucker 1da732af35 Fix volumetric fog in combination with spotlights 2021-12-08 22:17:09 +01:00
Yuri Roubinsky 76f6c0849c Make `compile` shader function to use struct instead long parameter list 2021-12-08 11:34:40 +03:00
Hugo Locurcio c5550108c8
Decrease the default dynamic range in VoxelGIData to 2.0
This reduces visible banding in indirect lighting and reflections.
Sharp reflections now match more closely the original scene.

The downside of this change is that clipping may appear in reflections
in extremely bright scenes, but this should not be a concern in most
scenes.
2021-12-08 00:28:17 +01:00
Rémi Verschelde 46d384060e
Merge pull request #35901 from nathanfranke/pool-byte-array-subarray-exclusive 2021-12-07 14:00:59 +01:00
Hugo Locurcio 89ec3d3bc7
Remove or make verbose some debugging prints
The message about SpatialMaterial conversion was turned into a warning,
as it can potentially interfere with porting projects from Godot 3.x
(if there's a bug in the conversion code).
2021-12-05 23:22:23 +01:00
Yuri Roubinsky 5ba93619fa Allow using empty statements in the shader, added formatting warning 2021-12-01 11:52:25 +03:00
Hugo Locurcio 36106dba3b
Remove unused struct fields in VoxelGIData
This reduces the struct size from 112 bytes to 96 bytes.
2021-11-28 23:09:51 +01:00
Hugo Locurcio 0beacf2ce8
Remove unused code in GI shaders 2021-11-28 22:58:54 +01:00
Hugo Locurcio 565f9c0448
Use 16-bit depth to improve dynamic VoxelGI performance
In a complex scene with several dynamic emissive objects, this
saves over 1 ms of GPU time on a GTX 1080 in 2560×1440.
2021-11-28 18:51:36 +01:00
Hugo Locurcio 989a7d9270
Allow disabling the depth prepass in the Vulkan Clustered backend
In scenes that have little to no overdraw, disabling the depth prepass
can give a small performance boost. Nonetheless, in most other scenarios,
the depth prepass should be left enabled as it improves performance
significantly.
2021-11-27 17:54:45 +01:00
Nathan Franke dd30253cdc
PackedByteArray, Array slice end exclusive, rename subarray to slice 2021-11-26 22:13:12 -06:00
Yuri Roubinsky 0f1f002e74 Fix `TIME` using in custom functions of particle shader 2021-11-26 19:03:01 +03:00
Rémi Verschelde 4813abc6e7
Merge pull request #55311 from Chaosus/fix_uniform_array
Fix uniform array alignment to fix a bug
2021-11-26 08:25:14 +01:00
Yuri Roubinsky 43d999e346 Fix uniform array alignment to fix a bug 2021-11-25 23:38:08 +03:00
Hugo Locurcio c73a51fd55
Remove disabled debug code in ClusterBuilderRD 2021-11-25 20:28:50 +01:00
bruvzg b7e6e50dd2
[macOS / iOS] Use non atomic operation to store facing bits on MoltenVK. 2021-11-25 12:43:45 +02:00
Rémi Verschelde 547c270777
Merge pull request #51679 from Je06jm/fsr
AMD FidelityFX Super Resolution
2021-11-24 22:34:48 +01:00
bruvzg 5e0a034524
[macOS / iOS] Use storage buffers instead of unsupported images for the volumetric fog on MoltenVK. 2021-11-24 09:16:16 +02:00
Je06jm 20deb0917d Implemented AMD's FSR as a computer shader for upscaling 3D scenes 2021-11-23 14:16:03 -07:00
Yuri Roubinsky f4c0e90fd9 Allow passing non-variable constant to const function param in shaders 2021-11-19 12:14:13 +03:00
jfons 4c4b6620a0 Fix Depth-Prepass transparency mode
Add mising bits of implementation and ensure depth-prepass objects are
only rendered in the transparency pass.
2021-11-18 12:49:46 +01:00
Rémi Verschelde c30aa372ca
Merge pull request #55029 from clayjohn/VULKAN-SRGB
Add SHADER_IS_SRGB define to Vulkan renderer
2021-11-17 08:46:23 +01:00
clayjohn 358820c4b7 Fix SRGB conversions in Vulkan Renderer 2021-11-16 20:56:13 -08:00
Yuri Roubinsky df3b42411d Fix broken light_compute in mobile renderer 2021-11-13 17:24:31 +03:00
Brian Semrau 716e15cd26 Fix multimesh still drawing when visible instances is zero 2021-11-12 21:51:14 -05:00
Yuri Roubinsky 826e781bfa Fix default_texture_param in shader pipeline to support uniform arrays 2021-11-12 12:53:40 +03:00
Yuri Roubinsky a45ae7b1c7 Fix shader crashing when using `ALBEDO` or `ALPHA` in light function 2021-11-11 11:59:30 +03:00
NHodgesVFX dbe366a830 add more OpenGL attributes 2021-11-08 20:12:11 -05:00
Dominic-ATOR d7a4187b05 Implement CameraEffects override_exposure 2021-11-08 21:14:56 +00:00
clayjohn 0eff109a21 Added SSIL post processing effect 2021-11-06 12:43:19 -07:00
Hugo Locurcio 91aa7cf1da
Decrease the default VoxelGI quality to improve performance
On a GeForce GTX 1080 in 2002×1447 resolution, decreasing VoxelGI quality
from High to Low quality saves 1.2 ms of GPU time in a medium-sized
test scene. This only results in a minor drop in quality.
2021-11-06 19:40:52 +01:00
Brian Semrau 4a1c28460e Fix materials not updating when texture replaced/deleted 2021-11-01 15:33:59 -04:00
Rémi Verschelde 210e6cc167
Merge pull request #54459 from rxlecky/fix-multimesh-buffer-overflow-53603 2021-11-01 11:18:11 +01:00
SeleckyErik 6b04f08b28 Fix multimesh buffer overflow in RendererStorageRD 2021-10-31 18:48:51 +01:00
M. Huri 4052d85d05 Repaired mistyped of 'threshold' on several files. 2021-10-31 22:11:42 +07:00
Rémi Verschelde d6f972fad4
Merge pull request #54403 from briansemrau/fix-small-fogvolume
FogVolume don't dispatch compute with zero-dimension groups
2021-10-31 09:12:10 +01:00
Brian Semrau 8f75ad4df2 Don't use Texture image caches if they are rendered to 2021-10-30 13:34:39 -04:00
Rémi Verschelde 6b0b1a4c04
Merge pull request #54405 from JFonS/fix_instance_index
Fix instance index in forward clustered shader
2021-10-30 14:22:22 +02:00
Brian Semrau 346e497959 Disallow compute dispatch with zero dimensions. 2021-10-30 02:39:25 -04:00
clayjohn 4d1d2b3900 Weight glow samples to reduce fireflies 2021-10-29 21:41:57 -07:00
jfons 6db13d3231 Fix instance index in forward clustered shader 2021-10-30 02:53:09 +02:00
Yuri Roubinsky 4da0de0085 Fix error spammed to output if `FogVolume` is setted to scene 2021-10-29 23:24:01 +03:00
Yuri Roubinsky a6ddfecc9f Fix crash when opening a converted `FogMaterial` 2021-10-29 14:18:38 +03:00
clayjohn 1b2cd9f251 Addition of FogVolumes, FogShaders, FogMaterial, and overhaul of VolumetricFog
Co-authored-by: Brian Semrau <brian.semrau@gmail.com>
2021-10-28 22:02:23 -07:00
Rémi Verschelde f7d852b532
Merge pull request #54350 from akien-mga/clang-format-dont-align-operands 2021-10-28 17:10:52 +02:00
Rémi Verschelde e2deec67b9
Merge pull request #54222 from JFonS/instance-fade 2021-10-28 16:05:55 +02:00
Rémi Verschelde 3a6be64c12
clang-format: Various fixes to comments alignment from `clang-format` 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 15:43:36 +02:00
Rémi Verschelde 3b11e33a09
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Joan Fons 95bc9c40d9 Fix shadow disabling on mobile renderer 2021-10-26 15:37:22 +02:00
jfons c46d1ea2b2 Fix shadow disabling settings
Fixes the SHADOW_CASTING_SETTING_OFF setting in
GeometryInstance3D and the "shadows_disabled" render
mode in spatial materials, which were not working
before.
2021-10-25 16:11:32 +02:00
JFonS c571e4a7f4 Implement distance fade and transparency
The built-in ALPHA in spatial shaders comes pre-set with a per-instance
transparency value. Multiply by it if you want to keep it.

The transparency value of any given GeometryInstance3D is affected by:
   - Its new "transparency" property.
   - Its own visiblity range when the new "visibility_range_fade_mode"
     property is set to "Self".
   - Its parent visibility range when the parent's fade mode is
     set to "Dependencies".

The "Self" mode will fade-out the instance when reaching the visibility
range limits, while the "Dependencies" mode will fade-in its
dependencies.

Per-instance transparency is only implemented in the forward clustered
renderer, support for mobile should be added in the future.

Co-authored-by: reduz <reduzio@gmail.com>
2021-10-25 11:39:34 +02:00
Rémi Verschelde 3bebbcacdb
Merge pull request #53992 from Calinou/hard-shadow-mapping-allow-dithering 2021-10-22 19:34:09 +02:00
Hugo Locurcio e87ec8ec17
Add Soft Very Low shadow quality mode for 3D
This can be used to improve 3D shadow rendering quality at little
performance cost. Unlike the existing Hard setting which is limited
to variable shadow blur only, it works with both fixed blur and
variable blur.
2021-10-21 18:34:26 +02:00
Yuri Roubinsky 9142df46b3 Fix built-in texture samplers passing for spatial shader mode 2021-10-21 12:32:32 +03:00
Yuri Roubinsky 5a354aaf6d Prevent a rendering crash and error spam for uniform texture array 2021-10-20 21:30:27 +03:00
Rémi Verschelde 244faf5588
Merge pull request #53972 from zedutch/fix-shader-time-update
Fix shaders using `TIME` not continuously updating
2021-10-19 16:37:55 +02:00
Rémi Verschelde 85a8939fa2
Merge pull request #53790 from briansemrau/remove-distant-shadowy-void 2021-10-19 15:17:09 +02:00
Rémi Verschelde 4387f9645b
Merge pull request #52940 from groud/toast_notification 2021-10-19 09:57:13 +02:00
Robin Arys 0e31465a59 Fix shaders that use TIME do not force editor to continuously update 2021-10-18 22:53:20 +02:00
Yuri Roubinsky 26a26d6657 Fix errors on quitting from an empty project 2021-10-18 14:24:03 +03:00
mennomax b4eeeb315a
Swap args of Plane(point, normal) constructor
Now (normal, point)
2021-10-15 20:49:42 -05:00
Rémi Verschelde 5a276443bd
Merge pull request #53815 from Chaosus/fix_wireframe_render_mode 2021-10-15 16:19:36 +02:00
Yuri Roubinsky 31ad85881d Fix `wireframe` render mode 2021-10-15 06:53:52 +03:00
Brian Semrau e9f1b0a0b2 Remove incorrect fog height density remapping 2021-10-14 16:09:45 -04:00
Brian Semrau 4fefd7cddd Fix several issues with directional shadows
- Internally disable blend splits in orthogonal directional shadow mode
- Fix soft shadows ignoring fade and blend_splits
- Fix soft shadow edge stability
2021-10-14 11:44:32 -04:00
Gilles Roudière 0587e5e018 Implement toast notifications in the editor 2021-10-14 13:30:54 +02:00
Brian Semrau a62e240260 Fix the height fog effect 2021-10-14 04:08:39 -04:00
Yuri Roubinsky e9b7ffd1fa Added few more built-ins to shader language 2021-10-13 20:27:36 +03:00
Rémi Verschelde 88463c3eee
Merge pull request #53712 from CakHuri/nullptr
Replace NULL with nullptr
2021-10-12 22:30:43 +02:00
M. Huri 033dc4dbef Replaced NULL with nullptr 2021-10-12 20:20:19 +07:00
Aaron Franke 7e51e4cb84
Fix some LGTM errors of "Multiplication result converted to larger type" 2021-10-12 00:17:27 -05:00
Yuri Roubinsky db2ee03fff Fix shader crash on using METALLIC and ROUGHNESS built-ins in light func 2021-10-11 13:35:53 +03:00
Hugo Locurcio 265bae824f
Remove unimplemented `Environment.ambient_light_occlusion_color` property
This property was intended to provide a way to have SSAO or VoxelGI
ambient occlusion with a color other than black. However, it was
dropped during the Vulkan renderer development due to the performance
overhead it caused when the feature wasn't used.
2021-10-07 17:47:52 +02:00
Yuri Roubinsky 410cab4c61
Merge pull request #53491 from Chaosus/shader_fix_texture_array_uniforms 2021-10-07 10:00:12 +03:00
Rémi Verschelde 149e10da1c
Merge pull request #53504 from clayjohn/VULKAN-sky-bug
Remove bogus sky error check
2021-10-07 08:09:01 +02:00
Rémi Verschelde 3f94a5ebe7
Merge pull request #51115 from clayjohn/VULKAN-SSAO-radius
Move assignment of SSAO radius push constant
2021-10-07 08:04:17 +02:00
clayjohn 23dc490f40 Remove bogus sky error check 2021-10-06 22:04:56 -07:00
Yuri Roubinsky b5028da5c0 Fix regression which prevents using texture array uniforms 2021-10-06 22:31:07 +03:00
Yuri Roubinsky 6873ecaaf9 Added support for uniform arrays in shaders 2021-10-04 13:57:44 +03:00
Lightning_A c63b18507d Use range iterators for `Map` 2021-09-30 15:09:12 -06:00
Hugo Locurcio ba65730cbf
Rename RID's `getornull()` to `get_or_null()` 2021-09-29 23:58:02 +02:00
Manuel Dun 485eac3d3f radial fog fix 2021-09-29 15:49:59 -04:00
Hendrik Brucker 6a9f3746af Fix editor freeze when asigning Skeleton2D to Polygon2D 2021-09-29 01:50:01 +02:00
Rémi Verschelde 4296539d94
Merge pull request #53072 from CaptainProton42/fix-gpuparticles3d-generate-aabb 2021-09-28 16:20:22 +02:00
Bastiaan Olij cbdde9dff9 Fix access to render target texture for XR interfaces 2021-09-28 19:46:50 +10:00
CaptainProton42 1731030b3c Fix GPUParticles3D local_coords 2021-09-26 00:30:37 +02:00
CaptainProton42 dd70daafba Fix GPUParticles3D generate AABB 2021-09-26 00:30:37 +02:00
Anilforextra cdd912c48e Construct values only when necessary. 2021-09-25 14:46:45 +05:45
Anilforextra cc51b045da Construct values only when necessary. 2021-09-23 22:26:07 +05:45
Anilforextra 90908cd67d Add Get Center Method for Rect2/Rect2i and AABB. 2021-09-21 21:14:17 +05:45
Rémi Verschelde ec23d1348a
Merge pull request #52409 from GiantBlargg/position-depth-pre-pass 2021-09-17 14:21:29 +02:00
Rémi Verschelde 8ecc571158
Merge pull request #49063 from Calinou/remove-16x-msaa
Remove 16× MSAA support due to driver bugs and low performance
2021-09-13 17:34:04 +02:00
Rémi Verschelde 078bdef7e9
Merge pull request #51939 from clayjohn/VULKAN-horizon-so-fix
Compute horizon SO threshold before transformation
2021-09-13 11:44:42 +02:00
JFonS 5f69218edc
Merge pull request #51604 from TechnoPorg/fix-vulkan-parent-material
Vulkan: Fix CanvasItem::use_parent_material
2021-09-12 01:00:30 +02:00
Lyuma aca4b737f1 8 uvs for glTF2, URI decode and Vertex Custom api.
Add glTF2 uri decode for paths.

Add vertex custom apis.

Add scene importer api.

Change Color to float; add support for float-based custom channels in SurfaceTool and EditorSceneImporterMesh

Co-authored-by: darth negative hunter
 <thenegativehunter2@users.noreply.github.com>
2021-09-10 09:16:48 -07:00
Juan Linietsky 7c9cdea836
Merge pull request #52476 from Lauson1ex/master
Replace current ACES tonemapper with a high quality one
2021-09-09 19:13:44 -03:00
Juan Linietsky 3c554f09ea
Merge pull request #52252 from Calinou/sdfgi-use-light-indirect-energy
Use the Light3D Indirect Energy property in SDFGI
2021-09-09 17:17:48 -03:00
Endri Lauson 065d13eddc Replace ACES tonemapper with a high quality one 2021-09-07 19:46:02 -03:00
Bastiaan Olij 461d31427c
Merge pull request #52205 from BastiaanOlij/blit_source_rect
Add source rectangle to blit
2021-09-07 09:21:13 +10:00
Daniel Doran 3138b94058 Fix depth pass for shaders that set POSITION 2021-09-05 01:05:42 -06:00
Clay John 036b7a0985
Merge pull request #51873 from Chaosus/fix_uniform_error_spam
Fix incorrect checking of uniform set to prevent error spam (2)
2021-08-31 11:28:48 -07:00
Hugo Locurcio 2c507cd426
Use the Light3D Indirect Energy property in SDFGI
The Indirect Energy property was previously ignored in SDFGI
(unlike VoxelGI).
2021-08-30 14:53:03 +02:00
Bastiaan Olij fbac863bfb Add source rectangle to blit 2021-08-29 14:57:16 +10:00
K. S. Ernest (iFire) Lee 90a35dac48
Merge pull request #51908 from bruvzg/msdf_fonts2
Make FontData importable resource. Add multi-channel SDF font rendering.
2021-08-27 08:51:37 -07:00
Juan Linietsky 712bcf564f
Merge pull request #52092 from Calinou/voxelgi-remove-anisotropic-leftovers
Remove leftovers of anisotropy in the VoxelGI shader code
2021-08-27 12:22:57 -03:00
bruvzg 4c3f7d1290 Makes FontData importable resource.
Adds multi-channel SDF font texture generation and rendering support.
Adds per-font oversampling support.
Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading.
Adds BMFont binary format and outline support.
2021-08-27 15:43:18 +03:00
Bastiaan Olij 64626cc435 Optionally scale 3D render content 2021-08-26 20:48:40 +10:00
Bastiaan Olij 6e87d62873
Merge pull request #50883 from BastiaanOlij/mobile_hdr
Scale color output in the mobile renderer to provide HDR support
2021-08-26 11:23:22 +10:00
JFonS c334989e00
Merge pull request #51821 from Calinou/builtin-shaders-add-comments
Add comments at the top of each built-in shader to ease debugging
2021-08-25 11:37:57 +02:00
Hugo Locurcio 6a6c0890c2
Remove leftovers of anisotropy in the VoxelGI shader code
Anisotropy support was removed when VoxelGI was reworked as it was
too demanding on the GPU.
2021-08-25 10:23:28 +02:00
Hugo Locurcio 7192852da3
Remove 16× MSAA support due to driver bugs and low performance
In the `master` branch, 16× MSAA caused the entire system to freeze
on NVIDIA GPUs. This is likely caused by graphics drivers not actually
implementing 16× MSAA, but combining 8× MSAA with 2× SSAA instead.

On top of that, modern shader complexity makes 16× MSAA very difficult
to use while keeping a good framerate. 8× MSAA is hard enough to use
as it is.
2021-08-25 07:56:27 +02:00
Max Hilbrunner 583b6a594a
Merge pull request #51971 from aaronfranke/https
Replace HTTP URLs with HTTPS for sites with HTTPS versions
2021-08-23 15:58:54 +02:00
Michael Alexsander 88db541705
Merge pull request #51947 from AnilBK/redundant-assignments
[cppcheck] Remove some redundant assignments.
2021-08-23 13:23:45 +00:00
Bastiaan Olij d22163c657 Scale color output in the mobile renderer to provide HDR support 2021-08-23 15:30:36 +10:00
Bastiaan Olij 2d446771d6
Merge pull request #51980 from BastiaanOlij/fix_multiview_tonemap
Fix multiview defines in tonemap shader
2021-08-23 12:02:18 +10:00
Aaron Franke ae1702bee5
Replace HTTP links with HTTPS for sites with HTTPS versions 2021-08-22 20:13:11 -05:00
Duarte David 7e94c583e0 Fixed non-uniform scaling of normals 2021-08-22 19:28:18 +01:00
Bastiaan Olij 74a647bddd Fix multiview defines in tonemap shader 2021-08-22 21:30:58 +10:00
Anilforextra c86db8b710 Remove redundant assignments.
Use used_in_transfer instead of used_in_compute twice.
2021-08-21 19:20:07 +05:45
clayjohn bccc4cd735 Compute horizon so threshold before transformation 2021-08-20 19:27:52 -07:00
jfons 55e7832d7b Improvements to SpotLight3D and OmniLight3D's shadows
OmniLight3D:
* Fixed lack of precision in cube map mode by scaling the projection's
  znear.
* Fixed aliasing issues by making the paraboloids use two square regions instead of two half
  squares.
* Fixed shadowmap atlas bleeding by adding padding.
* Fixed sihadow blur's inconsistent radius and unclamped sampling.

SpotLight3D:
* Fixed lack of precision by scaling the projection's znear.
* Fixed normal biasing.

Both:
* Tweaked biasing to make sure it works out of the box in most situations.
2021-08-19 13:46:51 +02:00
Yuri Roubinsky b6af457d25 Fix incorrect checking of uniform set to prevent error spam (2) 2021-08-19 09:11:01 +03:00
reduz 700f9d916d More fixes to mobile renderer
* Specify all precision qualifiers
* Makes renderer work on Adreno Vulkan
2021-08-18 12:20:19 -03:00
Hugo Locurcio a139e58f8c
Add comments at the top of each built-in shader to ease debugging
When a shader error is printed about a built-in shader, the origin
of the shader will now be recognizable immediately by looking at
the top of the printed shader code.
2021-08-18 03:09:22 +02:00
reduz 6027cd0a1d Fixes to mobile renderer
* Make sure shaders are named, to aid in debug in case of failure
* SceneRenderRD was being wrongly initialized (virtual functions being called when derivative class not initialized).
* Fixed some bugs resulting on the above being corrected.
2021-08-17 13:52:06 -03:00
TechnoPorg b097e7f510 Vulkan: Fix CanvasItem::use_parent_material
The "Use Parent Material" option now does something when enabled on a CanvasItem. As before, it's not just limited to a node's direct parent but can move up the tree until it finds a material.
Also corrected a typo in rendering_device_vulkan.h that didn't merit its own commit.
2021-08-17 09:08:56 -06:00
Yuri Roubinsky 06add309d7 Fix incorrect uniform buffer size for particles 2021-08-17 13:33:28 +03:00
Juan Linietsky d5a30431b9
Merge pull request #51635 from reduz/further-mobile-optimizations
More optimizations on the mobile renderer.
2021-08-16 14:50:52 -03:00
Yuri Roubinsky 9de779344c Makes a clear error message if shader compilation failed 2021-08-16 11:25:20 +03:00
Bastiaan Olij c7847b3f6d Moved disabling bokeh shader variants to before the version_create call 2021-08-16 12:18:27 +10:00