Commit Graph

5495 Commits

Author SHA1 Message Date
Rémi Verschelde
34dd5e0c37
Merge pull request #97217 from stuartcarnie/97185_subpixel_rendering
Metal: Fix subpixel blending; fix inconsistent blend state
2024-09-20 16:07:03 +02:00
Thaddeus Crews
b37fc1014a
Style: Apply new clang-format changes 2024-09-20 08:09:48 -05:00
Stuart Carnie
e826ab9ba9
[2D,Metal]: Fix subpixel blending; fix inconsistent blend state in Metal 2024-09-20 15:16:31 +10:00
Rémi Verschelde
b1b4c5da4b
Merge pull request #96928 from dsnopek/rename-and-expose-texture-create-external
Expose a function to create textures from a native handle in the compatibility renderer
2024-09-19 17:13:27 +02:00
David Snopek
7d56b09f23 Expose a function to create textures from a native handle in the compatibility renderer 2024-09-19 09:05:32 -05:00
Rémi Verschelde
3abff94a24
Merge pull request #97130 from Rindbee/check-space-in-remove_soft_body_from_query
Add forgotten `get_space()` check in `GodotArea3D::remove_soft_body_from_query()`
2024-09-18 11:15:47 +02:00
Rémi Verschelde
b10338132e
Merge pull request #97006 from Gaktan/project_dialog_vulkan_crash
Fix Vulkan Instance initialized twice in ProjectDialog
2024-09-18 11:15:35 +02:00
风青山
2f515d6a27
Add forgotten get_space() check in GodotArea3D::remove_soft_body_from_query()
My fault, I added a `get_space()` check for the other `GodotArea3D::remove_*_from_query()`
but forgot about `soft_body`.
2024-09-18 07:59:50 +08:00
Rémi Verschelde
27dacd59e0
Merge pull request #97109 from pattlebass/pitch-shift-fix
AudioEffectPitchShift: Fix distortion when pitch is 1.0
2024-09-17 21:02:25 +02:00
Gaktan
a45dd84724 Fix Vulkan Instance initialized twice in ProjectDialog 2024-09-17 20:35:10 +02:00
Fabian S.
8ebabf68f8 AudioEffectPitchShift: Fix distortion when pitch is 1.0 2024-09-17 15:16:08 +03:00
Stuart Carnie
5b5dc00c52
2D: Remove redundant assignment 2024-09-17 06:32:49 +10:00
Rémi Verschelde
67c9708eb8
Merge pull request #95915 from BlueCube3310/betsy-bc1
Betsy: Add caching and BC1 compression support
2024-09-16 13:34:26 +02:00
Rémi Verschelde
8c6210a3eb
Merge pull request #92290 from clayjohn/LOD-fixes
Use distance to AABB surface to calculate Mesh LOD instead of using supports
2024-09-16 13:34:04 +02:00
Stuart Carnie
c113e5b143
2D: Fix use-after-free in batch rendering
Closes #96960
Fixes regression of #95574 using fix from #95666
2024-09-14 07:50:39 +10:00
Chaosus
4a16a0d60c Fix broken sky shader 2024-09-13 08:53:26 +03:00
Rémi Verschelde
573badf150
Merge pull request #96875 from stuartcarnie/sgc/small_optimisations
[Editor, Servers] Minor optimizations
2024-09-12 09:25:53 +02:00
Rémi Verschelde
8d9a446397
Merge pull request #95473 from Chaosus/shader_fix_switch_bugs
Fix shader incorrectly expects `int` on `uint` and vice-versa in cases
2024-09-12 09:17:43 +02:00
BlueCube3310
606eedb0c9 Betsy: Add caching and BC1 compression support 2024-09-11 23:48:29 +02:00
David Snopek
c2af6bcb59 GDExtension: Mark virtual function as is_required in extension_api.json
Co-authored-by: Jovan Gerodetti <jovan.gerodetti@titannano.de>
2024-09-11 16:48:14 -05:00
clayjohn
7ff106f828 Use distance to AABB surface to calculate Mesh LOD instead of using supports 2024-09-11 14:17:09 -07:00
Stuart Carnie
5cfacc8767
[Editor,Servers]: Minor optimizations 2024-09-12 06:22:04 +10:00
Stuart Carnie
a657ea42f1
2D: Add batching to RendererCanvasRenderRD 2024-09-12 05:26:06 +10:00
Rémi Verschelde
db977eaf13
Merge pull request #96858 from Chaosus/shader_fix_conditional_op
Fix shader crash when using unary minus in expression
2024-09-11 18:28:50 +02:00
TypeChecked
a8fc5e30a2
Fix typo in XRInterface comment 2024-09-11 18:18:26 +02:00
Chaosus
7d9ced5311 Fix shader crash when using unary minus in expression 2024-09-11 16:46:09 +03:00
Chaosus
b2611c198e Fix shader incorrectly expects int on uint and vice-versa in cases 2024-09-11 09:22:27 +03:00
clayjohn
29df589632 Implement instance uniforms in Compatibility renderer 2024-09-10 12:20:47 -07:00
Rémi Verschelde
5303688c01
Merge pull request #96092 from smix8/region_point_query
Add navigation region point  and segment queries
2024-09-10 09:51:27 +02:00
Rémi Verschelde
bc4c60c933
Merge pull request #94893 from rune-scape/no-const-cast-mesh-storage
Avoid `const_cast` in `mesh_storage.h`
2024-09-10 09:51:22 +02:00
smix8
287fdb16d5 Add navigation region point and segment queries
Adds point and segment queries for regions, e.g. closet point, point normal, or segment intersection.
2024-09-10 01:38:46 +02:00
Rémi Verschelde
27552a2f26
Merge pull request #96758 from RandomShaper/fix_the_shift_must_go_on
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
RenderingDevice: Fix uncapped mipmap sizes causing div-by-zero
2024-09-09 17:52:03 +02:00
Rémi Verschelde
493f3edce7
Merge pull request #96572 from adamscott/fix-samples-leak
Fix leak when using audio samples instead of streams
2024-09-09 17:51:42 +02:00
Pedro J. Estébanez
7f1989bac1 RenderingDevice: Fix uncapped mipmap sizes causing div-by-zero 2024-09-09 17:10:47 +02:00
Yuri Rubinsky
af92fdb0ac Add basic support to evaluate operator value in shader language 2024-09-09 15:12:11 +03:00
Rémi Verschelde
73a0f6e90f
Merge pull request #83536 from wareya/new_cubic
Optimize cubic hermite algorithm in AudioStreamPlaybackResampled
2024-09-08 23:21:02 +02:00
Rémi Verschelde
aa07333abe
Merge pull request #96114 from BlueCube3310/sh-lightmap-packing
LightmapGI: Pack L1 SH coefficients for directional lightmaps
2024-09-06 22:38:29 +02:00
BlueCube3310
a89f4fa5a9 LightmapGI: Pack L1 SH coefficients for directional lightmaps 2024-09-05 22:46:58 +02:00
kleonc
c170f1afd2 Don't recalculate final render transforms for Y-sorted canvas items 2024-09-05 17:45:38 +02:00
kleonc
029045bcb6 Account for physics interpolation and transform snapping when Y-sorting 2024-09-05 17:45:37 +02:00
Adam Scott
d3ddce6b88
Fix leak when using audio samples instead of streams 2024-09-04 12:56:03 -04:00
Rémi Verschelde
82d7531a2e
Merge pull request #95990 from Breush/76166-sky-auto-radiance
Sky: Adapt radiance size if `AUTOMATIC_MODE` resolves to `REALTIME`
2024-09-04 17:12:02 +02:00
Alexis Breust
44e526d3d5 Sky: No more auto-selecting REALTIME mode if radiance is not 256 2024-09-04 10:54:08 +02:00
Rémi Verschelde
13a90e938f
Merge pull request #70096 from rune-scape/stringname-dict
StringName Dictionary keys
2024-09-03 17:38:06 +02:00
Rémi Verschelde
d15de6f264
Merge pull request #96292 from AThousandShips/null_check_ref_fix
Cleanup of raw `nullptr` checks with `Ref`
2024-09-03 16:13:55 +02:00
Rémi Verschelde
49ed6c558c
Merge pull request #86809 from clayjohn/TAA-disocclusion
Tune TAA disocclusion scale to avoid rejecting all samples during motion.
2024-09-03 16:13:26 +02:00
Rémi Verschelde
8120e0324a
Merge pull request #96512 from bruvzg/gds_base_stt
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
[TextServer] Fix structured text parser for GDScript comments.
2024-09-03 11:44:12 +02:00
Rémi Verschelde
d1c27f239d
Merge pull request #96486 from ComycSans/black_sky
Fix `SkyRD::Sky::free()` freeing shared material
2024-09-03 11:44:05 +02:00
Rémi Verschelde
63a8548693
Merge pull request #96426 from clayjohn/RD-reflection-probe-roughness
Use non-linear mapping for ReflectionProbe mip levels to match sky
2024-09-03 11:43:52 +02:00
Rémi Verschelde
6de2d31a61
Merge pull request #96351 from stuartcarnie/sgc/metal_light_betsy
Metal: Enable for betsy and lightmapper modules in compatibility mode
2024-09-03 11:43:42 +02:00
Rémi Verschelde
a2b64ed544
Merge pull request #95961 from RadiantUwU/fix-mesh-recursion
Fix shadow mesh recursion.
2024-09-03 11:43:16 +02:00
Rémi Verschelde
032235b6fc
Merge pull request #95503 from clayjohn/instance_none_crash
Avoid indexing instances without a base in scene cull phase
2024-09-03 11:43:08 +02:00
Rémi Verschelde
667778cf4d
Merge pull request #93448 from clayjohn/transmittance-fixes
Various fixes for transmittance effect
2024-09-03 11:42:57 +02:00
bruvzg
1829bc3663
[TextServer] Fix structured text parser for GDScript comments. 2024-09-03 09:54:09 +03:00
ComycSans
09e59fbec5 Fix SkyRD::Sky::free() freeing material 2024-09-02 18:59:31 +02:00
Rémi Verschelde
f546bf6aea
Merge pull request #96431 from viksl/fix-alpha-reflections-cull-order
Fix alpha material's reverse cull order.
2024-09-02 12:13:57 +02:00
Rémi Verschelde
f50ead48b0
Merge pull request #96128 from BlueCube3310/vram-profiler-texture-mem
Fix incorrect parameters for layered textures in VRAM texture memory profiler
2024-09-02 12:13:11 +02:00
Rémi Verschelde
28b2ed50b7
Merge pull request #96056 from Lielay9/expose_canvas_item_attach_skeleton
Expose `RenderingServer.canvas_item_attach_skeleton`
2024-09-02 12:13:08 +02:00
viksl
929c69bad8 Fixes alpha materials being rendered with a reverse cull which is visible in reflections from reflection probes. 2024-09-01 12:10:04 +02:00
BlueCube3310
e74bc3079a Fix incorrect parameters for layered textures in Video RAM texture memory profiler 2024-09-01 11:49:30 +02:00
clayjohn
64f5443b14 Use non-linear mapping for ReflectionProbe mip levels to match sky 2024-09-01 01:40:42 -07:00
Radiant
70860aafd8 Fix shadow mesh recursion. 2024-08-31 22:31:43 +03:00
A Thousand Ships
194bdde947
Cleanup of raw nullptr checks with Ref
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
2024-08-31 15:01:09 +02:00
Stuart Carnie
a7a245de92
Metal: enable for betsy and lightmapper modules
To support this, the rendering_context_driver_metal.h header was updated
to recognise when it is included in non-Objective-C source files.
2024-08-31 08:29:07 +10:00
Rémi Verschelde
77bc419071
Merge pull request #96174 from DeeJayLSP/wav-docs
WAV stream/importer: Improve compression/loop names and descriptions
2024-08-30 23:37:50 +02:00
DeeJayLSP
5a50b3a6c5 WAV stream/importer: Improve compression/loop names and descriptions 2024-08-30 16:31:57 -03:00
rune-scape
154049ce17 StringName Dictionary keys
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
2024-08-29 13:39:27 -07:00
Rémi Verschelde
cb96fc95c3
Merge pull request #92316 from alula/msvc-clang
Add support for compiling with VS clang-cl toolset
2024-08-29 10:36:17 +02:00
Rémi Verschelde
96cbcc30e2
Merge pull request #90945 from Scony/extract-navigation-defaults
Extract navigation-related defaults to separate header
2024-08-29 10:36:14 +02:00
rune-scape
f04a9bb630 Avoid const_cast in mesh_storage.h 2024-08-28 14:46:03 -07:00
Alula
346cbc7f1f
Add support for compiling with VS clang-cl toolset 2024-08-28 13:30:44 -05:00
Rémi Verschelde
24f97f3f08
Merge pull request #94808 from RandomShaper/aud_srv_cod_sty
AudioServer: Fix code style issues
2024-08-28 00:12:25 +02:00
Rémi Verschelde
e98aaf1caa
Merge pull request #94477 from RedMser/typos-batch-1
Fix various typos
2024-08-28 00:12:12 +02:00
Rémi Verschelde
10a92287c6
Merge pull request #94352 from Chaosus/shader_ternary_fix
Fix multiple ternary expressions to be used without parenthesis
2024-08-28 00:12:07 +02:00
Rémi Verschelde
330fca1ffd
Merge pull request #93985 from alvinhochun/windows-gpu-pref
Respect integrated GPU preference in Windows Settings
2024-08-28 00:11:45 +02:00
Pawel Lampe
c3f1bfd5cb Extract navigation-related defaults to separate header 2024-08-27 20:12:10 +02:00
Rémi Verschelde
9dfc41568a
Merge pull request #95984 from timothyqiu/what-identifier
Add `String.is_valid_unicode_identifier()`
2024-08-27 16:55:06 +02:00
Chaosus
f538376c3b Add CLIP_SPACE_FAR built-in to spatial shader 2024-08-27 08:48:46 +03:00
Haoyu Qiu
8bf4ecc026 Add String.is_valid_unicode_identifier()
- Adds `is_valid_unicode_identifier()`
- Adds `is_valid_ascii_identifier()`
- Deprecates `is_valid_identifier()`
- Renames `validate_identifier()` to `validate_ascii_identifier()`
2024-08-27 11:34:08 +08:00
stechyo
c32f72f7fa Post-code review changes. 2024-08-26 19:42:42 +01:00
Rémi Verschelde
1d3bdfcd06
Merge pull request #95862 from adamscott/fix-pitch-scale-before-play
Honor `pitch_scale` value before playing audio sample
2024-08-25 22:24:17 +02:00
Rémi Verschelde
68d188d521
Merge pull request #95888 from clayjohn/Lightmap-SH-coefficients
Use correct lightmap coefficients to ensure that the directional lightmap mode looks correct
2024-08-25 20:18:18 +02:00
Rémi Verschelde
cbe1d6f7af
Merge pull request #95274 from Chaosus/shader_forbind_const_func_decl
Forbid function declaration with a const qualifier in shaders
2024-08-25 20:18:10 +02:00
Hei
94e434b34e Expose the function 'RenderingServer.canvas_item_attach_skeleton' 2024-08-25 04:13:04 +03:00
Matias N. Goldberg
59d0422dcd Disable extra memory tracking by default
PR #90993 added several debugging utilities.

Among them, advanced memory tracking through the use of custom
allocators and VK_EXT_device_memory_report.

However as issue #95967 reveals, it is dangerous to leave it on by
default because drivers (or even the Vulkan loader) can too easily
accidentally break custom allocators by allocating memory through std
malloc but then request us to deallocate it (or viceversa).

This PR fixes the following problems:
 - Adds --extra-gpu-memory-tracking cmd line argument
 - Adds missing enum entries to
RenderingContextDriverVulkan::VkTrackedObjectType
 - Adds RenderingDevice::get_driver_and_device_memory_report
    - GDScript users can easily check via print(
RenderingServer.get_rendering_device().get_driver_and_device_memory_report()
)
- Uses get_driver_and_device_memory_report on device lost for appending
further info.

Fixes #95967
2024-08-24 20:52:39 -03:00
wareya
94b31c1db7 Optimize cubic hermite algorithm in AudioStreamPlaybackResampled 2024-08-22 18:40:01 -04:00
Rémi Verschelde
568589c9d8
Merge pull request #90993 from darksylinc/matias-TheForge
Add debug utilities for Vulkan
2024-08-22 00:38:22 +02:00
Rémi Verschelde
0badddaccb
Merge pull request #95917 from BlueCube3310/lightmap-align-fix
LightmapGI: Fix shader data alignment after #89919
2024-08-22 00:10:53 +02:00
Rémi Verschelde
39b77ea04e
Merge pull request #95790 from aaronfranke/rect-aabb-support
Simplify Rect2/AABB `get_support` function
2024-08-22 00:10:39 +02:00
Rémi Verschelde
d4b6bd5b60
Merge pull request #91172 from clayjohn/detect-rd
Disable creating RD projects in project manager if RD is not supported
2024-08-22 00:10:15 +02:00
Matias N. Goldberg
364f916f3f
Add debug utilities for Vulkan
Features:
- Debug-only tracking of objects by type. See
get_driver_allocs_by_object_type et al.
 - Debug-only Breadcrumb info for debugging GPU crashes and device lost
 - Performance report per frame from get_perf_report
- Some VMA calls had to be modified in order to insert the necessary
memory callbacks

Functionality marked as "debug-only" is only available in debug or dev
builds.

Misc fixes:
 - Early break optimization in RenderingDevice::uniform_set_create

============================

The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.
2024-08-21 23:48:08 +02:00
BlueCube3310
4aa145624e LightmapGI: Fix shader data alignment after #89919 2024-08-21 21:37:13 +02:00
clayjohn
f4ccba7508 Use correct lightmap coefficients to ensure that the directional lightmap mode looks correct
Also remove the metallic option from directional lightmap as it is guaranteed to return negative numbers in many cases
2024-08-21 10:24:32 -07:00
Rémi Verschelde
4b8946102b
Merge pull request #91535 from BlueCube3310/betsy-bc6h
Add Betsy to speed up BC6 compression
2024-08-21 06:38:03 +02:00
Adam Scott
aaafd163b2
Honor pitch_scale value before playing audio sample 2024-08-20 10:29:32 -04:00
Stuart Carnie
2d0165574d
Add Metal support for macOS (arm64) and iOS 2024-08-20 12:11:06 +02:00
Rémi Verschelde
a700b2a4a2
Merge pull request #95153 from BastiaanOlij/improve_hand_tracking_settings
Change hand tracking project settings and finetune `show_when_tracked`
2024-08-20 10:02:01 +02:00
Rémi Verschelde
7999b4bb8a
Merge pull request #94324 from SomeRanDev/shader_hint_enum
GDShader: Add `hint_enum` for `uniform int`
2024-08-20 10:01:57 +02:00
Rémi Verschelde
6a9ecdcf0c
Merge pull request #91818 from rburing/fti_multimesh
Physics interpolation: `MultiMesh`
2024-08-20 10:01:46 +02:00
Rémi Verschelde
8acd82f70e
Merge pull request #89919 from BlueCube3310/bicubic-lightmap
Implement bicubic sampling for lightmaps
2024-08-20 10:01:41 +02:00
Rémi Verschelde
333f0f910f
Merge pull request #86000 from jsjtxietian/add-missing-model_normal_matrix
Add `model_normal_matrix` for fragment shader
2024-08-20 10:01:36 +02:00
Aaron Franke
7db24a9ad5
Simplify and fix Rect2/AABB get_support function 2024-08-19 23:55:31 -07:00
jsjtxietian
e698351db2 Add model_normal_matrix for fragment shader 2024-08-20 12:39:29 +08:00
Bastiaan Olij
a8c5117777 Change hand tracking project settings and finetune show_when_tracked 2024-08-20 11:12:52 +10:00
Rémi Verschelde
6bf64027b7
Merge pull request #94785 from Chaosus/shader_fix_samplers_order
Fix texture samplers to not being last in the property list
2024-08-19 16:05:21 +02:00
Rémi Verschelde
8b39d7f326
Merge pull request #95666 from kleonc/parallax2d_repeat_offsets_relative_to_source
Fix `Parallax2D` repeats being not relative to its transform
2024-08-19 14:34:21 +02:00
Rémi Verschelde
10b91ee950
Merge pull request #95705 from zeux/fsr-skin-relax
Relax motion vector updates to allow skipped frames for skeletons
2024-08-19 12:09:34 +02:00
Rémi Verschelde
9cc53a134e
Merge pull request #95682 from zeux/fsr2-fix-free
Fix double free in FSR2 destructor
2024-08-19 12:09:20 +02:00
Rémi Verschelde
c6400a8fe4
Merge pull request #95662 from clayjohn/GLES3-sky-fog
Add fixed fog to the sky in the Compatibility renderer
2024-08-19 12:09:10 +02:00
Rémi Verschelde
f4037d6f6c
Merge pull request #92496 from clayjohn/HDR-2D-sRGB
Ensure MovieWriter output is in gamma space when using HDR 2D
2024-08-19 12:08:40 +02:00
Rémi Verschelde
824a97120e
Merge pull request #92213 from clayjohn/ambient-disabled
Disable all sources of ambient light when `ambient_light_disabled` render mode is used
2024-08-19 12:08:31 +02:00
kleonc
1bd8372813 Fix Parallax2D repeats being not relative to its transform 2024-08-19 11:43:16 +02:00
BlueCube3310
ef9bb1a207 Implement support for bicubic lightmap filtering
Co-authored-by: Calinou <hugo.locurcio@hugo.pro>
2024-08-19 09:52:09 +02:00
Ricardo Buring
1728f80e7c Fixed Timestep Interpolation: MultiMesh
Adds fixed timestep interpolation to multimeshes.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-08-18 17:14:59 +02:00
BlueCube3310
394ea653aa Add Betsy to speed up BC6 compression 2024-08-18 11:14:05 +02:00
clayjohn
578049b7b9 Add fixed fog to the sky in the Compatibility renderer
And apply luminance multiplier after fog in RD renderer
2024-08-17 23:33:26 -07:00
Arseny Kapoulkine
92f2bc70dd Relax motion vector updates to allow skipped frames for skeletons
Before this change, a skeleton that was not updated every frame would
result in a difference of 2+ between last_change and frame index every
frame, which would disable the buffer rotation and set motion vectors to
zero. This results in significant visual artifacts for FSR2 that are
especially prominent on the characters that move together with the view
such as the main character in third person mode.

This is a significant problem for high refresh rate displays: at 120 Hz,
we are effectively guaranteed to skip skeleton updates every other frame
with skeleton update happening during physics processing, and the lack
of physics interpolation for skeletons. This happens by default in TPS
demo when FSR2 is enabled.

In other places where motion vectors are disabled, such as multi-mesh
and mesh rendering (where previous transform is updated), the logic
effectively allows for a single-frame gap in updates, because it
compares the frame where the update happened (which is the current frame
if updates are consistent) with the current frame, so the latency of 0
means "update just happened", but both multi-mesh and mesh transform
updates permit a latency of 1 as well.

Here, however, last_change is updated *after* the frame processing has
concluded, so a zero-latency update has a distance of 1. Allowing a
distance of 2 (latency 1) reduces the severity of the problem and aligns
the logic with transform updates.

Note that the problem will still happen when refresh rate is noticeably
higher than physics rate times 2. For example, it still happens at 240
Hz. However, a longer latency allowance is inconsistent with other
transforms and could lead to issues, so ideally long term physical
interpolation of skeleton transforms would completely solve this.
2024-08-17 11:10:41 -07:00
Arseny Kapoulkine
0024cface5 Fix double free in FSR2 destructor
Before this change, using FSR2 resulted in the following error when the
effect was destroyed:

	ERROR: Attempted to free invalid ID: 662734928609453
	   at: _free_internal (servers/rendering/rendering_device.cpp:4957)

This happened because ACCUMULATE and ACCUMULATE_SHARPEN passes shared
the same shader_version object but had different pipeline IDs. When
version_free was called for ACCUMULATE pass, it destroyed pipelines
created from that version, including the pipeline for the
ACCUMULATE_SHARPEN pass.

Using a unique version could work around this problem, but it's easier
to rely on version_free destroying the created pipelines through the
dependency mechanism.
2024-08-16 22:44:57 -07:00
Rémi Verschelde
5b6d9a7dd8
Merge pull request #95659 from clayjohn/RD-sky-affect
Ensure `fog_sky_affect` is used even when using a background color
2024-08-16 23:49:58 +02:00
Rémi Verschelde
2af825c0aa
Merge pull request #95640 from kevinkuo52/debug-overdraw-call-count
Fix draw call count and object count for OverDraw display mode on Forward+
2024-08-16 23:45:49 +02:00
Rémi Verschelde
dbf4be308c
Merge pull request #93583 from smix8/obstacle_monitor
Add navigation obstacles to performance monitor stats
2024-08-16 23:45:10 +02:00
clayjohn
37be585fdf Ensure fog_sky_affect is used even when using a background color 2024-08-16 14:11:08 -07:00
kevinkuo52
3388a4a360 pass in render_info to _fill_instance_data for alpha to fix overdraw call count 2024-08-16 08:59:36 -07:00
Rémi Verschelde
664ff6f7c4
Merge pull request #95547 from Chaosus/shader_fix_for_middle_expression
Fix middle expression of `for` loop to accept not only operators
2024-08-16 14:36:10 +02:00
Rémi Verschelde
0f9925c0f9
Merge pull request #95542 from KoBeWi/go_bind_yourself
Remove empty `bind_methods()`
2024-08-16 14:35:51 +02:00
Rémi Verschelde
851d0a764d
Merge pull request #95536 from jsjtxietian/rename-alpha-scissor
Fix undefined `alpha_scissor` in standard shader
2024-08-16 14:35:38 +02:00
Rémi Verschelde
9c77f57a1d
Merge pull request #95350 from Chaosus/shader_fix_for_loop_comma_crash
Fix shader crash when the comma used in `for` loop as a trailing
2024-08-16 14:33:42 +02:00
Rémi Verschelde
aed6c351c6
Merge pull request #95301 from bruvzg/rtl_sel_fixes
Fix `TextServer::shaped_text_*_character_pos` for the first character of wrapped string. Allow starting/ending RTL selection before line start.
2024-08-16 14:33:26 +02:00
Rémi Verschelde
f2fb3353cb
Merge pull request #95197 from yahkr/95128-audio-fix
Fix AudioStreamPlayer `get_playback_position()` for web build
2024-08-16 14:33:05 +02:00
Rémi Verschelde
7865266f24
Merge pull request #94609 from bruvzg/pixel_font_detect
[Font Import] Detect pixel fonts and disable subpixel positioning.
2024-08-16 14:32:14 +02:00
Rémi Verschelde
d1706b0200
Merge pull request #95450 from clayjohn/RD-local-device
Fail when submit or sync called on main rendering device
2024-08-16 10:36:09 +02:00
Rémi Verschelde
afbcd0810f
Merge pull request #95438 from clayjohn/SSR-roughness-fix
Use transformed roughness instead of raw roughness to calculate roughness fade in SSR
2024-08-16 10:36:03 +02:00
Rémi Verschelde
94e9b2e2af
Merge pull request #95379 from SlashScreen/fix_dir_light_layers
Consider visual layers for DirectionalLight
2024-08-16 10:35:44 +02:00
Rémi Verschelde
b1c624beb5
Merge pull request #95270 from Lssikkes/ls-multimesh-reset-only
Fix for multimesh motion vector corruption
2024-08-16 10:35:26 +02:00
Rémi Verschelde
5098ac587e
Merge pull request #94896 from jsjtxietian/carry-subgroup
Fix uniform subgroup in shader will carry out to next group
2024-08-16 10:35:00 +02:00
Rémi Verschelde
46c6865979
Merge pull request #92391 from rburing/fti_3d
Physics interpolation (3D)
2024-08-16 10:33:37 +02:00
stechyo
e479c238a2 Expose some AudioStreamPlayback methods.
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-08-15 14:10:18 +01:00
Chaosus
3272f00525 Fix middle expression of for loop to accept not only operators 2024-08-15 10:29:19 +03:00
kobewi
065dd099dd Remove empty bind_methods() 2024-08-15 08:24:32 +02:00
jsjtxietian
970a237c20 Fix undefined alpha_scissor in standard shader 2024-08-15 11:44:11 +08:00
clayjohn
b5fd29e7bc Avoid indexing instances without a base in scene cull phase 2024-08-13 13:02:15 -07:00
Slashscreen
4457b11ff0 Apply patch for considering visual layers for DirectionalLight
Co-authored-by: majikayogames <152851004+majikayogames@users.noreply.github.com>
2024-08-13 08:45:38 -07:00
clayjohn
b0e33aa00f Fail when submit or sync called on main rendering device
Fail if submit or sync called multiple times in a row
2024-08-12 15:50:01 -07:00
clayjohn
b99d0d778a Use transformed roughness instead of raw roughness to calculate roughness fade in SSR 2024-08-12 12:04:16 -07:00
Hannah Crawford
a54b71bbdf Add shadow_caster_mask to Light3D. 2024-08-12 00:17:11 +01:00
Chaosus
d74749fd60 Fix shader crash when the comma used in for loop as a trailing 2024-08-10 11:23:11 +03:00
bruvzg
932acce8f2
Fix TextServer::shaped_text_*_character_pos for the first character of wrapped string. Allow starting/ending RTL selection before line start. 2024-08-09 00:03:00 +03:00
Yahkub-R
bcd776e441 Fix AudioStreamPlayer get_playback_position() for web build 2024-08-08 15:58:25 -04:00
Sen
52cd5acdda Fix for multimesh motion vector corruption by resetting motion vector state and filling both halves of buffer 2024-08-08 16:19:31 +02:00
Chaosus
dc6f90acd8 Forbid function declaration with a const qualifier in shaders 2024-08-08 11:23:27 +03:00
Jamie Pate
f8c99efc3b
Fix LightmapGI causes crash when using --headless
Fixes #89119

Add dummy LightmapInstance and Lightmap resources for headless rendering

Prevents the RenderingServer from crashing when it accesses
lightmap_instance->base_data
2024-08-07 11:38:05 +02:00
clayjohn
04d0e7f7a4 Check if RD is supported in the ProjectManager and disable creating RD projects if not supported. 2024-08-02 12:36:45 -07:00
Rémi Verschelde
52f22902c7
Merge pull request #94902 from clayjohn/SHADER-hints
Restrict sampler hint validation to only screen texture hints
2024-07-30 12:29:04 +02:00
Yuri Rubinsky
e41048e16e Fix texture samplers to not being last in the property list 2024-07-29 09:19:09 +03:00
clayjohn
a2f2699208 Restrict sampler hint validation to only screen texture hints 2024-07-28 22:31:57 -07:00
jsjtxietian
e6c45fbe5d Fix uniform subgroup in shader will carry out to next group 2024-07-29 11:07:09 +08:00
Bastiaan Olij
1eb0039b6e Fix regression around OpenGL swapchain optimisation for OpenXR 2024-07-29 12:46:58 +10:00
Rémi Verschelde
8e47aafa08
Merge pull request #94812 from clayjohn/SHADER-normal-roughness
Emit `normal_roughness` compatibility code in custom functions
2024-07-28 17:46:45 +02:00
Rémi Verschelde
e773f8c3ba
Merge pull request #94800 from adamscott/fix-sample-playback-list-typo
Fix typo that prevented samples finishing
2024-07-28 17:46:39 +02:00
clayjohn
ba3457dfff Emit normal_roughness compatibility code in custom functions 2024-07-26 10:45:36 -07:00
Pedro J. Estébanez
1cc485ba1f AudioServer: Fix code style issues
- Drop STL copy in favor of old-school for loops.
- Be explicit about loads and stores to atomic value. (This also fixes an error in certain compiler toolchains.)
2024-07-26 18:59:09 +02:00
Adam Scott
7802c361b7
Fix typo that prevented samples finishing 2024-07-26 09:56:44 -04:00
Rémi Verschelde
13c6c0cdb7
Merge pull request #94706 from alvinhochun/window-set-transient-parent-on-create
Pass window exclusive and transient properties for subwindow creation
2024-07-26 13:44:03 +02:00
jsjtxietian
38fad35356 Fix editor crash when shader has incorrect global array declaration 2024-07-26 11:53:11 +08:00
BlueCube3310
eb3b217777 RenderingDevice: Use the correct amount of layers for Cubemaps for boundary checks 2024-07-24 20:26:46 +02:00
Alvin Wong
97aa278edb Pass window exclusive and transient properties for subwindow creation
On Windows this allows to avoid having to change the owner of the window
after it has been created, which in rare circumstances may cause the
window to bug out.
2024-07-25 00:27:27 +08:00
Rémi Verschelde
62c88a4052
Merge pull request #94671 from Chaosus/shader_fix_varying
Fix shader crash when using a varying in separate func before it defined
2024-07-24 09:59:31 +02:00
Rémi Verschelde
139cf025c9
Merge pull request #94629 from RandomShaper/fix_undef_position
Fix position from vertex shader partially uninitialized
2024-07-24 09:59:24 +02:00
Feiyue Zhang
6f30df4b6a
Linearize color if HDR 2D is on 2024-07-24 09:49:50 +02:00
Yuri Rubinsky
965b2f6ca4 Fix shader crash when using a varying in separate func before it defined 2024-07-23 21:55:18 +03:00
bruvzg
32bc1c2f33
[Font Import] Detect pixel fonts and disable subpixel positioning. 2024-07-23 20:34:39 +03:00
Rémi Verschelde
e4f7b69470
Merge pull request #94656 from BlueCube3310/cubemap-layers-retrieve-fix
RenderingDevice: Fix getting cubemap layer data
2024-07-23 15:55:53 +02:00
Rémi Verschelde
29e1bdee2b
Merge pull request #94653 from mihe/bind-physics-state-sync
Bind `PhysicsServer*D::body_set_state_sync_callback`
2024-07-23 15:55:46 +02:00
BlueCube3310
741bb152ae RenderingDevice: Fix getting cubemap data 2024-07-23 13:44:28 +02:00
Mikael Hermansson
a559a1c6d8 Bind PhysicsServer*D::body_set_state_sync_callback 2024-07-23 13:30:44 +02:00
Pedro J. Estébanez
0064532c1e Fix position from vertex shader partially uninitialized 2024-07-23 09:04:54 +02:00
Yuri Rubinsky
574e61a542 Fix crash when assigning more textures than expected to texture array 2024-07-22 20:51:11 +03:00
Rémi Verschelde
587f1d0cb0
Merge pull request #92817 from Alex2782/fix_glsl_Mali-G
Fix glsl shader for Android Mali-GXXx GPUs and Vulkan API 1.3.xxx
2024-07-22 17:24:04 +02:00
Alexander Hartmann
78ede4f8b6 Fix glsl shader for Android Mali-GXXx GPUs and Vulkan API 1.3.xxx 2024-07-20 22:01:35 +02:00
Garteal
2606831d71 SDFGI: fix crash if update_data is nullptr 2024-07-19 18:27:32 +02:00
Rémi Verschelde
47e99d55b3
Merge pull request #94388 from BastiaanOlij/expose_more_methods_scene_buffers_rd
Expose more state in RenderSceneBuffersRD
2024-07-19 11:10:46 +02:00
Rémi Verschelde
1e81a946cc
Merge pull request #94412 from dsnopek/xr-always-render
Always render when XR is enabled, even if no OS windows can draw
2024-07-18 15:38:14 +02:00
Rémi Verschelde
ceb1801db2
Merge pull request #94492 from jsjtxietian/fsr-1
Add warning when use FSR1 on renderer other than forward plus
2024-07-18 10:45:50 +02:00
Rémi Verschelde
0f1e2c38a8
Merge pull request #94069 from RandomShaper/fix_vk_vali_blocky
RenderingDevice: Leave handling of compressed block granularity to the driver
2024-07-18 10:45:27 +02:00
Rémi Verschelde
590628feda
Merge pull request #86516 from jsjtxietian/fix-camera-direction
Fix incorrect `CAMERA_DIRECTION_WORLD` calculation
2024-07-18 10:45:20 +02:00
jsjtxietian
46ed290fef Add warning when use FSR1 on renderer other than forward plus 2024-07-18 12:10:18 +08:00
RedMser
f9258ff928 Fix typos 2024-07-17 18:53:03 +02:00
Adam Scott
2f5f84b470
Fix audio samples not being able to be "finished" 2024-07-17 10:45:38 -04:00
David Snopek
7a5a8597eb Always render when XR is enabled, even if no OS windows can draw 2024-07-17 08:19:21 -05:00
Rémi Verschelde
a963f111cb
Merge pull request #94462 from jsjtxietian/more-type
Make ShaderLanguage's parser recognize sampler passed in from array
2024-07-17 12:24:11 +02:00
Rémi Verschelde
c5e5fa3d9f
Merge pull request #94289 from clayjohn/MOBILE-multimesh-spec-constant
Use a spec constant to control whether the MultiMesh branch is used in the vertex shader.
2024-07-17 12:24:01 +02:00
Rémi Verschelde
82b57201b3
Merge pull request #94279 from clayjohn/physics-sync-warn
Only print physics sync warning on dev builds to avoid warning spam from using `move_and_slide`
2024-07-17 11:43:47 +02:00
Rémi Verschelde
c2375d0b12
Merge pull request #94184 from mertkasar/ssr-rotation-fix
Fix SSR orientation issues when using orthogonal camera
2024-07-17 11:43:25 +02:00
Rémi Verschelde
0268ceaa5c
Merge pull request #94064 from bruvzg/lcd_aa_modulate
Fix LCD font AA modulation in RendererRD.
2024-07-17 11:43:03 +02:00
jsjtxietian
3859817614 Make shaderLanguage's parser recognize sampler passed in from array 2024-07-17 16:52:44 +08:00
Yuri Rubinsky
eb4bbbb02d Fix multiple ternary expressions to be used without parenthesis 2024-07-17 10:34:17 +03:00
Alvin Wong
4091abd727 Respect integrated GPU preference in Windows Settings 2024-07-16 23:46:37 +08:00
Bastiaan Olij
9442eb8194 Expose more state in RenderSceneBuffersRD 2024-07-15 22:04:10 +10:00
Robert Borghese
1052985b00 Add hint_enum for uniform int in gdshader 2024-07-13 14:30:08 -04:00
clayjohn
4cbc967f50 Use a spec constant to control whether the MultiMesh branch is used in the vertex shader.
This works around a bug on the Quest3 and slightly improves performance on all mobile devices at the cost of increased pipeline count.
2024-07-12 15:44:06 -07:00