2019-11-02 22:58:29 +01:00
|
|
|
[gd_scene load_steps=17 format=2]
|
2019-09-29 10:07:32 +02:00
|
|
|
|
|
|
|
[ext_resource path="res://rodz_labs_logo.png" type="Texture" id=1]
|
|
|
|
|
|
|
|
[sub_resource type="CubeMesh" id=1]
|
|
|
|
|
|
|
|
[sub_resource type="SpatialMaterial" id=2]
|
|
|
|
albedo_texture = ExtResource( 1 )
|
|
|
|
uv1_scale = Vector3( 3, 2, 1 )
|
|
|
|
|
|
|
|
[sub_resource type="CylinderMesh" id=3]
|
|
|
|
|
|
|
|
[sub_resource type="SpatialMaterial" id=4]
|
|
|
|
albedo_texture = ExtResource( 1 )
|
|
|
|
uv1_scale = Vector3( 2, 2, 2 )
|
|
|
|
|
|
|
|
[sub_resource type="SphereMesh" id=5]
|
|
|
|
radius = 1.5
|
|
|
|
height = 3.0
|
2019-11-02 22:58:29 +01:00
|
|
|
radial_segments = 512
|
|
|
|
rings = 256
|
2019-09-29 10:07:32 +02:00
|
|
|
|
|
|
|
[sub_resource type="SpatialMaterial" id=6]
|
|
|
|
albedo_texture = ExtResource( 1 )
|
2019-10-01 23:15:36 +02:00
|
|
|
|
|
|
|
[sub_resource type="SpatialMaterial" id=7]
|
|
|
|
albedo_texture = ExtResource( 1 )
|
2019-09-29 10:07:32 +02:00
|
|
|
uv1_scale = Vector3( 2, 2, 2 )
|
|
|
|
uv1_offset = Vector3( 0, 0.5, 0 )
|
|
|
|
|
2019-11-02 22:58:29 +01:00
|
|
|
[sub_resource type="PrismMesh" id=8]
|
2019-09-29 10:07:32 +02:00
|
|
|
|
2019-10-01 23:15:36 +02:00
|
|
|
[sub_resource type="SpatialMaterial" id=9]
|
2019-09-29 10:07:32 +02:00
|
|
|
albedo_texture = ExtResource( 1 )
|
2019-11-02 22:58:29 +01:00
|
|
|
uv1_scale = Vector3( 3, 2, 2 )
|
2019-09-29 10:07:32 +02:00
|
|
|
|
2019-10-01 23:15:36 +02:00
|
|
|
[sub_resource type="PlaneMesh" id=10]
|
2019-11-02 22:58:29 +01:00
|
|
|
size = Vector2( 3, 3 )
|
2019-09-29 10:07:32 +02:00
|
|
|
|
2019-10-01 23:15:36 +02:00
|
|
|
[sub_resource type="SpatialMaterial" id=11]
|
2019-09-29 10:07:32 +02:00
|
|
|
albedo_texture = ExtResource( 1 )
|
2019-11-02 22:58:29 +01:00
|
|
|
|
|
|
|
[sub_resource type="PlaneMesh" id=12]
|
|
|
|
size = Vector2( 12, 12 )
|
|
|
|
|
|
|
|
[sub_resource type="SpatialMaterial" id=13]
|
|
|
|
albedo_texture = ExtResource( 1 )
|
2019-09-29 10:07:32 +02:00
|
|
|
uv1_scale = Vector3( 4, 4, 4 )
|
|
|
|
|
2019-11-02 22:58:29 +01:00
|
|
|
[sub_resource type="Shader" id=14]
|
|
|
|
code = "shader_type spatial;
|
|
|
|
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx,skip_vertex_transform;
|
|
|
|
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 sampler2D texture_metallic : hint_white;
|
|
|
|
uniform vec4 metallic_texture_channel;
|
|
|
|
uniform sampler2D texture_roughness : hint_white;
|
|
|
|
uniform vec4 roughness_texture_channel;
|
|
|
|
uniform sampler2D texture_emission : hint_black_albedo;
|
|
|
|
uniform vec4 emission : hint_color;
|
|
|
|
uniform float emission_energy;
|
|
|
|
uniform sampler2D texture_normal : hint_normal;
|
|
|
|
uniform float normal_scale : hint_range(-16,16);
|
|
|
|
uniform sampler2D texture_depth : hint_white;
|
|
|
|
uniform float depth_scale : hint_range(0,1);
|
|
|
|
uniform vec3 uv1_scale;
|
|
|
|
uniform vec3 uv1_offset;
|
|
|
|
uniform vec3 uv2_scale;
|
|
|
|
uniform vec3 uv2_offset;
|
|
|
|
|
|
|
|
void vertex() {
|
|
|
|
VERTEX = (MODELVIEW_MATRIX * vec4(VERTEX+NORMAL*depth_scale*(1.0-texture(texture_depth, UV).r), 1.0)).xyz;
|
|
|
|
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;
|
|
|
|
float roughness_tex = dot(texture(texture_roughness,base_uv),roughness_texture_channel);
|
|
|
|
ROUGHNESS = roughness_tex * roughness;
|
|
|
|
SPECULAR = specular;
|
|
|
|
NORMALMAP = texture(texture_normal,base_uv).rgb;
|
|
|
|
NORMALMAP_DEPTH = normal_scale;
|
|
|
|
vec3 emission_tex = texture(texture_emission,base_uv).rgb;
|
|
|
|
EMISSION = (emission.rgb+emission_tex)*emission_energy;
|
|
|
|
}
|
|
|
|
"
|
|
|
|
|
|
|
|
[sub_resource type="ShaderMaterial" id=15]
|
|
|
|
shader = SubResource( 14 )
|
|
|
|
shader_param/albedo = Color( 1, 1, 1, 1 )
|
|
|
|
shader_param/specular = 0.5
|
|
|
|
shader_param/metallic = 0.0
|
|
|
|
shader_param/roughness = 1.0
|
|
|
|
shader_param/point_size = 1.0
|
|
|
|
shader_param/metallic_texture_channel = Plane( 1, 0, 0, 0 )
|
|
|
|
shader_param/roughness_texture_channel = Plane( 1, 0, 0, 0 )
|
|
|
|
shader_param/emission = Color( 0, 0, 0, 1 )
|
|
|
|
shader_param/emission_energy = 1.0
|
|
|
|
shader_param/normal_scale = 1.0
|
|
|
|
shader_param/depth_scale = null
|
|
|
|
shader_param/uv1_scale = Vector3( 1, 1, 1 )
|
|
|
|
shader_param/uv1_offset = Vector3( 0, 0, 0 )
|
|
|
|
shader_param/uv2_scale = Vector3( 1, 1, 1 )
|
|
|
|
shader_param/uv2_offset = Vector3( 0, 0, 0 )
|
|
|
|
shader_param/texture_albedo = ExtResource( 1 )
|
|
|
|
|
2019-09-29 10:07:32 +02:00
|
|
|
[node name="Objects" type="Spatial"]
|
|
|
|
transform = Transform( -0.685898, 0, 0.727691, 0, 1, 0, -0.727691, 0, -0.685898, 0, 0, 0 )
|
|
|
|
|
|
|
|
[node name="Cube" type="MeshInstance" parent="."]
|
2019-11-02 22:58:29 +01:00
|
|
|
visible = false
|
2019-09-29 10:07:32 +02:00
|
|
|
mesh = SubResource( 1 )
|
|
|
|
material/0 = SubResource( 2 )
|
|
|
|
|
|
|
|
[node name="Cylinder" type="MeshInstance" parent="."]
|
|
|
|
visible = false
|
|
|
|
mesh = SubResource( 3 )
|
|
|
|
material/0 = SubResource( 4 )
|
|
|
|
|
|
|
|
[node name="Sphere" type="MeshInstance" parent="."]
|
2019-10-02 23:06:20 +02:00
|
|
|
visible = false
|
2019-09-29 10:07:32 +02:00
|
|
|
mesh = SubResource( 5 )
|
|
|
|
material/0 = SubResource( 6 )
|
|
|
|
|
2019-10-01 23:15:36 +02:00
|
|
|
[node name="Sphere2" type="MeshInstance" parent="."]
|
|
|
|
visible = false
|
|
|
|
mesh = SubResource( 5 )
|
|
|
|
material/0 = SubResource( 7 )
|
|
|
|
|
2019-11-02 22:58:29 +01:00
|
|
|
[node name="Prism" type="MeshInstance" parent="."]
|
2019-09-29 10:07:32 +02:00
|
|
|
visible = false
|
2019-10-01 23:15:36 +02:00
|
|
|
mesh = SubResource( 8 )
|
|
|
|
material/0 = SubResource( 9 )
|
2019-09-29 10:07:32 +02:00
|
|
|
|
2019-11-02 22:58:29 +01:00
|
|
|
[node name="Quad" type="MeshInstance" parent="."]
|
2019-09-29 10:07:32 +02:00
|
|
|
visible = false
|
2019-10-01 23:15:36 +02:00
|
|
|
mesh = SubResource( 10 )
|
|
|
|
material/0 = SubResource( 11 )
|
2019-11-02 22:58:29 +01:00
|
|
|
|
|
|
|
[node name="Plane" type="MeshInstance" parent="."]
|
|
|
|
visible = false
|
|
|
|
mesh = SubResource( 12 )
|
|
|
|
material/0 = SubResource( 13 )
|
|
|
|
|
|
|
|
[node name="SphereTess" type="MeshInstance" parent="."]
|
|
|
|
visible = false
|
|
|
|
mesh = SubResource( 5 )
|
|
|
|
material/0 = SubResource( 15 )
|