godot_rl_ScoreTheGoal / scenes /goal /goal_visual.tscn
jtatman's picture
Upload folder using huggingface_hub
f4d4c4d verified
[gd_scene load_steps=4 format=3 uid="uid://br8oux3ppivpn"]
[ext_resource type="PackedScene" uid="uid://c6kw3obr7npgk" path="res://assets/goal.glb" id="1_m6qkg"]
[sub_resource type="Shader" id="Shader_eprhu"]
code = "// NOTE: Shader automatically converted from Godot Engine 4.3.stable.mono's StandardMaterial3D.
// Adds sway to the goal category flags
shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_burley, specular_schlick_ggx;
uniform vec4 albedo : source_color;
uniform sampler2D texture_albedo : source_color, filter_linear_mipmap, repeat_enable;
uniform float point_size : hint_range(0.1, 128.0, 0.1);
uniform float roughness : hint_range(0.0, 1.0);
uniform sampler2D texture_metallic : hint_default_white, filter_linear_mipmap, repeat_enable;
uniform vec4 metallic_texture_channel;
uniform sampler2D texture_roughness : hint_roughness_r, filter_linear_mipmap, repeat_enable;
uniform float specular : hint_range(0.0, 1.0, 0.01);
uniform float metallic : hint_range(0.0, 1.0, 0.01);
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;
void vertex() {
UV = UV * uv1_scale.xy + uv1_offset.xy;
float offset = VERTEX.x * sin(VERTEX.x * 20.0 + 5.0 * TIME);
VERTEX.z += 0.2 * offset;
VERTEX.y += 0.05 * offset;
}
void fragment() {
vec2 base_uv = UV;
vec4 albedo_tex = texture(texture_albedo, base_uv);
ALBEDO = albedo.rgb * albedo_tex.rgb;
float metallic_tex = dot(texture(texture_metallic, base_uv), metallic_texture_channel);
METALLIC = metallic_tex * metallic;
SPECULAR = specular;
vec4 roughness_texture_channel = vec4(1.0, 0.0, 0.0, 0.0);
float roughness_tex = dot(texture(texture_roughness, base_uv), roughness_texture_channel);
ROUGHNESS = roughness_tex * roughness;
}
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_3lno6"]
resource_local_to_scene = true
render_priority = 0
shader = SubResource("Shader_eprhu")
shader_parameter/albedo = Color(0, 1, 0, 1)
shader_parameter/point_size = 1.0
shader_parameter/roughness = 1.0
shader_parameter/metallic_texture_channel = null
shader_parameter/specular = 0.5
shader_parameter/metallic = 0.0
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv1_offset = Vector3(0, 0, 0)
shader_parameter/uv2_scale = Vector3(1, 1, 1)
shader_parameter/uv2_offset = Vector3(0, 0, 0)
[node name="goal" instance=ExtResource("1_m6qkg")]
[node name="Cube_001" parent="." index="2"]
material_override = SubResource("ShaderMaterial_3lno6")