meat_madness_redux/godot/effects/SinkBlock.tscn

75 lines
2.3 KiB
Plaintext

[gd_scene load_steps=8 format=2]
[ext_resource path="res://effects/sink_block_wavy_meat_part2.tres" type="Material" id=1]
[ext_resource path="res://effects/SinkBlock.gd" type="Script" id=2]
[ext_resource path="res://effects/sink_block_tiled_texture.png" type="Texture" id=3]
[sub_resource type="CubeMesh" id=3]
[sub_resource type="Shader" id=5]
code = "// NOTE: Shader automatically converted from Godot Engine 3.5.1.stable's SpatialMaterial.
shader_type spatial;
render_mode async_visible,blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx;
uniform vec4 albedo : hint_color;
uniform sampler2D texture_albedo : hint_albedo;
uniform float specular;
uniform float metallic;
uniform float roughness : hint_range(0,1);
uniform float point_size : hint_range(0,128);
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;
void vertex() {
float offset = TIME / 100.0;
UV=UV*uv1_scale.xy+vec2(offset, offset);
}
void fragment() {
vec2 base_uv = UV;
vec4 albedo_tex = texture(texture_albedo,base_uv);
albedo_tex *= COLOR;
ALBEDO = albedo.rgb * albedo_tex.rgb;
METALLIC = metallic;
ROUGHNESS = roughness;
SPECULAR = specular;
}
"
[sub_resource type="ShaderMaterial" id=7]
resource_name = "tiled_sink_material"
next_pass = ExtResource( 1 )
shader = SubResource( 5 )
shader_param/albedo = Color( 1, 1, 1, 1 )
shader_param/specular = 0.5
shader_param/metallic = 0.0
shader_param/roughness = 0.5
shader_param/point_size = 1.0
shader_param/uv1_scale = Vector3( 10, 10, 1 )
shader_param/uv1_offset = Vector3( 0, -99, 0 )
shader_param/uv2_scale = Vector3( 1, 1, 1 )
shader_param/uv2_offset = Vector3( 0, 0, 0 )
shader_param/texture_albedo = ExtResource( 3 )
[sub_resource type="BoxShape" id=4]
[node name="SinkBlock" type="MeshInstance"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00414968, 0.00430012, 0.0115683 )
mesh = SubResource( 3 )
material/0 = SubResource( 7 )
script = ExtResource( 2 )
[node name="SinkRegion" type="Area" parent="."]
[node name="CollisionShape" type="CollisionShape" parent="SinkRegion"]
shape = SubResource( 4 )
[connection signal="body_entered" from="SinkRegion" to="." method="_on_SinkRegion_body_entered"]
[connection signal="body_exited" from="SinkRegion" to="." method="_on_SinkRegion_body_exited"]