2020-02-18 08:47:44 +01:00
|
|
|
[gd_resource type="SpatialMaterial" load_steps=5 format=2]
|
|
|
|
|
|
|
|
$if $(connected:albedo_tex)
|
|
|
|
[ext_resource path="$(file_prefix)_albedo.png" type="Texture" id=1]
|
|
|
|
$fi
|
|
|
|
$if $(connected:ao_tex) or $(connected:roughness_tex) or $(connected:metallic_tex)
|
|
|
|
[ext_resource path="$(file_prefix)_orm.png" type="Texture" id=2]
|
|
|
|
$fi
|
|
|
|
$if $(connected:normal_tex)
|
|
|
|
[ext_resource path="$(file_prefix)_normal.png" type="Texture" id=3]
|
|
|
|
$fi
|
|
|
|
$if $(connected:depth_tex)
|
|
|
|
[ext_resource path="$(file_prefix)_depth.png" type="Texture" id=4]
|
|
|
|
$fi
|
|
|
|
|
|
|
|
[resource]
|
2020-02-19 08:33:52 +01:00
|
|
|
albedo_color = Color($(param:albedo_color.r), $(param:albedo_color.g), $(param:albedo_color.b), $(param:albedo_color.a))
|
2020-02-18 08:47:44 +01:00
|
|
|
$if $(connected:albedo_tex)
|
|
|
|
albedo_texture = ExtResource( 1 )
|
|
|
|
$fi
|
2020-02-19 08:33:52 +01:00
|
|
|
metallic = $(param:metallic)
|
2020-02-18 08:47:44 +01:00
|
|
|
$if $(connected:metallic_tex)
|
|
|
|
metallic_texture = ExtResource( 2 )
|
|
|
|
metallic_texture_channel = 2
|
|
|
|
$fi
|
2020-02-19 08:33:52 +01:00
|
|
|
roughness = $(param:roughness)
|
2020-02-18 08:47:44 +01:00
|
|
|
$if $(connected:ao_tex) or $(connected:roughness_tex) or $(connected:metallic_tex)
|
|
|
|
roughness_texture = ExtResource( 2 )
|
|
|
|
roughness_texture_channel = 1
|
|
|
|
$fi
|
|
|
|
$if $(connected:normal_tex)
|
|
|
|
normal_enabled = true
|
2020-02-19 08:33:52 +01:00
|
|
|
normal_scale = $(param:normal)
|
2020-02-18 08:47:44 +01:00
|
|
|
normal_texture = ExtResource( 3 )
|
|
|
|
$fi
|
|
|
|
$if $(connected:ao_tex)
|
|
|
|
ao_enabled = true
|
2020-02-19 08:33:52 +01:00
|
|
|
ao_light_affect = $(param:ao)
|
2020-02-18 08:47:44 +01:00
|
|
|
ao_texture = ExtResource( 2 )
|
|
|
|
ao_on_uv2 = false
|
|
|
|
ao_texture_channel = 0
|
|
|
|
$fi
|
|
|
|
$if $(connected:depth_tex)
|
|
|
|
depth_enabled = true
|
2020-02-19 08:33:52 +01:00
|
|
|
depth_scale = $(expr:0.2*$(param:depth_scale))
|
|
|
|
depth_deep_parallax = true
|
|
|
|
depth_min_layers = 8
|
|
|
|
depth_max_layers = 32
|
2020-02-18 08:47:44 +01:00
|
|
|
depth_flip_tangent = false
|
|
|
|
depth_flip_binormal = false
|
|
|
|
depth_texture = ExtResource( 4 )
|
|
|
|
$fi
|