Commit Graph

1129 Commits

Author SHA1 Message Date
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
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