+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?

asked Jul 6 in Engine by Macryc (289 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).

answered Jul 9 by Calinou (6,336 points)
selected Jul 10 by Macryc
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.