-
Notifications
You must be signed in to change notification settings - Fork 0
/
Haus1.tscn
92 lines (76 loc) · 3.26 KB
/
Haus1.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[gd_scene load_steps=6 format=3 uid="uid://cblnrtcqjey03"]
[ext_resource type="PackedScene" uid="uid://cqrunrcncwjph" path="res://Share/Haus1.dae" id="1"]
[ext_resource type="Shader" path="res://HoleShader.gdshader" id="2"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_nlvrj"]
render_priority = 0
shader = ExtResource("2")
shader_parameter/albedo = Color(1, 1, 1, 1)
shader_parameter/metallic = 0.0
shader_parameter/metallic_texture_channel = Plane(1, 0, 0, 0)
shader_parameter/point_size = 1.0
shader_parameter/roughness = 1.0
shader_parameter/specular = 0.5
shader_parameter/uv1_offset = Vector3(0, 0, 0)
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv2_offset = Vector3(0, 0, 0)
shader_parameter/uv2_scale = Vector3(1, 1, 1)
[sub_resource type="Shader" id="Shader_kfcwq"]
code = "// NOTE: Shader automatically converted from Godot Engine 4.0.beta8's StandardMaterial3D.
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 distance_fade_min;
uniform float distance_fade_max;
uniform float point_size : hint_range(0,128);
uniform float roughness : hint_range(0,1);
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;
uniform float metallic;
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;
}
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;
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;
SPECULAR = specular;
{
float fade_distance = length(VERTEX);
const vec3 magic = vec3(0.06711056f, 0.00583715f, 52.9829189f); float fade = clamp(smoothstep(distance_fade_min, distance_fade_max, fade_distance), 0.0, 1.0);
if (fade < 0.001 || fade < fract(magic.z * fract(dot(FRAGCOORD.xy, magic.xy)))) {
discard;
}
}
}
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_eqq6a"]
render_priority = 0
shader = SubResource("Shader_kfcwq")
shader_parameter/albedo = Color(1, 1, 1, 1)
shader_parameter/distance_fade_max = 10.0
shader_parameter/distance_fade_min = 0.0
shader_parameter/metallic = 0.0
shader_parameter/metallic_texture_channel = Plane(1, 0, 0, 0)
shader_parameter/point_size = 1.0
shader_parameter/roughness = 1.0
shader_parameter/specular = 0.5
shader_parameter/uv1_offset = Vector3(0, 0, 0)
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv2_offset = Vector3(0, 0, 0)
shader_parameter/uv2_scale = Vector3(1, 1, 1)
[node name="Haus1" instance=ExtResource("1")]
[node name="Cube" parent="." index="0"]
surface_material_override/0 = SubResource("ShaderMaterial_nlvrj")
surface_material_override/1 = SubResource("ShaderMaterial_eqq6a")