-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrender_texture_world.tscn
160 lines (121 loc) · 5.16 KB
/
render_texture_world.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[gd_scene load_steps=19 format=3 uid="uid://dc66x6h30fndh"]
[ext_resource type="Texture2D" uid="uid://l5qwdkmx6a7c" path="res://texture/wood.webp" id="1_ty8vs"]
[ext_resource type="Shader" path="res://screen_reading_shader1.gdshader" id="2_jf5x2"]
[ext_resource type="Shader" path="res://screen_reading_shader2.gdshader" id="3_mydwm"]
[sub_resource type="GDScript" id="GDScript_kwoxf"]
script/source = "extends Node3D
@export
var test:String
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
"
[sub_resource type="Environment" id="Environment_6inj5"]
background_mode = 1
background_color = Color(0.942823, 0.942823, 0.942823, 1)
ambient_light_source = 2
ambient_light_color = Color(1, 1, 1, 1)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_k7d28"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_apbd1"]
albedo_texture = ExtResource("1_ty8vs")
[sub_resource type="GDScript" id="GDScript_cc6ib"]
script/source = "@tool
extends MeshInstance3D
func _process(delta: float) -> void:
rotate(Vector3(0.0, 1.0, 0.0), 1.0 * delta);
pass
"
[sub_resource type="PlaneMesh" id="PlaneMesh_rphbp"]
size = Vector2(100, 100)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xlx3y"]
render_priority = 1
albedo_color = Color(0.196078, 0.360784, 0.427451, 1)
[sub_resource type="BoxMesh" id="BoxMesh_08jd8"]
size = Vector3(2, 2, 0.1)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_n5c1v"]
render_priority = 0
shader = ExtResource("2_jf5x2")
[sub_resource type="FastNoiseLite" id="FastNoiseLite_72ine"]
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_qil0d"]
seamless = true
as_normal_map = true
noise = SubResource("FastNoiseLite_72ine")
[sub_resource type="ViewportTexture" id="ViewportTexture_ymxvk"]
viewport_path = NodePath("SubViewport")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_7t0sq"]
resource_local_to_scene = true
render_priority = 0
shader = ExtResource("3_mydwm")
shader_parameter/time_scale = 0.02
shader_parameter/distortion_scale = 0.05
shader_parameter/noise = SubResource("NoiseTexture2D_qil0d")
shader_parameter/screen_tex = SubResource("ViewportTexture_ymxvk")
[sub_resource type="GDScript" id="GDScript_uclt0"]
script/source = "@tool
extends SubViewport
@export var resolution_divider = 2.0
func _ready() -> void:
if Engine.is_editor_hint():
size = EditorInterface.get_editor_viewport_3d(0).size / resolution_divider
else:
size = get_tree().root.size / resolution_divider
func _process(delta: float) -> void:
if Engine.is_editor_hint():
size = EditorInterface.get_editor_viewport_3d(0).size / resolution_divider
else:
size = get_tree().root.size / resolution_divider
"
[sub_resource type="GDScript" id="GDScript_1mwor"]
script/source = "@tool
extends Camera3D
@export
var resolution = 10
func _ready() -> void:
if Engine.is_editor_hint():
transform = EditorInterface.get_editor_viewport_3d(0).get_camera_3d().transform
func _process(delta: float) -> void:
if Engine.is_editor_hint():
transform = EditorInterface.get_editor_viewport_3d(0).get_camera_3d().transform
"
[node name="RenderTextureWorld" type="Node3D"]
script = SubResource("GDScript_kwoxf")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_6inj5")
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.705827, 1.05996, 4.56403)
current = true
[node name="RemoteTransform3D" type="RemoteTransform3D" parent="Camera3D"]
remote_path = NodePath("../../SubViewport/Camera3D")
[node name="someobject" type="MeshInstance3D" parent="."]
transform = Transform3D(-0.332746, 0, 0.938556, 0, 1, 0, -0.938556, 0, -0.332746, 0, 0.992885, 0)
mesh = SubResource("CapsuleMesh_k7d28")
surface_material_override/0 = SubResource("StandardMaterial3D_apbd1")
script = SubResource("GDScript_cc6ib")
[node name="floor" type="MeshInstance3D" parent="."]
layers = 3
mesh = SubResource("PlaneMesh_rphbp")
surface_material_override/0 = SubResource("StandardMaterial3D_xlx3y")
[node name="lenses" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1.58042)
[node name="screen_reading_1" type="MeshInstance3D" parent="lenses"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.154275, 1.0798, 0.0235972)
mesh = SubResource("BoxMesh_08jd8")
surface_material_override/0 = SubResource("ShaderMaterial_n5c1v")
[node name="screen_reading_2" type="MeshInstance3D" parent="lenses"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.629097, 1.0798, 1.0236)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_08jd8")
surface_material_override/0 = SubResource("ShaderMaterial_7t0sq")
[node name="SubViewport" type="SubViewport" parent="."]
size = Vector2i(761, 341)
script = SubResource("GDScript_uclt0")
[node name="Camera3D" type="Camera3D" parent="SubViewport"]
transform = Transform3D(0.996083, -0.00943928, 0.0879187, 0, 0.994286, 0.10675, -0.088424, -0.106332, 0.990391, -0.0720902, 1.40923, 4.32901)
visible = false
cull_mask = 1048573
script = SubResource("GDScript_1mwor")
resolution = null