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;
}
Live Preview
Tags
dissolve
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from ProfesorShader

Related shaders

guest

0 Comments
Oldest
Newest Most Voted