mirror of
https://port.numenaute.org/aleajactaest/khanat-client.git
synced 2024-12-23 18:08:46 +00:00
78 lines
2.5 KiB
Text
78 lines
2.5 KiB
Text
|
[gd_scene load_steps=8 format=2]
|
||
|
|
||
|
[ext_resource path="res://assets/creatures/ra/basemesh_humanoid.glb" type="PackedScene" id=1]
|
||
|
[ext_resource path="res://assets/creatures/ra/textures/basemesh_humanoid.png" type="Texture" id=2]
|
||
|
[ext_resource path="res://assets/creatures/ra/textures/Wood035_2K_Roughness.jpg" type="Texture" id=3]
|
||
|
[ext_resource path="res://assets/creatures/ra/textures/Wood035_2K_Normal.jpg" type="Texture" id=4]
|
||
|
[ext_resource path="res://assets/creatures/ra/tatoos/tatoo_001.png" type="Texture" id=5]
|
||
|
|
||
|
[sub_resource type="Shader" id=1]
|
||
|
code = "shader_type spatial;
|
||
|
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx;
|
||
|
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_roughness : hint_white;
|
||
|
uniform vec4 roughness_texture_channel;
|
||
|
uniform sampler2D texture_normal : hint_normal;
|
||
|
uniform float normal_scale : hint_range(-16,16);
|
||
|
uniform vec3 uv1_scale;
|
||
|
uniform vec3 uv1_offset;
|
||
|
uniform vec3 uv2_scale;
|
||
|
uniform vec3 uv2_offset;
|
||
|
|
||
|
uniform sampler2D tatoo_albedo : hint_black;
|
||
|
|
||
|
|
||
|
void vertex() {
|
||
|
UV=UV*uv1_scale.xy+uv1_offset.xy;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
void fragment() {
|
||
|
vec2 base_uv = UV;
|
||
|
vec4 albedo_tex = texture(texture_albedo,base_uv);
|
||
|
vec4 tatoo_tex = texture(tatoo_albedo,base_uv);
|
||
|
ALBEDO = albedo.rgb * albedo_tex.rgb;
|
||
|
METALLIC = 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;
|
||
|
|
||
|
if ( tatoo_tex.a > 0.2 )
|
||
|
{
|
||
|
ALBEDO += tatoo_tex.rgb;
|
||
|
}
|
||
|
}
|
||
|
"
|
||
|
|
||
|
[sub_resource type="ShaderMaterial" id=2]
|
||
|
shader = SubResource( 1 )
|
||
|
shader_param/albedo = Color( 1, 1, 1, 1 )
|
||
|
shader_param/specular = 0.0
|
||
|
shader_param/metallic = 0.0
|
||
|
shader_param/roughness = 1.0
|
||
|
shader_param/point_size = 1.0
|
||
|
shader_param/roughness_texture_channel = Plane( 1, 0, 0, 0 )
|
||
|
shader_param/normal_scale = 1.0
|
||
|
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( 2 )
|
||
|
shader_param/texture_roughness = ExtResource( 3 )
|
||
|
shader_param/texture_normal = ExtResource( 4 )
|
||
|
shader_param/tatoo_albedo = ExtResource( 5 )
|
||
|
|
||
|
[node name="basemesh_humanoid" instance=ExtResource( 1 )]
|
||
|
|
||
|
[node name="body" parent="." index="0"]
|
||
|
material/0 = SubResource( 2 )
|