Closed Zylann closed 6 days ago
Does this behavior change if you change the Threaded Cull threshold to a much higher value in the project settings (so that threaded culling is not used)?
The scene has only 16 multimesh instances, which is way below the default threshold (1000). I tried anyways to raise it to the maximum I could (65536) and that had no effect. Also, as shown in the video of the linked issue, the problem doesn't just make multimesh instances disappear, it corrupts their transforms so sometimes they show up with random scales or flicker around the camera.
TAA also appears to have the same issue.
While I can't investigate this in detail at the moment, the points of interest is any functionality that affects multimesh and the doubling in size of its transforms buffer when TAA/FSR2 is enabled, which is required for motion vectors.
void MeshStorage::_multimesh_enable_motion_vectors(MultiMesh *multimesh)
void MeshStorage::_multimesh_get_motion_vectors_offsets(RID p_multimesh, uint32_t &r_current_offset, uint32_t &r_prev_offset)
I failed to replicate this in the current master branch. After investigating it appears that this was fixed with #95270.
Thanks for confirming!
Closing as fixed.
Tested versions
Godot 4.2 Godot 4.3 beta2
System information
Windows 10 64 bits NVIDIA GeForce GTX 1060
Issue description
I got a report from someone who got a strange issue going on when multimesh buffers get modified, causing instances to get corrupted: https://github.com/Zylann/godot_voxel/issues/670
Investigating revealed that FSR2 seems to cause the issue. Turning it off makes the issue non-reproducible.
I tried making a simple project where I generate multimeshes and randomly edit and change their visible counts. Despite not being able to reproduce a situation that looks the same, I could still observe a striking difference in behavior between enabling FSR2 and not enabling it. This is not expected.
Steps to reproduce
get_instance_transform
andset_instance_transform
to change specific instancesvisible_instance_count
to a smaller count progressivelyMinimal reproduction project (MRP)
MultiMeshFSR2.zip (Godot 4.3 beta2)
This project defaults to a scaled down 3D rendering, using bilinear scaling.
^ Result after 5 presses.
^ Result after 5 presses
Maybe the repro can be simplified further. I mostly tried to reproduce a scenario close to what happens in the full project.