Simple Dissolve (+ragdoll tutorial)
This is just a very simple dissolve shder I’ve made for my YouTube’s “create ragdolls in godot” tutorial.
You can find the full sample project on my github.
Link to the youtube ragdoll tutorial (its in spanish).
Shader code
shader_type spatial;
//render_mode unshaded;
uniform float t = 0.0;
uniform vec3 albedo_and_emissive_color : source_color = vec3(1.0);
uniform sampler2D noise_tex;
uniform float noise_scale = 1.0;
void fragment() {
float noise = texture(noise_tex, UV * noise_scale).r;
float mask = step(t, noise);
if (mask < 1.0) { discard; }
ALBEDO = albedo_and_emissive_color;
EMISSION = albedo_and_emissive_color;
}
