generated from krampus/template-godot4
Put a little fresnel on that bad boy!
This commit is contained in:
parent
d5bbc66242
commit
9905e957e5
Binary file not shown.
Binary file not shown.
@ -5,6 +5,7 @@ group_uniforms gunk_material;
|
||||
uniform vec3 color_1: source_color = vec3(0.0, 0.03, 0.1);
|
||||
uniform vec3 color_2: source_color = vec3(0.0, 0.1, 0.3);
|
||||
uniform vec3 emission_color: source_color = vec3(0.25, 0.88, 1.0);
|
||||
uniform vec3 fresnel_color: source_color = vec3(0.25, 0.88, 1.0);
|
||||
|
||||
uniform float pixellation = 128.0;
|
||||
uniform float time_pixellation = 30.0;
|
||||
@ -13,6 +14,8 @@ uniform float roughness: hint_range(0.0, 1.0) = 0.15;
|
||||
uniform float specular_contribution = 0.8;
|
||||
uniform float emission_strength = 0.05;
|
||||
uniform float normal_scale = 1.0;
|
||||
uniform float fresnel_amount = 4.0;
|
||||
uniform float fresnel_intensity = 0.0;
|
||||
|
||||
// Used ONLY by the gunk, does not affect the gunk mask.
|
||||
uniform vec2 uv_scale = vec2(1.0);
|
||||
@ -48,6 +51,10 @@ void vertex() {
|
||||
VERTEX *= 1.0 + jitter;
|
||||
}
|
||||
|
||||
vec3 fresnel_glow(vec3 normal, vec3 view) {
|
||||
return pow((1.0 - dot(normalize(normal), normalize(view))), fresnel_amount) * fresnel_color * fresnel_intensity;
|
||||
}
|
||||
|
||||
float hardstep(float value) {
|
||||
float x = clamp(value, 0.0, 1.0);
|
||||
return 0.5 * tanh( (20.0 * x - 10.0) * inversesqrt(x - x * x) ) + 0.5;
|
||||
@ -73,7 +80,7 @@ void fragment() {
|
||||
vec4 overlay_em = texture(overlay_emission, UV);
|
||||
emission = mix(emission, overlay_em.rgb * overlay_emission_scale, overlay_em.a);
|
||||
|
||||
ALBEDO = color.rgb;
|
||||
ALBEDO = color.rgb + fresnel_glow(NORMAL, VIEW);
|
||||
ROUGHNESS = value * roughness;
|
||||
EMISSION = emission;
|
||||
SPECULAR = 0.5 * inversesqrt(specular_contribution);
|
||||
|
@ -55,13 +55,13 @@ script = ExtResource("2_qqnhb")
|
||||
|
||||
[node name="FrameSkipper" type="Node3D" parent="."]
|
||||
script = ExtResource("2_lak6w")
|
||||
frame_skip = 3
|
||||
frame_skip = 2
|
||||
|
||||
[node name="Shambler" parent="FrameSkipper" instance=ExtResource("2_csisu")]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
|
||||
visible = false
|
||||
time_scale_factor = 3.0
|
||||
time_scale_factor = 2.0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("CapsuleShape3D_faau1")
|
||||
@ -220,7 +220,7 @@ metadata/_custom_type_script = "uid://om57w2acvgb7"
|
||||
script = ExtResource("11_mbqcc")
|
||||
mean_time = 4.0
|
||||
st_dev_time = 0.6
|
||||
wait_time = 3.05189
|
||||
wait_time = 4.06128
|
||||
metadata/_custom_type_script = "uid://beyk2xtbjrsg4"
|
||||
|
||||
[node name="RandomStalkingBehavior" type="Node" parent="GrunkBeastBehavior/StateSelector/StalkingSequence/RandomDelay"]
|
||||
@ -266,7 +266,7 @@ metadata/_custom_type_script = "uid://cg016dbe7gs1x"
|
||||
script = ExtResource("11_mbqcc")
|
||||
mean_time = 5.0
|
||||
st_dev_time = 1.0
|
||||
wait_time = 4.86324
|
||||
wait_time = 4.52556
|
||||
metadata/_custom_type_script = "uid://beyk2xtbjrsg4"
|
||||
|
||||
[node name="PickRandomLurkTarget" type="Node" parent="GrunkBeastBehavior/StateSelector/LurkSequence/RandomDelay"]
|
||||
|
@ -129,7 +129,7 @@ primary_limit_angle = 1.5708
|
||||
primary_damp_threshold = 0.7
|
||||
|
||||
[node name="SleeveL" type="BoneAttachment3D" parent="Armature/Skeleton3D" index="2"]
|
||||
transform = Transform3D(0.0438309, -2.98023e-08, -0.999039, -0.998162, -0.0418897, -0.0437925, -0.0418495, 0.999122, -0.00183608, 0.214327, -0.0756478, -0.79725)
|
||||
transform = Transform3D(0.043831, 1.41561e-07, -0.999039, 0.999039, 9.59262e-08, 0.0438309, 3.1665e-08, -1, -1.11759e-07, 1.63061, 0.0124229, 0.803843)
|
||||
bone_name = "Sleeve.L"
|
||||
bone_idx = 27
|
||||
|
||||
@ -140,7 +140,7 @@ particle_scene = ExtResource("5_lqi3b")
|
||||
metadata/_custom_type_script = "uid://cuqr167olan8n"
|
||||
|
||||
[node name="SleeveR" type="BoneAttachment3D" parent="Armature/Skeleton3D" index="3"]
|
||||
transform = Transform3D(0.0438309, 2.98023e-08, 0.999039, 0.998162, -0.0418897, -0.0437925, 0.0418495, 0.999122, -0.00183608, -0.214327, -0.0756484, -0.79725)
|
||||
transform = Transform3D(0.043831, -1.41561e-07, 0.999039, -0.999039, 9.59262e-08, 0.0438309, -3.1665e-08, -1, -1.11759e-07, -1.63061, 0.0124235, 0.803843)
|
||||
bone_name = "Sleeve.R"
|
||||
bone_idx = 31
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user