Closed ghost closed 6 years ago
This is likely shader compilation. GLSL/HLSL shaders are runtime compiled.
Duplicate of/related to #17263.
This also happens with particle systems when they first spawn, I imagine for the same or similar reasons. Isn't this perfectly fixable with preload() called in _ready()? Or will Godot only actually load/compile a material's shader when it actually is expected to use it for rendering? I can see this making more sense in a large game where it needs to unload/reload textures/shaders dynamically, but only if it were to do so quietly and smoothly in a threaded fashion without blocking the main update cycle.
Particle systems are mentioned in the linked issue, #17263
Duplicate of #13954
59b8166 Antergos x86_64
Issue description:
Expected: camera to rotate smoothly Happened: Game stutters each time new material appears on camera (only for the first time)
GIF recording is kinda misleading. Video here: https://youtu.be/EKV-0EJcJUM as you can see the 2nd time the camera rotates it's smoother.
(Number shown is frame count, not frame rate :P)
Steps to reproduce:
Minimal reproduction project:
issue.zip
Edit: how it looks in the profiler. It takes roughly a second to render that frame.