[gd_resource type="ShaderMaterial" load_steps=5 format=2] [ext_resource path="res://scenes/hair/F00_000_Hair_00_01.png" type="Texture" id=1] [ext_resource path="res://scenes/hair/F00_000_Hair_00_nml.png" type="Texture" id=2] [ext_resource path="res://scenes/hair/F00_000_Hair_00_spe.png" type="Texture" id=3] [sub_resource type="Shader" id=1] code = "shader_type spatial; render_mode blend_mix,depth_draw_opaque,cull_disabled,diffuse_burley,specular_schlick_ggx; uniform vec4 albedo : hint_color; uniform sampler2D texture_albedo : hint_albedo; uniform float specular; uniform float metallic; uniform float alpha_scissor_threshold; uniform float roughness : hint_range(0,1); uniform float point_size : hint_range(0,128); 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 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_tex *= COLOR; ALBEDO = albedo.rgb * albedo_tex.rgb; METALLIC = metallic; ROUGHNESS = 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; ALPHA = albedo.a * albedo_tex.a; ALPHA_SCISSOR=alpha_scissor_threshold; } " [resource] shader = SubResource( 1 ) shader_param/albedo = Color( 0.454902, 0.454902, 0.454902, 1 ) shader_param/specular = 0.5 shader_param/metallic = 0.0 shader_param/alpha_scissor_threshold = 0.5 shader_param/roughness = 0.5 shader_param/point_size = 1.0 shader_param/emission = Color( 0, 0, 0, 1 ) shader_param/emission_energy = 0.2 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( 1 ) shader_param/texture_emission = ExtResource( 3 ) shader_param/texture_normal = ExtResource( 2 )