Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D Meshes disappearing (glitching?) in worlds with lots of objects. #73166

Closed
viksl opened this issue Feb 12, 2023 · 24 comments · Fixed by #73460
Closed

3D Meshes disappearing (glitching?) in worlds with lots of objects. #73166

viksl opened this issue Feb 12, 2023 · 24 comments · Fixed by #73460

Comments

@viksl
Copy link
Contributor

viksl commented Feb 12, 2023

Godot version

4.0 RC1 dotnet

System information

Windows 10, Nvidia GTX 1660Ti, Vulkan

Issue description

I was, just out of curiosity, testing what performance godot can give with larger worlds with just default settings dropping lots of objects in so I made a pretty big map (in the example below it was about 50000 objects, I went up to 400000 after that), I understand that there are optimization steps such as MultiMesh or the particle system or GeometryShaders, I did NOT use any of these.

As you can see sometimes something glitches, I thought maybe it was an issues with not having properly set up shadow map or something but in the video editor I noticed that some meshes jsut completely disappear. I'm not sure if this is an actual bug or maybe just my computer not being strong enough to handle this? (the scene was running at smooth 60 fps).

I also tried this on a smaller scene with couple hundreds objects but I had no issues there, I have them only when I add large number of objects.
It also doesn't seem to be an issues of distance since it happens to both distant objects as well as nearby ones. In the video you can see I even jump to increase the distance with objects below but they get back to normal when I move.

It also happens only at certain camera angles I guess (or at least it seems to be related to a camera angle or some world positions?).

I'm sorry if this is not an issues I wasn't sure if this is worth a report or if this is just my HW?

Please check the entire video below, I've also took couple screenshots to showcase what exactly happens because some of these happen in just a frame or so (in a video editing program I've took screenshots of exact moments of the issues).

Video: https://youtu.be/63NRSsudxu0 (check timestamps)

Images:
Issues apparent in the distance (long grea area from left to right) and meshes disappear in the bottom right corner.
glitch0
Well lots of meshes disappeared, compared to the video if needed it's the last couple seconds)
glitch1
Well lots of meshes disappeared, compared to the video if needed it's the last couple seconds)
glitch2

Steps to reproduce

Using Minimal Reproduction Project:

  1. Play the project.
  2. If it doesn't load in a reasonable time (my old computer takes couple seconds) then play stop and then press the play button again (yeah for some reason if your project adds a lot of stuff in Godot at the beginning it doesn't start away and you need to stop and play it again - NOT pause!)
  3. Take your hands off mouse so you don't move the character wrong.
  4. Press CTRL + E (your character will be moved to position and rotated properly where I get the issues every time)
  5. Observer (check screen/video below to see what it looks like)
  6. If you don't see any issues then you might need to walk around for quiet a while and find perfect spot + rotation, it only happens under certain conditions, I have no idea what these are), if your HW is better than mine then you might need to increase the number of objects in the screen by clicking on Main node and changing Size (but be careful how much you change this value, it roughly equals to (rows * columns) * 3 * 1.5, the current 325 is about 400k objects!)

(In your own custom project: Add lots of objects to the scene and move around, observe what was in the video.)

Minimal reproduction project

LotsObjectsGlitchRepro.zip
Video from minimal repro project: https://youtu.be/Hi9m2Q-kAcY
(At the beginning there's just couple frames showcasing it happening in other parts of the world but you have to pause the video and really just move frame by frame to see these, the second part of the video shows the saved location you can get to with CTRL + E)

@Zireael07
Copy link
Contributor

Zireael07 commented Feb 12, 2023

Looks like an already reported issue but I can't find the number.

Try disabling auto LOD on your meshes

@Calinou
Copy link
Member

Calinou commented Feb 12, 2023

Please upload a minimal reproduction project to make this easier to troubleshoot.

Can you reproduce this after increasing rendering/limits/spatial_indexer/threaded_cull_minimum_instances in the advanced Project Settings to the highest possible value? Note that you may have to restart the project several times for the setting to actually apply (due to #55145).

@viksl
Copy link
Contributor Author

viksl commented Feb 12, 2023

@Zireael07 I tried setting generating LOD OFF and re-imported everything. Still happens like here:

LOD-off

@Calinou
I've turned the LOD back ON and re-imported everything, restarted Godot just for good measures, changed the threaded cull minimum, restarted Godot again, double checked the value is there saved and it happened again:
High cull value

As you can see it does happen with objects which are nearby, well I think it happens to far away ones too from the video but that's hard to tell if it's a different issue or the same thing.

If there's already a bug report and actually with a minimal repro project do you still want me to make one or not?
Btw would a dotnet one be ok? I'll try to make it with base meshes and such but if I can't figure out how to reproduce it there I could extract only the map part from my game to a separate project but that requires a C# library (it's included in the project so no need to download anything or use nuget) for hex grid and I really don't want to rework that in gdscript if possible?
As I said this is an option if I can't reproduce it straight with default objects.

@Calinou
Copy link
Member

Calinou commented Feb 12, 2023

If there's already a bug report and actually with a minimal repro project do you still want me to make one or not?

The closed issue I linked was actually fixed, so this is a different issue.

Btw would a dotnet one be ok?

MRPs that only use GDScript code are preferable because they're easier to run (and rule out C# being the issue), but C# is acceptable.

@viksl
Copy link
Contributor Author

viksl commented Feb 13, 2023

@Calinou @Zireael07
I've added a minimal repro project. It's all in gdscript with only godot base meshes.
I've managed to reproduce it, saved the transform when it happens so when you run it you can just press CTRL + E to be moved and rotated to exact spot I have the issue, don't touch mouse since it only happens for that one position at that spot - there's plenty of other spots and angles it happens for in that world but I saved just one.

If you can't reproduce it, it might be because your HW can handle this better but I can't do anything with that so sorry you'll have to up the size and find best spots for yourselves to reproduce (shortcut to print the player and camera_pivot transform is ctrl + Q, change the transform then in the Player script so you can later return to that spot with CTRL + E).

I'll add a video to show that it does happen there, if you need to modify the size check the repro steps in my original post too I've added instructions.

Here're at least two screenshots:
Here when I press CTRL + E
repro-glitch1
And here when I only slightly rotate the camera but stay at the same spot:
repro-glitch0

From the monitors you can see the number of objects is about 400k so be aware of it when playing the project.
When the glitch happens the number ot Total Objects Drawn drops down by several thousands (it doesn't look like it in the screens but I'll add the video).

Also, I mentioned this in the repro instructions but when I play the project it sometimes just freezes and I have to press stop and then play again and then it starts in just couple seconds, this happens regularly when I make changes or so I'm not sure but could this also be a (different) bug when adding a lot of objects or is it just my computer acting up?
So in case it doesn't load in a minute or so try to just stop and play again (don't close godot ;)).

I think this is all I can do here, unless you need something else from me?

EDIT: I've added a video with the repro project in the repro section.
Link: https://youtu.be/Hi9m2Q-kAcY
(At the beginning there's just couple frames showcasing it happening in other parts of the world but you have to pause the video and really just move frame by frame to see these, the second part of the video shows the saved location you can get to with CTRL + E)

@bithunter32
Copy link

bithunter32 commented Feb 13, 2023

Can reproduce this when the camera looks straight along an axis with the given test case.
(Windows 10, Nvidia GTX 1070, Standard RC1 64Bit)

bug
bug2

I reduced the amount of objects and polygons considerably and still got the bug in another location. Depending on the view angle different objects disappeared (even the meshes attached to CharacterBody3D). This only happens at very specific spots and view angles.
cont1
cont2
cont3

Note

All 3 images above are taken from the same spot

@Saul2022
Copy link

Curious, i tried with 50k cubes with shadows,with multi mesh , and didn’t see that issue, although the camera was far away and was just a perfomance test on my igpu. Hope i helped a bit.

@clayjohn
Copy link
Member

clayjohn commented Feb 13, 2023

I tried with an iGPU and Nvidia laptop GPU on PopOS 22.04 and an RX 6900 XT on Windows 10 and could not reproduce.

For those that can reproduce, can you run the engine from the command line and post what is printed to the console, including what is printed upon closing the project.

I am looking for a message along the lines of X number of MeshInstanceSurfaceCache existed at exit

@viksl
Copy link
Contributor Author

viksl commented Feb 13, 2023

@clayjohn
Below is all I get when I run godot --verbose from opening godot, to pressing play button then stop button and then closing godot.

Click me TextServer: Added interface "Dummy" TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)" Text-to-Speech: SAPI initialized. WinTab context creation failed. Using "wintab" pen tablet driver... OpenGL API 3.3.0 NVIDIA 528.24 - Compatibility - Using Device: NVIDIA Corporation - NVIDIA GeForce GTX 1660 Ti WASAPI: Activated output_device using IAudioClient3 interface WASAPI: wFormatTag = 65534 WASAPI: nChannels = 2 WASAPI: nSamplesPerSec = 48000 WASAPI: nAvgBytesPerSec = 384000 WASAPI: nBlockAlign = 8 WASAPI: wBitsPerSample = 32 WASAPI: cbSize = 22 WASAPI: mix_rate = 48000 WASAPI: fundamental_period_frames = 480 WASAPI: min_period_frames = 480 WASAPI: max_period_frames = 480 WASAPI: selected a period frame size of 480 WASAPI: detected 2 channels WASAPI: audio buffer frames: 480 calculated latency: 10ms

TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
.NET: Initializing module...
Found hostfxr: C:\Program Files\dotnet\host/fxr/7.0.2/hostfxr.dll
.NET: hostfxr initialized
.NET: GodotPlugins initialized
CORE API HASH: 1580903510
EDITOR API HASH: 2812537578
EditorSettings: Load OK!
Loaded builtin certs
EditorSettings: Save OK!
Editing project: E:/Projects/LotsObjectsGlitchRepro
EditorSettings: Save OK!
Godot Engine v4.0.rc1.mono.official.8843d9ad3 - https://godotengine.org
TextServer: Added interface "Dummy"
Unloading: Disposing tracked instances...
TextServer: Added interface "ICU / HarfBuzz / Graphite (BuiltU-inn)l"o
ading: Finished disposing tracked instances.
XR: Clearing primary interface
XR: Removed interfaceNative mobile
XR: Removed interfaceOpenXR
Text-to-Speech: SAPI initialized.
WARNING: GENERAL - OMerssapgeh Iad Nnu mSbterri:n g0N a|m eM:e sSscageen eIMud lNtaimpel:ay eLroa
der MessagSetr
i nLgaNyaemre :n a1m eu nGcallaaixmyeOdv esrtlraiynVgk Lnaaymeers daote se xniott.
conform to naming standard (Policy #LLP_LAYER_3)
Objects - 1
Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 2252576808704
at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:259)
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
Layer name GalaxyOverlayVkLayer_VERBOSE does not conform to naming standard (Policy #LLP_LAYER_3)
Objects - 1
Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 2252576808704
at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:259)
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
Layer name GalaxyOverlayVkLayer_DEBUG does not conform to naming standard (Policy #LLP_LAYER_3)
Objects - 1
Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 2252576808704
at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:259)
Vulkan devices:
#0: NVIDIA NVIDIA GeForce GTX 1660 Ti - Supported, Discrete
Vulkan API 1.3.224 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1660 Ti
Optional extension VK_KHR_incremental_present not found
Optional extension VK_GOOGLE_display_timing not found

  • Vulkan Variable Rate Shading supported:
    Pipeline fragment shading rate
    Primitive fragment shading rate
    Attachment fragment shading rate, min texel size: (16, 16), max texel size: (16, 16)
  • Vulkan multiview supported:
    max view count: 32
    max instances: 134217727
  • Vulkan subgroup:
    size: 32
    stages: STAGE_VERTEX, STAGE_TESSELLATION_CONTROL, STAGE_TESSELLATION_EVALUATION, STAGE_GEOMETRY, STAGE_FRAGMENT, STAGE_COMPUTE, STAGE_RAYGEN_KHR, STAGE_ANY_HIT_KHR, STAGE_CLOSEST_HIT_KHR, STAGE_MISS_KHR, STAGE_INTERSECTION_KHR, STAGE_CALLABLE_KHR, STAGE_TASK_NV, STAGE_MESH_NV
    supported ops: FEATURE_BASIC, FEATURE_VOTE, FEATURE_ARITHMETIC, FEATURE_BALLOT, FEATURE_SHUFFLE, FEATURE_SHUFFLE_RELATIVE, FEATURE_CLUSTERED, FEATURE_QUAD, FEATURE_PARTITIONED_NV
    quad operations in all stages
    Using present mode: VK_PRESENT_MODE_FIFO_KHR
    WinTab context creation failed.
    Using "wintab" pen tablet driver...
    Creating VMA small objects pool for memory type index 1
    Shader 'CanvasSdfShaderRD' SHA256: 046e005b2f65d93db3f9d5ad03a8480eff7e5c103df728ca751f7e4ce16648aa
    Shader 'SkeletonShaderRD' SHA256: d77e7dc852ee2353853c0bdfa5610077d379ff611872369fcc9575135fc7dd3b
    Shader 'ParticlesShaderRD' SHA256: 2c47cbb531562fdc8953f3aeb76f1488263cbd7a2a4ab186cfb71ae9d2dd22e9
    Shader 'ParticlesCopyShaderRD' SHA256: 00e43a843e836945b66a99e4ca6428f665ef98a4ce12b0a4c384bfdab0756e0a
    Shader 'CanvasShaderRD' SHA256: d4ebf7cc1ae8b86a2ed8273dae35df5ccbbc21bfb03ad29307ab3a0c54408dc0
    Shader 'CanvasOcclusionShaderRD' SHA256: 4272192a34fbbd101b84b7d96f28a3698d1a6c94cdafb07f6f547161c7f799b9
    Shader 'ClusterRenderShaderRD' SHA256: f1d5f6fc9681531b938892370d1864ed67a7695626038222fd11785ce98ea82e
    Shader 'ClusterStoreShaderRD' SHA256: ea2c48fc90eb8d2ec483c9859f2817da962e53bfac92f7a65bbabedf5fe46b0a
    Shader 'ClusterDebugShaderRD' SHA256: 8fd9fc712d3770069e11dc2146e1af6aeceada4031d27cc47d2e651d0c321f71
    Shader 'SceneForwardClusteredShaderRD' SHA256: 21b905c757bbe3156b9ca5067afab2d290e782836dddf637ae2959b8cc7f9cd6
    Shader 'ResolveShaderRD' SHA256: 6868b834dd08c28a56019fbeb3ab9993596326a21a5196b70f6dfed3a27353cb
    Shader 'TaaResolveShaderRD' SHA256: dc3dc387fe86ab981043d371a18828bb5a3fe5a5acfd47b697c914b9aa19e766
    Shader 'SsEffectsDownsampleShaderRD' SHA256: 837b310210749e6a3cd96369b0cddd26347f7720f247cfff2e96dcd75e2c2005
    Shader 'SsilShaderRD' SHA256: 450862d5f5759aa7f2d2ace7c6a0d3f7ce7f3c802d8c42c05c8fc944d6b7ead4
    Shader 'SsilImportanceMapShaderRD' SHA256: 9a2f5aa4da5ed3e7c73a6a6a0122662ab3c525d6e4ba10b25c4d84fbabaa0d15
    Shader 'SsilBlurShaderRD' SHA256: 6b42fcc223dc90d7550bf741266c4b366d4b9dc29fac8a90304c8c48f9dafe79
    Shader 'SsilInterleaveShaderRD' SHA256: 44206b9140357674152b5b3b7f63b9853404c89f40b40256150c7325e57adb0a
    Shader 'SsaoShaderRD' SHA256: ffc66865effaa65607d7920535217f5196e0b6d678e97c0c3cb7c03875f6452e
    Shader 'SsaoImportanceMapShaderRD' SHA256: 8b20a32d911fc8e6be33939f848596b7724c39acee339675ea5195d8f3f8b1c6
    Shader 'SsaoBlurShaderRD' SHA256: dd876d3803a017ee65a5b3c87d52a6eb07bbe64b0dc766ea0a74dfd171c29c1a
    Shader 'SsaoInterleaveShaderRD' SHA256: b069381b4f2ab6a073c772ddf54e687359711d74add5c2e01219efe3f783f3f3
    Shader 'ScreenSpaceReflectionScaleShaderRD' SHA256: ffc8402cc0d21c74245426718a87e95cc36124ee380525a3e481aad41c378d5c
    Shader 'ScreenSpaceReflectionShaderRD' SHA256: 162ec85fc951abb735d79463b758b89d765ca305a3debceae72bc0783202d872
    Shader 'ScreenSpaceReflectionFilterShaderRD' SHA256: a1c2c6580fd7b8fea63441002c1eb6f3f8a30c564b79ca84ef8dcbc5600065dc
    Shader 'SubsurfaceScatteringShaderRD' SHA256: 2271dcfd45dcb378511b477e84ef7004199ba77b3b68148f6b2dff0b0672c248
    Shader 'SkyShaderRD' SHA256: ee543dc2c569415bc3e20585fbcb599a3c1115328a83256a75ec39a8ded10fc5
    Shader 'VoxelGiShaderRD' SHA256: a4c98db2a03efa656a1f2197f1a111a97218ca0124bf565f51b0eae880034f7a
    Shader 'VoxelGiDebugShaderRD' SHA256: 0be2a9d40dafd1f25f754c5eda545b2c4295359c01b1a58667f2afb12d958598
    Shader 'SdfgiPreprocessShaderRD' SHA256: 26fbe1523e4981d76eac7267a9517a46b46a3f82d8612b3599d86eb0900494fb
    Shader 'SdfgiDirectLightShaderRD' SHA256: 90b5f2b5f6b7d55f416e44180d5a76df573ec4c1d605da17a3d02dbddb8a30fb
    Shader 'SdfgiIntegrateShaderRD' SHA256: dee4a8bbfb3d0e45709dbc1ab24a5d9c2d859d2ac315347d54f4a92eb7a4acc5
    Shader 'GiShaderRD' SHA256: 0a70c231a617361764e0b8755a0c851a73dac568d2baedc466b56c6de8a298f5
    Shader 'SdfgiDebugShaderRD' SHA256: 5cf62d057ff9e85a7c1a31021d93a442b31e85d380db0d4ee6023cd31cdb6dd6
    Shader 'SdfgiDebugProbesShaderRD' SHA256: efd45158bda923f773988aa7d3d1c9e94dc67e47f2f218e70ae65e94748faffe
    Shader 'VolumetricFogShaderRD' SHA256: b4eba6288b09b88297959b20d8b317c88f1a2999b7a4f22f49fd294fa0c81fa0
    Shader 'VolumetricFogProcessShaderRD' SHA256: 89368573633913372b27fb57a1b8daaf7b7a7f115ecae5f2bf0f56847aaf1b95
    Shader 'BokehDofShaderRD' SHA256: e20f617a2213668f4f078fba5f25bb8e4c4aa1d9118b8056ca02bee8b4ae4b48
    Shader 'CopyShaderRD' SHA256: fe232a91ace2c7452708cb330edbc568570c36fea5ab23863fc6c746f225338f
    Shader 'CopyToFbShaderRD' SHA256: 7f3f32b7fab764c10be4abdfca7bf4c1da24976acedd362656e9f31de41f2180
    Shader 'CubeToDpShaderRD' SHA256: 89cd01ea9d6e7bca4c94f2b7f29e8ca5650a5da870f9fd3735c577a289068286
    Shader 'CubemapDownsamplerShaderRD' SHA256: 887ee85f276ae7b7750b973f2a3b077df7a529a7b134a1c1d698dd0a3713c35c
    Shader 'CubemapFilterShaderRD' SHA256: 368a224cef533b9015904cb8a57b68e3a590dbfcc0934e62f069d253b6de662d
    Shader 'CubemapRoughnessShaderRD' SHA256: f3a7efd06d4b3d77cdeac04e01f4bd8e6da73e62427d87d13061cd72a6d9db5d
    Shader 'SpecularMergeShaderRD' SHA256: dd9e70f8394d64ec5d341b0efa72b810dd5325929ff667f00038c3aee3487808
    Shader 'LuminanceReduceShaderRD' SHA256: d64dcbececfbe366b267a252ae33e694959fa9b1b33bdf07b3cef44440e41c16
    Shader 'TonemapShaderRD' SHA256: a0dab57267735f53e0f32e5a7ebf94cbd683a037db46840defedebb9ebcf64a3
    Shader 'VrsShaderRD' SHA256: fc83af35b2b72647f0478d01688686f14494cff0a92b2a5d7ae859ab8e4c5413
    Shader 'FsrUpscaleShaderRD' SHA256: 1d9c6f50ab70de8ee112ec0d348335e794f58afb353ac43b9ab032dc815b0cd6
    Shader 'RoughnessLimiterShaderRD' SHA256: 9ab9e4539747074fda6bf539e9fa826fd2895feea9a325043987dcc3f778a08f
    Shader 'SortShaderRD' SHA256: b1a6a08db43a30eabfe988cb5ae371e68a5ee85ba32b52933830eb0cea788415
    Shader 'BlitShaderRD' SHA256: 9c0bed3798417e7d3a0e98c9175e5dad319f70876b09fb1b9948bd8d2e248752
    WASAPI: Activated output_device using IAudioClient3 interface
    WASAPI: wFormatTag = 65534
    WASAPI: nChannels = 2
    WASAPI: nSamplesPerSec = 48000
    WASAPI: nAvgBytesPerSec = 384000
    WASAPI: nBlockAlign = 8
    WASAPI: wBitsPerSample = 32
    WASAPI: cbSize = 22
    WASAPI: mix_rate = 48000
    WASAPI: fundamental_period_frames = 480
    WASAPI: min_period_frames = 480
    WASAPI: max_period_frames = 480
    WASAPI: selected a period frame size of 480
    WASAPI: detected 2 channels
    WASAPI: audio buffer frames: 480 calculated latency: 10ms

Using present mode: VK_PRESENT_MODE_FIFO_KHR
TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
.NET: Initializing module...
Found hostfxr: C:\Program Files\dotnet\host/fxr/7.0.2/hostfxr.dll
.NET: hostfxr initialized
.NET: GodotPlugins initialized
.NET: Failed to load project assembly
CORE API HASH: 1580903510
EDITOR API HASH: 2812537578
Class 'EditorPropertyNameProcessor' is not exposed, skipping.
Class 'FramebufferCacheRD' is not exposed, skipping.
Class 'GDScriptEditorTranslationParserPlugin' is not exposed, skipping.
Class 'GDScriptNativeClass' is not exposed, skipping.
Class 'GodotPhysicsServer2D' is not exposed, skipping.
Class 'GodotPhysicsServer3D' is not exposed, skipping.
Class 'IPUnix' is not exposed, skipping.
Class 'ManagedCallableMiddleman' is not exposed, skipping.
Class 'MovieWriterMJPEG' is not exposed, skipping.
Class 'MovieWriterPNGWAV' is not exposed, skipping.
Class 'ResourceFormatImporterSaver' is not exposed, skipping.
Class 'ResourceImporterMP3' is not exposed, skipping.
Class 'ResourceImporterOggVorbis' is not exposed, skipping.
Class 'SceneCacheInterface' is not exposed, skipping.
Class 'SceneRPCInterface' is not exposed, skipping.
Class 'SceneReplicationInterface' is not exposed, skipping.
Class 'UniformSetCacheRD' is not exposed, skipping.
EditorSettings: Load OK!
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
at: _editor_init (modules/gltf/register_types.cpp:70)
Found .NET Sdk version '7.0.102': C:\Program Files\dotnet\sdk\7.0.102
Loaded builtin certs
Creating VMA small objects pool for memory type index 3
EditorSettings: Save OK!
Using present mode: VK_PRESENT_MODE_FIFO_KHR
WinTab context creation failed.
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Running: E:/Program Files/Godot_v4.0-rc1_mono_win64/Godot_v4.0-rc1_mono_win64.exe --verbose --path E:/Projects/LotsObjectsGlitchRepro --remote-debug tcp://127.0.0.1:6007 --editor-pid 5684 --position 3840,30 res://main.tscn
Remote Debugger: Connected!
Godot Engine v4.0.rc1.mono.official.8843d9ad3 - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
Text-to-Speech: SAPI initialized.
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
Layer name GalaxyOverlayVkLayer does not conform to naming standard (Policy #LLP_LAYER_3)
Objects - 1
Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 2249287276160
at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:259)
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
Layer name GalaxyOverlayVkLayer_VERBOSE does not conform to naming standard (Policy #LLP_LAYER_3)
Objects - 1
Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 2249287276160
at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:259)
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
Layer name GalaxyOverlayVkLayer_DEBUG does not conform to naming standard (Policy #LLP_LAYER_3)
Objects - 1
Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 2249287276160
at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:259)
Vulkan devices:
#0: NVIDIA NVIDIA GeForce GTX 1660 Ti - Supported, Discrete
Vulkan API 1.3.224 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1660 Ti
Optional extension VK_KHR_incremental_present not found
Optional extension VK_GOOGLE_display_timing not found

  • Vulkan Variable Rate Shading supported:
    Pipeline fragment shading rate
    Primitive fragment shading rate
    Attachment fragment shading rate, min texel size: (16, 16), max texel size: (16, 16)
  • Vulkan multiview supported:
    max view count: 32
    max instances: 134217727
  • Vulkan subgroup:
    size: 32
    stages: STAGE_VERTEX, STAGE_TESSELLATION_CONTROL, STAGE_TESSELLATION_EVALUATION, STAGE_GEOMETRY, STAGE_FRAGMENT, STAGE_COMPUTE, STAGE_RAYGEN_KHR, STAGE_ANY_HIT_KHR, STAGE_CLOSEST_HIT_KHR, STAGE_MISS_KHR, STAGE_INTERSECTION_KHR, STAGE_CALLABLE_KHR, STAGE_TASK_NV, STAGE_MESH_NV
    supported ops: FEATURE_BASIC, FEATURE_VOTE, FEATURE_ARITHMETIC, FEATURE_BALLOT, FEATURE_SHUFFLE, FEATURE_SHUFFLE_RELATIVE, FEATURE_CLUSTERED, FEATURE_QUAD, FEATURE_PARTITIONED_NV
    quad operations in all stages
    Using present mode: VK_PRESENT_MODE_FIFO_KHR
    WinTab context creation failed.
    Using "wintab" pen tablet driver...
    Creating VMA small objects pool for memory type index 1
    Shader 'CanvasSdfShaderRD' SHA256: 046e005b2f65d93db3f9d5ad03a8480eff7e5c103df728ca751f7e4ce16648aa
    Shader 'SkeletonShaderRD' SHA256: d77e7dc852ee2353853c0bdfa5610077d379ff611872369fcc9575135fc7dd3b
    Shader 'ParticlesShaderRD' SHA256: 2c47cbb531562fdc8953f3aeb76f1488263cbd7a2a4ab186cfb71ae9d2dd22e9
    Shader 'ParticlesCopyShaderRD' SHA256: 00e43a843e836945b66a99e4ca6428f665ef98a4ce12b0a4c384bfdab0756e0a
    Shader 'CanvasShaderRD' SHA256: d4ebf7cc1ae8b86a2ed8273dae35df5ccbbc21bfb03ad29307ab3a0c54408dc0
    Shader 'CanvasOcclusionShaderRD' SHA256: 4272192a34fbbd101b84b7d96f28a3698d1a6c94cdafb07f6f547161c7f799b9
    Shader 'ClusterRenderShaderRD' SHA256: f1d5f6fc9681531b938892370d1864ed67a7695626038222fd11785ce98ea82e
    Shader 'ClusterStoreShaderRD' SHA256: ea2c48fc90eb8d2ec483c9859f2817da962e53bfac92f7a65bbabedf5fe46b0a
    Shader 'ClusterDebugShaderRD' SHA256: 8fd9fc712d3770069e11dc2146e1af6aeceada4031d27cc47d2e651d0c321f71
    Shader 'SceneForwardClusteredShaderRD' SHA256: 21b905c757bbe3156b9ca5067afab2d290e782836dddf637ae2959b8cc7f9cd6
    Shader 'ResolveShaderRD' SHA256: 6868b834dd08c28a56019fbeb3ab9993596326a21a5196b70f6dfed3a27353cb
    Shader 'TaaResolveShaderRD' SHA256: dc3dc387fe86ab981043d371a18828bb5a3fe5a5acfd47b697c914b9aa19e766
    Shader 'SsEffectsDownsampleShaderRD' SHA256: 837b310210749e6a3cd96369b0cddd26347f7720f247cfff2e96dcd75e2c2005
    Shader 'SsilShaderRD' SHA256: 450862d5f5759aa7f2d2ace7c6a0d3f7ce7f3c802d8c42c05c8fc944d6b7ead4
    Shader 'SsilImportanceMapShaderRD' SHA256: 9a2f5aa4da5ed3e7c73a6a6a0122662ab3c525d6e4ba10b25c4d84fbabaa0d15
    Shader 'SsilBlurShaderRD' SHA256: 6b42fcc223dc90d7550bf741266c4b366d4b9dc29fac8a90304c8c48f9dafe79
    Shader 'SsilInterleaveShaderRD' SHA256: 44206b9140357674152b5b3b7f63b9853404c89f40b40256150c7325e57adb0a
    Shader 'SsaoShaderRD' SHA256: ffc66865effaa65607d7920535217f5196e0b6d678e97c0c3cb7c03875f6452e
    Shader 'SsaoImportanceMapShaderRD' SHA256: 8b20a32d911fc8e6be33939f848596b7724c39acee339675ea5195d8f3f8b1c6
    Shader 'SsaoBlurShaderRD' SHA256: dd876d3803a017ee65a5b3c87d52a6eb07bbe64b0dc766ea0a74dfd171c29c1a
    Shader 'SsaoInterleaveShaderRD' SHA256: b069381b4f2ab6a073c772ddf54e687359711d74add5c2e01219efe3f783f3f3
    Shader 'ScreenSpaceReflectionScaleShaderRD' SHA256: ffc8402cc0d21c74245426718a87e95cc36124ee380525a3e481aad41c378d5c
    Shader 'ScreenSpaceReflectionShaderRD' SHA256: 162ec85fc951abb735d79463b758b89d765ca305a3debceae72bc0783202d872
    Shader 'ScreenSpaceReflectionFilterShaderRD' SHA256: a1c2c6580fd7b8fea63441002c1eb6f3f8a30c564b79ca84ef8dcbc5600065dc
    Shader 'SubsurfaceScatteringShaderRD' SHA256: 2271dcfd45dcb378511b477e84ef7004199ba77b3b68148f6b2dff0b0672c248
    Shader 'SkyShaderRD' SHA256: ee543dc2c569415bc3e20585fbcb599a3c1115328a83256a75ec39a8ded10fc5
    Shader 'VoxelGiShaderRD' SHA256: a4c98db2a03efa656a1f2197f1a111a97218ca0124bf565f51b0eae880034f7a
    Shader 'VoxelGiDebugShaderRD' SHA256: 0be2a9d40dafd1f25f754c5eda545b2c4295359c01b1a58667f2afb12d958598
    Shader 'SdfgiPreprocessShaderRD' SHA256: 26fbe1523e4981d76eac7267a9517a46b46a3f82d8612b3599d86eb0900494fb
    Shader 'SdfgiDirectLightShaderRD' SHA256: 90b5f2b5f6b7d55f416e44180d5a76df573ec4c1d605da17a3d02dbddb8a30fb
    Shader 'SdfgiIntegrateShaderRD' SHA256: dee4a8bbfb3d0e45709dbc1ab24a5d9c2d859d2ac315347d54f4a92eb7a4acc5
    Shader 'GiShaderRD' SHA256: 0a70c231a617361764e0b8755a0c851a73dac568d2baedc466b56c6de8a298f5
    Shader 'SdfgiDebugShaderRD' SHA256: 5cf62d057ff9e85a7c1a31021d93a442b31e85d380db0d4ee6023cd31cdb6dd6
    Shader 'SdfgiDebugProbesShaderRD' SHA256: efd45158bda923f773988aa7d3d1c9e94dc67e47f2f218e70ae65e94748faffe
    Shader 'VolumetricFogShaderRD' SHA256: b4eba6288b09b88297959b20d8b317c88f1a2999b7a4f22f49fd294fa0c81fa0
    Shader 'VolumetricFogProcessShaderRD' SHA256: 89368573633913372b27fb57a1b8daaf7b7a7f115ecae5f2bf0f56847aaf1b95
    Shader 'BokehDofShaderRD' SHA256: e20f617a2213668f4f078fba5f25bb8e4c4aa1d9118b8056ca02bee8b4ae4b48
    Shader 'CopyShaderRD' SHA256: fe232a91ace2c7452708cb330edbc568570c36fea5ab23863fc6c746f225338f
    Shader 'CopyToFbShaderRD' SHA256: 7f3f32b7fab764c10be4abdfca7bf4c1da24976acedd362656e9f31de41f2180
    Shader 'CubeToDpShaderRD' SHA256: 89cd01ea9d6e7bca4c94f2b7f29e8ca5650a5da870f9fd3735c577a289068286
    Shader 'CubemapDownsamplerShaderRD' SHA256: 887ee85f276ae7b7750b973f2a3b077df7a529a7b134a1c1d698dd0a3713c35c
    Shader 'CubemapFilterShaderRD' SHA256: 368a224cef533b9015904cb8a57b68e3a590dbfcc0934e62f069d253b6de662d
    Shader 'CubemapRoughnessShaderRD' SHA256: f3a7efd06d4b3d77cdeac04e01f4bd8e6da73e62427d87d13061cd72a6d9db5d
    Shader 'SpecularMergeShaderRD' SHA256: dd9e70f8394d64ec5d341b0efa72b810dd5325929ff667f00038c3aee3487808
    Shader 'LuminanceReduceShaderRD' SHA256: d64dcbececfbe366b267a252ae33e694959fa9b1b33bdf07b3cef44440e41c16
    Shader 'TonemapShaderRD' SHA256: a0dab57267735f53e0f32e5a7ebf94cbd683a037db46840defedebb9ebcf64a3
    Shader 'VrsShaderRD' SHA256: fc83af35b2b72647f0478d01688686f14494cff0a92b2a5d7ae859ab8e4c5413
    Shader 'FsrUpscaleShaderRD' SHA256: 1d9c6f50ab70de8ee112ec0d348335e794f58afb353ac43b9ab032dc815b0cd6
    Shader 'RoughnessLimiterShaderRD' SHA256: 9ab9e4539747074fda6bf539e9fa826fd2895feea9a325043987dcc3f778a08f
    Shader 'SortShaderRD' SHA256: b1a6a08db43a30eabfe988cb5ae371e68a5ee85ba32b52933830eb0cea788415
    Shader 'BlitShaderRD' SHA256: 9c0bed3798417e7d3a0e98c9175e5dad319f70876b09fb1b9948bd8d2e248752
    WASAPI: Activated output_device using IAudioClient3 interface
    WASAPI: wFormatTag = 65534
    WASAPI: nChannels = 2
    WASAPI: nSamplesPerSec = 48000
    WASAPI: nAvgBytesPerSec = 384000
    WASAPI: nBlockAlign = 8
    WASAPI: wBitsPerSample = 32
    WASAPI: cbSize = 22
    WASAPI: mix_rate = 48000
    WASAPI: fundamental_period_frames = 480
    WASAPI: min_period_frames = 480
    WASAPI: max_period_frames = 480
    WASAPI: selected a period frame size of 480
    WASAPI: detected 2 channels
    WASAPI: audio buffer frames: 480 calculated latency: 10ms

TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
.NET: Initializing module...
Found hostfxr: C:\Program Files\dotnet\host/fxr/7.0.2/hostfxr.dll
.NET: hostfxr initialized
.NET: GodotPlugins initialized
.NET: Failed to load project assembly
CORE API HASH: 1580903510
EDITOR API HASH: 2812537578
Loaded builtin certs
Generating new world
EditorSettings: Save OK!
Unloading: Disposing tracked instances...
Unloading: Finished disposing tracked instances.
XR: Clearing primary interface
XR: Removed interfaceNative mobile
XR: Removed interfaceOpenXR
Orphan StringName: Vector2
Orphan StringName: Vector3
Orphan StringName: Vector4
Orphan StringName: GroupViewport
Orphan StringName: RID
Orphan StringName: Color
Orphan StringName: Sky
Orphan StringName: SceneMultiplayer
Orphan StringName: Editor3DHandle
Orphan StringName: StatusSuccess
Orphan StringName: PackedByteArray
Orphan StringName: GuiResizer
Orphan StringName: GuiChecked
Orphan StringName: GuiIndeterminate
Orphan StringName: CodeFoldedRightArrow
Orphan StringName: EditorBoneHandle
Orphan StringName: Vector2i
Orphan StringName: Callable
Orphan StringName: Vector3i
Orphan StringName: Vector4i
Orphan StringName: Godot
Orphan StringName: PackedStringArray
Orphan StringName: ZoomReset
Orphan StringName: OverbrightIndicator
Orphan StringName: Basis
Orphan StringName: GuiCloseCustomizable
Orphan StringName: int
Orphan StringName: CodeFoldDownArrow
Orphan StringName: GuiTab
Orphan StringName: StatusWarning
Orphan StringName: PackedFloat32Array
Orphan StringName: Plane
Orphan StringName: PackedFloat64Array
Orphan StringName: NodePath
Orphan StringName: EditorHandle
Orphan StringName: GuiMiniCheckerboard
Orphan StringName: Signal
Orphan StringName: StringName
Orphan StringName: LockViewport
Orphan StringName: String
Orphan StringName: GuiGraphNodePort
Orphan StringName: Transform2D
Orphan StringName: Transform3D
Orphan StringName: ZoomMore
Orphan StringName: EditorControlAnchor
Orphan StringName: StatusError
Orphan StringName: Array
Orphan StringName: Quaternion
Orphan StringName: bool
Orphan StringName: PackedColorArray
Orphan StringName: PackedVector2Array
Orphan StringName: GuiSpace
Orphan StringName: Object
Orphan StringName: AABB
Orphan StringName: EditorPivot
Orphan StringName: DefaultProjectIcon
Orphan StringName: TextEditorPlay
Orphan StringName: float
Orphan StringName: Dictionary
Orphan StringName: Projection
Orphan StringName: ZoomLess
Orphan StringName: Rect2
Orphan StringName: PackedVector3Array
Orphan StringName: PackedInt32Array
Orphan StringName: Rect2i
Orphan StringName: PackedInt64Array
Orphan StringName: Breakpoint
Orphan StringName: GuiRadioChecked
StringName: 68 unclaimed string names at exit.

@Calinou
Copy link
Member

Calinou commented Feb 13, 2023

I can't reproduce this on 4.0.rc b7723a0 (Linux, GeForce RTX 4090 with NVIDIA 525.85.01). I've tried starting the project several times, pressing Ctrl + E before moving the mouse, resizing the window, etc.

Verbose output
Godot Engine v4.0.rc.custom_build.b7723a01d - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
XInput: Refreshing devices.
XInput: No touch devices found.
Vulkan devices:
  #0: NVIDIA NVIDIA GeForce RTX 4090 - Supported, Discrete
  #1: Unknown llvmpipe (LLVM 15.0.7, 256 bits) - Supported, CPU
Vulkan API 1.3.224 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 4090
Optional extension VK_KHR_incremental_present not found
Optional extension VK_GOOGLE_display_timing not found
- Vulkan Variable Rate Shading supported:
  Pipeline fragment shading rate
  Primitive fragment shading rate
  Attachment fragment shading rate, min texel size: (16, 16), max texel size: (16, 16)
- Vulkan multiview supported:
  max view count: 32
  max instances: 134217727
- Vulkan subgroup:
  size: 32
  stages: STAGE_VERTEX, STAGE_TESSELLATION_CONTROL, STAGE_TESSELLATION_EVALUATION, STAGE_GEOMETRY, STAGE_FRAGMENT, STAGE_COMPUTE, STAGE_RAYGEN_KHR, STAGE_ANY_HIT_KHR, STAGE_CLOSEST_HIT_KHR, STAGE_MISS_KHR, STAGE_INTERSECTION_KHR, STAGE_CALLABLE_KHR, STAGE_TASK_NV, STAGE_MESH_NV
  supported ops: FEATURE_BASIC, FEATURE_VOTE, FEATURE_ARITHMETIC, FEATURE_BALLOT, FEATURE_SHUFFLE, FEATURE_SHUFFLE_RELATIVE, FEATURE_CLUSTERED, FEATURE_QUAD, FEATURE_PARTITIONED_NV
  quad operations in all stages
Using "default" pen tablet driver...
Creating VMA small objects pool for memory type index 1
Shader 'CanvasSdfShaderRD' SHA256: ca082a1225b51c746fe5d794b2e982b8ef49a206f3f4c1a9b32b81d5df532891
Shader 'SkeletonShaderRD' SHA256: 59bb5db5e11900308ca24384a63dc55b3bf508b48e3419a82eda7a87d40a580e
Shader 'ParticlesShaderRD' SHA256: 50ecc9d4731075f832cb16c784dadfecb056cd64836532ebacd1dfbc86a21728
Shader 'ParticlesCopyShaderRD' SHA256: 19bf52ba645c8d190b83523c2c3a963912d45bdf0dc96a163ee414b3c2f506f5
Shader 'CanvasShaderRD' SHA256: b7cf628f83a0a6e0b836df973fadda96a20b74caa04a70d0d414fcb5cf5972a1
Shader 'CanvasOcclusionShaderRD' SHA256: f7c2dfd6ad19857eb185660c82e65879a8d21945295c00b034324fe9ad2ace8b
Shader 'ClusterRenderShaderRD' SHA256: 0261ff19a62c54cdfab3307c4e4c55317e2bd4ea3f358c8a74015d3699ab4adb
Shader 'ClusterStoreShaderRD' SHA256: 51e8bd5524a935d2fe026864c5cfb11068dfbc549eeb5968e04b5de0ee47c914
Shader 'ClusterDebugShaderRD' SHA256: 27a2fda18e1db96e737a81439d421bf79dc13b09b693c6cc5b8c1d851a473fa0
Shader 'SceneForwardClusteredShaderRD' SHA256: a1461c708ceb5d4e78335fd5fea935c28c3980468a364141eee0e22860728902
Shader 'ResolveShaderRD' SHA256: cd94a1541cd24a106d2550ea546f1a1868e0abfca53df9ff807c1472205af390
Shader 'TaaResolveShaderRD' SHA256: d2f0b44d061355d58d9bf76cc9671dffb6ad76fed67b38dee6e7c9e33df471f3
Shader 'SsEffectsDownsampleShaderRD' SHA256: 427ca0a4b980a148e4dc5d400a1eac1457a9ad08433020fde58e0ff6bae449f7
Shader 'SsilShaderRD' SHA256: 35f802d2e8da6923a780e8d8a4f18810e9a82161b76aca00f9b3a911499f71e0
Shader 'SsilImportanceMapShaderRD' SHA256: f94824b6c3e3868429a6be036f5e5e07d212f63a0603f8310927f49bff3b0e4e
Shader 'SsilBlurShaderRD' SHA256: 71969705c23873118ced1c1e340c2d9dfe09d2fd205fc1f6492e193249222b26
Shader 'SsilInterleaveShaderRD' SHA256: 34d03f70e206bacc7845792a7b099be8c0a884658f7738aeb7ec822a7d994b28
Shader 'SsaoShaderRD' SHA256: a172d6941e16e6a76d1d8c0740472bf0e9ef0e71a68bf707026a20b21907a3f4
Shader 'SsaoImportanceMapShaderRD' SHA256: f3f8a1a50a947b02b52f6b754a2fdd5bec08c931d1441b7d384082776e7a3c3c
Shader 'SsaoBlurShaderRD' SHA256: e02efd0faf4e9069a329238085e0765c7d5d1156477baf4b7e53cbcd2c3cb498
Shader 'SsaoInterleaveShaderRD' SHA256: 5330208e117b3f2683354f90521035e101dd056653587ca2b3ba1efdeea77df1
Shader 'ScreenSpaceReflectionScaleShaderRD' SHA256: 230fbd09b8b5b80220e63e67650c66c8747457b892287ba1c157563c2810972e
Shader 'ScreenSpaceReflectionShaderRD' SHA256: 35ad23441fa88f43131e424ae56aaeb1f2b27a3ea5b6df0911339d0ce063a9d5
Shader 'ScreenSpaceReflectionFilterShaderRD' SHA256: e2a84354d376947cdefac4eace0af015090d0c0fb3596390879a946d06c345c1
Shader 'SubsurfaceScatteringShaderRD' SHA256: dc7565d04a78e5a1f693ab882086136c83920d5d79704c03a4f1b764f1474f24
Shader 'SkyShaderRD' SHA256: 75b96b9742399e8430daf50280970e181a7850661c975e53020977f57905aa10
Shader 'VoxelGiShaderRD' SHA256: 3adf3b4f00390087a4e6ab97174624a6e66959519d2c2d115d85a8cae7048d6d
Shader 'VoxelGiDebugShaderRD' SHA256: a46fd8f4844331d877e4303d96aa7021b66f5a56847fde2cf34e126aba558883
Shader 'SdfgiPreprocessShaderRD' SHA256: 46ec728487dba2f0d3d13911063a8bd77a37e39c2ffa48b848cf3567e0686678
Shader 'SdfgiDirectLightShaderRD' SHA256: fdd87aba01d58648ff513bb83c83b67ae6d8a0ab72abb97bc3c7e62a0ce44105
Shader 'SdfgiIntegrateShaderRD' SHA256: bc997894d9365d19938796b54df59c8bdcc13a8e4f70ea36f46139fa0e5f65ef
Shader 'GiShaderRD' SHA256: 87f0c82a8052f0d8c2ad5f7ce69d377a74efa69be1ab4ab0510278f563c2195e
Shader 'SdfgiDebugShaderRD' SHA256: 3f1f301fc2666e6d98fb3c1f88d25cf841ddda8c5b57edb2cd3a292373078f4c
Shader 'SdfgiDebugProbesShaderRD' SHA256: 0506a0df6d87d9d7e0a59ca982dc1aaef323ecacc20c35b025f1d705c459ec47
Shader 'VolumetricFogShaderRD' SHA256: b32da67d602eb33b2a21962a8159d47b41fe1882a301f98a3fa48f96c5241179
Shader 'VolumetricFogProcessShaderRD' SHA256: 59f9f44138d4b4a59812b41d8686c0ba907061dc7e550e03be71f2ba6c6e9bf3
Shader 'BokehDofShaderRD' SHA256: 40c1ad82196689d22f54f8eddd8eb16bbfa9732e827ce0beb33aafaead80fdba
Shader 'CopyShaderRD' SHA256: abb23669254f5c8e7b4ed7b5377ca1254b8263304aa97d252f72514ec2a87718
Shader 'CopyToFbShaderRD' SHA256: eca2256cbfa7c80457348845124365f64240c792c3b409c19f88e5c88f07054a
Shader 'CubeToDpShaderRD' SHA256: cab6f37afa84e58e77b656a2a543281ea5ea40b340c9cd9a9155a68553e9b9ca
Shader 'CubemapDownsamplerShaderRD' SHA256: 6d97c1eadf972decadd4c47ee9bcdaba441be337a03f9371d6ca686b0602930b
Shader 'CubemapFilterShaderRD' SHA256: 6d993f8e7ff4363a702f60a49ddaf9b6f66a3660a8fe22e2402433c72e49764a
Shader 'CubemapRoughnessShaderRD' SHA256: a5cbdbd58aba3c98f8a31c9b8c18246fa67bef17d044f5a59d198d254992190b
Shader 'SpecularMergeShaderRD' SHA256: ef89503ff65ad8628058d9073f8ba76bd67576a45bf7d8f61fdcea4209ef6b22
Shader 'LuminanceReduceShaderRD' SHA256: e68c46798f7a685bfe5bdaeea4398439ed569c59df3cecda4e6e343decc7b042
Shader 'TonemapShaderRD' SHA256: 743b6f8b9aa1fc8da748e91207f0fc5578f3b169951960672fb04a32a185601c
Shader 'VrsShaderRD' SHA256: 809e6bce4f4eb02f227e1debfdbc8af55c8eeb3e8d0a33cb932d4c4d60899725
Shader 'FsrUpscaleShaderRD' SHA256: 656eddbbf704a95f784caf0b736f324f84b480ea6ecb9f1e49009ebe0788297b
Shader 'RoughnessLimiterShaderRD' SHA256: df821ce5c74707c4f454754d1cfb92fe1c478348b196f0543f7bd5d978603c8f
Shader 'SortShaderRD' SHA256: 6b2eba3d665ee375dfc46dfa5817ba7d04a14f67df0dd6dcd9d56c1a70f9884b
Shader 'BlitShaderRD' SHA256: 745b805acffc6452618e77b83e85ca7f8d2d0b3ca15c069ba3f1b9786a37aeee
JoypadLinux: udev enabled and loaded successfully.
PulseAudio: context other
PulseAudio: context other
PulseAudio: context other
PulseAudio: context ready
PulseAudio: Detecting channels for device: alsa_output.usb-Generic_USB_Audio-00.analog-stereo
PulseAudio: detected 2 output channels
PulseAudio: audio buffer frames: 512 calculated output latency: 11ms
 
TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 2747879610
EDITOR API HASH: 594505623
Loaded builtin certs
Generating new world
Text-to-Speech: Speech Dispatcher initialized.
XR: Clearing primary interface
XR: Removed interfaceNative mobile
XR: Removed interfaceOpenXR
PulseAudio: context terminated
Orphan StringName: Vector2
Orphan StringName: Vector3
Orphan StringName: Vector4
Orphan StringName: RID
Orphan StringName: Color
Orphan StringName: SceneMultiplayer
Orphan StringName: PackedByteArray
Orphan StringName: Vector2i
Orphan StringName: Callable
Orphan StringName: Vector3i
Orphan StringName: Vector4i
Orphan StringName: PackedStringArray
Orphan StringName: Basis
Orphan StringName: FileAccess
Orphan StringName: int
Orphan StringName: PackedFloat32Array
Orphan StringName: Plane
Orphan StringName: PackedFloat64Array
Orphan StringName: NodePath
Orphan StringName: Signal
Orphan StringName: StringName
Orphan StringName: String
Orphan StringName: Transform2D
Orphan StringName: Transform3D
Orphan StringName: Array
Orphan StringName: Quaternion
Orphan StringName: bool
Orphan StringName: PackedColorArray
Orphan StringName: PackedVector2Array
Orphan StringName: Object
Orphan StringName: AABB
Orphan StringName: float
Orphan StringName: Dictionary
Orphan StringName: Projection
Orphan StringName: Rect2
Orphan StringName: PackedVector3Array
Orphan StringName: PackedInt32Array
Orphan StringName: Rect2i
Orphan StringName: PackedInt64Array
StringName: 39 unclaimed string names at exit.

@clayjohn
Copy link
Member

Nothing is coming up in the console. So it is most likely not the same issue as #70406 (surfaces getting freed and not reallocated when using threaded rendering)

@viksl
Copy link
Contributor Author

viksl commented Feb 13, 2023

For me it's as I mentioned also locked to some positions and angles but it doesn't seem to be locked to axis as for @bithunter32

I've tried the project in Compatibility mode and then Mobile mode instead of Forward+ and had the same issue. Not sure if it's a helpful info or not.

If I change camera Far to anything below 182 then the issue disappears and here's a screen when it's 182 when it's the last value for me when it still happens, the screen looks different a bit I assume that's the the camera cut off (left side).

far-182

I also tried changing about everything in the Limits in Rendering in Project Settings but nothing made any difference.

@bithunter32
Copy link

bithunter32 commented Feb 14, 2023

For me it's as I mentioned also locked to some positions and angles but it doesn't seem to be locked to axis as for @bithunter32

It was only locked in the default example but it doesn't seem to matter. When i change the scene other positions and angles trigger it. No output out of the ordinary when it happens

Log
 TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 3220455314
EDITOR API HASH: 1590500445
Loaded builtin certs
Generating new world
Using present mode: VK_PRESENT_MODE_FIFO_KHR
WinTab context creation failed.
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
--- Debugging process stopped ---

log.txt

Update

I tried the same on Ubuntu 20.04 and get the exact same result. Same positions and angles.

Bildschirmfoto von 2023-02-14 03-49-06

log.txt
glxinfo.txt
vulkaninfo.txt

@bithunter32
Copy link

Further I noticed that the profiler indeed shows, that the number of drawn objects and primitives goes down.

bug

profiler

@Zireael07
Copy link
Contributor

If I change camera Far to anything below 182 then the issue disappears and here's a screen when it's 182 when it's the last value for me when it still happens, the screen looks different a bit I assume that's the the camera cut off (left side).

That's interesting, combined with the fact that your monitor shows number of drawn objects falling it seems to suggest stuff is improperly culled?

@bithunter32
Copy link

Since it is always reproducable for the same frustum settings it seems to be a culling problem. Its also stable.. means when the camera isn't moving nothing jitters - the objects are just not drawn.

@viksl
Copy link
Contributor Author

viksl commented Feb 14, 2023

@Zireael07 Actually I double checked and it does happen even with Far set to lower values it just happens at a different angle, if anything in my example for me when I lower the Far to 181 it happens even more frequently than with far at 4000, the angle is just different, it's about 30° to the left and the same angle to the right from my demo for me.

Again I have no idea why this is happening. I can only test this on my side and report what I see when someone asks me too ;-).

@bithunter32
Copy link

@Zireael07 I tested this on the current master. So if i can help with debugging somehow I will gladly do so. Though i have no idea where to look or how to proceed right now, since i don't know much about godots code base :o)

@myaaaaaaaaa
Copy link
Contributor

myaaaaaaaaa commented Feb 16, 2023

The culprit appears to be RendererSceneCull::_scene_cull_threaded(), editing servers/rendering/renderer_scene_cull.cpp to force single-threaded culling fixes it for me:

--- a.cpp	2023-02-16 00:19:33.255925572 -0500
+++ b.cpp	2023-02-16 00:19:51.606337018 -0500
@@ -3086,35 +3086,35 @@
 
 //#define DEBUG_CULL_TIME
 #ifdef DEBUG_CULL_TIME
 		uint64_t time_from = OS::get_singleton()->get_ticks_usec();
 #endif
-		if (cull_to > thread_cull_threshold) {
+		if (false) {
 			//multiple threads
 			for (InstanceCullResult &thread : scene_cull_result_threads) {
 				thread.clear();
 			}
 
 			WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &RendererSceneCull::_scene_cull_threaded, &cull_data, scene_cull_result_threads.size(), -1, true, SNAME("RenderCullInstances"));
 			WorkerThreadPool::get_singleton()->wait_for_group_task_completion(group_task);
 
 			for (InstanceCullResult &thread : scene_cull_result_threads) {
 				scene_cull_result.append_from(thread);
 			}
 
 		} else {
 			//single threaded
 			_scene_cull(cull_data, scene_cull_result, cull_from, cull_to);
 		}

Context:

#ifdef DEBUG_CULL_TIME
uint64_t time_from = OS::get_singleton()->get_ticks_usec();
#endif
if (cull_to > thread_cull_threshold) {
//multiple threads
for (InstanceCullResult &thread : scene_cull_result_threads) {
thread.clear();
}
WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &RendererSceneCull::_scene_cull_threaded, &cull_data, scene_cull_result_threads.size(), -1, true, SNAME("RenderCullInstances"));
WorkerThreadPool::get_singleton()->wait_for_group_task_completion(group_task);
for (InstanceCullResult &thread : scene_cull_result_threads) {
scene_cull_result.append_from(thread);
}
} else {
//single threaded
_scene_cull(cull_data, scene_cull_result, cull_from, cull_to);
}

Edit:

I tried with an iGPU and Nvidia laptop GPU on PopOS 22.04 and an RX 6900 XT on Windows 10 and could not reproduce.

@clayjohn This issue only pops up with threading/worker_pool/max_threads set to exactly 4, make sure to set that before trying to reproduce this.

@bithunter32
Copy link

The culprit appears to be RendererSceneCull::_scene_cull_threaded(), editing servers/rendering/renderer_scene_cull.cpp > to force single-threaded culling fixes it for me

Can confirm this. Forcing only single threaded there fixes the issue.

@bithunter32
Copy link

bithunter32 commented Feb 16, 2023

Can confirm this. Forcing only single threaded there fixes the issue.

At least it does not appear anymore in the example but there seems to be a problem with _scene_cull in general.
Converting the logic to single threaded still produces the same bug.

if (false) {//if (cull_to > thread_cull_threshold) {
	//multiple threads
	for (InstanceCullResult &thread : scene_cull_result_threads) {
		thread.clear();
	}

	WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &RendererSceneCull::_scene_cull_threaded, &cull_data, scene_cull_result_threads.size(), -1, true, SNAME("RenderCullInstances"));
	WorkerThreadPool::get_singleton()->wait_for_group_task_completion(group_task);

	for (InstanceCullResult &thread : scene_cull_result_threads) {
		scene_cull_result.append_from(thread);
	}

} else {
	uint32_t cull_total = cull_data.scenario->instance_data.size();
	uint32_t total_threads = WorkerThreadPool::get_singleton()->get_thread_count();
	for (uint32_t p_thread = 0; p_thread < total_threads; ++p_thread) {	// total_threads == 8
		cull_from = p_thread * cull_total / total_threads;
		cull_to = (p_thread + 1 == total_threads) ? cull_total : ((p_thread + 1) * cull_total / total_threads);
		_scene_cull(cull_data, scene_cull_result_threads[p_thread], cull_from, cull_to);
	}

	for (InstanceCullResult &thread : scene_cull_result_threads) {
		scene_cull_result.append_from(thread);
	}
	//single threaded
	//_scene_cull(cull_data, scene_cull_result, cull_from, cull_to);
}

Another example project:
Updated to show RIDs under cursor to identify culled and non-culled tiles
(fixed swapped rids)

CullinBug_01.zip

@bithunter32
Copy link

bithunter32 commented Feb 16, 2023

Seems like PagedArray::merge_unordered called from RendererSceneCull::InstanceCullResult::append_from is responsible for this. It just skips a merge sometimes. In one go there are 22793 instances - which is correctly rendered. When split and merged the outcome is only 18697.

Merge: 2
Size: 2
Merge: 0
Size: 2
Merge: 1763
Size: 1765
Merge: 4096 // merge skipped - expected 22793 - got 18697
Size: 1765
Merge: 4151
Size: 5916
Merge: 4205
Size: 10121
Merge: 4259
Size: 14380
Merge: 4317
Size: 18697

@clayjohn
Copy link
Member

@bithunter32 It looks like in the threaded version the result buffers are cleared before using, while in your single-threaded version they are never cleared

for (InstanceCullResult &thread : scene_cull_result_threads) {
		thread.clear();
}

@bithunter32
Copy link

bithunter32 commented Feb 16, 2023

@bithunter32 It looks like in the threaded version the result buffers are cleared before using, while in your single-threaded version they are never cleared

for (InstanceCullResult &thread : scene_cull_result_threads) {
		thread.clear();
}

@clayjohn that was just a short try. i restored the original code before i proceeded with testing. The original threaded code produces still a too short PagedArray.
*merge_unordered resets the count of the incoming array already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants