Problem:
I have a material which uses a shader in godot4(first stable release) and this is the code for the shader:
shader_type canvas_item;
uniform sampler2D custom_texture;
uniform float cutoff: hint_range(0, 1) = 1;
uniform float smoothness: hint_range(0, 1) = 0.1;
uniform vec3 color = vec3(0, 0, 0);
uniform bool inverted = false;
uniform bool linear_fade = true;
void fragment() {
if (!linear_fade) {
float value = texture(custom_texture, UV).r;
if (inverted) {
value = 1.0 - value;
}
float alpha = smoothstep(cutoff, cutoff + smoothness, value * (1.0 - smoothness) + smoothness);
COLOR = vec4(color.rgb, alpha);
} else {
COLOR = vec4(color.rgb, (1.0 - cutoff));
}
}
After I run my game scene with this shader attached to a color rect, I get this warning message multiple times:
W 0:00:01:0839 _set: This material (containing shader with path: 'res://addons/scene_manager/scene_manager.tres::Shader_vksmm') uses an old deprecated parameter names. Consider re-saving this resource (or scene which contains it) in order for it to continue working in future versions.
<C++ Source> scene/resources/material.cpp:184 @ _set()
If you want to actually create this error message by yourself and see what is happening, you can clone scene_manager repository(which is an addon for godot) and run its demo to see the original problem I'm dealing with.
Thanks everyone who is helping me on this.