From e9598b88841374301646a7115253ab38ac904e4c Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Fri, 24 Dec 2021 21:10:33 +0100 Subject: working --- shaders/dissolve_mat.tres | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'shaders/dissolve_mat.tres') diff --git a/shaders/dissolve_mat.tres b/shaders/dissolve_mat.tres index c8e2103..9ba21a7 100644 --- a/shaders/dissolve_mat.tres +++ b/shaders/dissolve_mat.tres @@ -4,7 +4,7 @@ code = "shader_type spatial; render_mode cull_disabled; -uniform sampler2D texture; +uniform vec4 albedo: hint_color = vec4(1., 1., 1., 1.); uniform sampler2D blendTexture; uniform sampler2D noiseTexture; @@ -36,7 +36,6 @@ void vertex(){ void fragment() { vec3 position = world_pos; - vec4 text = texture(texture, UV); vec4 blend = texture(blendTexture, UV * blendUVScale); vec2 st = UV; @@ -57,11 +56,11 @@ void fragment() { float borderPart = upperBorder - bottomBorder; vec4 color = mix(blend, borderColor, upperBorder); - color = mix(color, text, bottomBorder); + color = mix(color, albedo, bottomBorder); ALBEDO = color.rgb; - if (!FRONT_FACING) { + if (!FRONT_FACING && false) { ALBEDO = borderColor.rgb; NORMAL = VIEW; } @@ -88,6 +87,7 @@ noise = SubResource( 5 ) [resource] resource_local_to_scene = true shader = SubResource( 1 ) +shader_param/albedo = Color( 1, 1, 1, 1 ) shader_param/offset = 0.369 shader_param/up = true shader_param/borderColor = Color( 1, 1, 1, 0 ) -- cgit v1.2.3-54-g00ecf