+1 vote

Hi. This has surely been discussed before and I am curious what your tactics are for dealing with this problem. In a 3D scene in Godot, unless the camera sees all shaders/materials used in a level at frame 1 and the engine has a chance to compile them at the start, there will be significant frame drops further on as you move through the level and new materials enter the viewport. What tips does everyone have for dealing with this? I heard some people build a 'wall' of all possible materials and pop it for a split second at the start for the camera to see them and compile. Seems like a hacky workaround...
Is there a recommended way to tackle this?

in Engine by (389 points)

1 Answer

0 votes
Best answer

See this tutorial: https://www.youtube.com/watch?v=Cg4ZT6X0ghs

Godot will support shader caching and threaded compilation in Godot 4.0 thanks to Vulkan, but OpenGL makes this very difficult (if not impossible).

by (9,370 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.