version_get_shader: Condition "!version" is true.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By IvanVoirol


I’ve started to migrate a big project to godot 4, and I don’t understand how to fix this error. I get it as soon as project is played, and it is repeated over and over, even when the preview is closed :

E 0:00:02:0860 version_get_shader: Condition “!version” is true.
Returning: RID() <C++ Source>
./servers/rendering/renderer_rd/shader_rd.h:140 @ version_get_shader()

The error pointed to this GitHub line of script

What should I do?

:bust_in_silhouette: Reply From: a0kami

Have you tried cleaning your .godot/shader_cache/ folder in the project root ?

Yes I did, and nothing more happened, the error keeps printing every frame, even when I don’t try my game (editor mode).

IvanVoirol | 2022-12-16 07:27

In my case the problem was in a mistake in shader code. For example, constants DEPTH_TEXTURE and SCREEN_TEXTURE right now not exists anymore. Try to disable all shaders and then enable them one by one to find out the solution.

Ilja Vost | 2023-04-24 13:56