generated from krampus/template-godot4
Refactored common gunk shader logic into common.gdshaderinc
This commit is contained in:
parent
0420a7a465
commit
628a150757
Binary file not shown.
BIN
assets/materials/grunk_jittery.material.depren
Normal file
BIN
assets/materials/grunk_jittery.material.depren
Normal file
Binary file not shown.
BIN
assets/materials/grunk_overlay_debug.material
Normal file
BIN
assets/materials/grunk_overlay_debug.material
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/materials/gunk_overlay.material.depren
Normal file
BIN
assets/materials/gunk_overlay.material.depren
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/materials/gunk_overlay_bright.material.depren
Normal file
BIN
assets/materials/gunk_overlay_bright.material.depren
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/materials/gunk_overlay_danger.material.depren
Normal file
BIN
assets/materials/gunk_overlay_danger.material.depren
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/materials/gunk_overlay_lowrez.material.depren
Normal file
BIN
assets/materials/gunk_overlay_lowrez.material.depren
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/materials/gunk_overlay_oily.material.depren
Normal file
BIN
assets/materials/gunk_overlay_oily.material.depren
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/npc/shambler/shambler.material.depren
Normal file
BIN
assets/npc/shambler/shambler.material.depren
Normal file
Binary file not shown.
@ -8,7 +8,7 @@
|
||||
[ext_resource type="Texture2D" uid="uid://dv2876ywyq6rf" path="res://assets/level/player_ship/tank_facade_R.png" id="5_22nd2"]
|
||||
[ext_resource type="Script" uid="uid://deg5xd87cy8rg" path="res://src/props/interactive.gd" id="6_e4hmc"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://djgqnuxrja1mo" path="res://assets/level/player_ship/player_ship_tank_facade.obj" id="8_2mvif"]
|
||||
[ext_resource type="Shader" uid="uid://ckxc0ngd37rtk" path="res://src/shaders/gunk.gdshader" id="8_al8ma"]
|
||||
[ext_resource type="Shader" uid="uid://ckxc0ngd37rtk" path="res://src/shaders/gunk/gunk.gdshader" id="8_al8ma"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://bc8457r4rxpey" path="res://assets/level/player_ship/grunk_liquid.obj" id="8_xuj2g"]
|
||||
[ext_resource type="AudioStream" uid="uid://cimw72d2lexvt" path="res://assets/sfx/grunk/pump.wav" id="9_0e0pl"]
|
||||
[ext_resource type="FastNoiseLite" uid="uid://cnlvdtx68giv6" path="res://assets/materials/gunk_noise.tres" id="10_2mvif"]
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,28 +1,14 @@
|
||||
[gd_scene load_steps=21 format=3 uid="uid://b5jubpjj3d277"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://b5jubpjj3d277"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://m2qxenym1otw" path="res://assets/level/wall/wall_2_C.png" id="4_r07l4"]
|
||||
[ext_resource type="Texture2D" uid="uid://begn6qloo0m1q" path="res://assets/level/wall/wall_2_M.png" id="5_67o2j"]
|
||||
[ext_resource type="Material" uid="uid://bgafiida0ob2j" path="res://assets/materials/level/wall_2.material" id="1_e8utx"]
|
||||
[ext_resource type="PackedScene" uid="uid://cdi5sl60mw1po" path="res://src/world/gunkable/gunkable.tscn" id="5_r07l4"]
|
||||
[ext_resource type="Texture2D" uid="uid://cpdrvdu3qt62t" path="res://assets/level/wall/wall_2_N.png" id="6_4yjoq"]
|
||||
[ext_resource type="Material" uid="uid://cqjr3cbxtfg2j" path="res://assets/materials/gunk_overlay.material" id="6_r07l4"]
|
||||
[ext_resource type="Texture2D" uid="uid://ba5vvrx730go8" path="res://assets/level/wall/wall_2_R.png" id="7_c27im"]
|
||||
[ext_resource type="PackedScene" uid="uid://dgqx1h4dtkwma" path="res://src/world/mechanics/trigger/gunk_trigger.tscn" id="8_gx82l"]
|
||||
[ext_resource type="PackedScene" uid="uid://bttust5ohud8e" path="res://src/world/mechanics/relay/gunk_relay.tscn" id="9_d4a3d"]
|
||||
[ext_resource type="PackedScene" uid="uid://dgeg3kkogm71m" path="res://src/world/mechanics/alarm/gunk_alarm.tscn" id="10_l8xa5"]
|
||||
[ext_resource type="PackedScene" uid="uid://d0j20q65wnqsr" path="res://src/world/mechanics/heart/gunk_heart.tscn" id="11_tfbib"]
|
||||
[ext_resource type="PackedScene" uid="uid://kctp5erogwcb" path="res://src/world/mechanics/listener/listener.tscn" id="12_e8utx"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cgmn0"]
|
||||
resource_local_to_scene = true
|
||||
cull_mode = 2
|
||||
albedo_texture = ExtResource("4_r07l4")
|
||||
metallic = 1.0
|
||||
metallic_texture = ExtResource("5_67o2j")
|
||||
roughness_texture = ExtResource("7_c27im")
|
||||
normal_enabled = true
|
||||
normal_texture = ExtResource("6_4yjoq")
|
||||
texture_filter = 4
|
||||
|
||||
[sub_resource type="ArrayMesh" id="ArrayMesh_ix0jw"]
|
||||
_surfaces = [{
|
||||
"aabb": AABB(-1.5, 0, -1.5, 3, 1e-05, 3),
|
||||
@ -44,7 +30,7 @@ _surfaces = [{
|
||||
"format": 34896613399,
|
||||
"index_count": 6,
|
||||
"index_data": PackedByteArray(0, 0, 1, 0, 2, 0, 2, 0, 1, 0, 3, 0),
|
||||
"material": SubResource("StandardMaterial3D_cgmn0"),
|
||||
"material": ExtResource("1_e8utx"),
|
||||
"name": "Plane",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
@ -57,17 +43,6 @@ shadow_mesh = SubResource("ArrayMesh_ix0jw")
|
||||
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_x2vho"]
|
||||
data = PackedVector3Array(1.5, 0, 1.5, -1.5, 0, 1.5, 1.5, 0, -1.5, 1.5, 0, -1.5, -1.5, 0, 1.5, -1.5, 0, -1.5)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3u410"]
|
||||
resource_local_to_scene = true
|
||||
cull_mode = 2
|
||||
albedo_texture = ExtResource("4_r07l4")
|
||||
metallic = 1.0
|
||||
metallic_texture = ExtResource("5_67o2j")
|
||||
roughness_texture = ExtResource("7_c27im")
|
||||
normal_enabled = true
|
||||
normal_texture = ExtResource("6_4yjoq")
|
||||
texture_filter = 4
|
||||
|
||||
[sub_resource type="ArrayMesh" id="ArrayMesh_tfbib"]
|
||||
_surfaces = [{
|
||||
"aabb": AABB(-1.5, 0, -1.5, 3, 1e-05, 3),
|
||||
@ -89,7 +64,7 @@ _surfaces = [{
|
||||
"format": 34896613399,
|
||||
"index_count": 6,
|
||||
"index_data": PackedByteArray(0, 0, 1, 0, 2, 0, 2, 0, 1, 0, 3, 0),
|
||||
"material": SubResource("StandardMaterial3D_3u410"),
|
||||
"material": ExtResource("1_e8utx"),
|
||||
"name": "Plane",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
@ -120,7 +95,7 @@ _surfaces = [{
|
||||
"format": 34896613399,
|
||||
"index_count": 6,
|
||||
"index_data": PackedByteArray(0, 0, 1, 0, 2, 0, 2, 0, 1, 0, 3, 0),
|
||||
"material": SubResource("StandardMaterial3D_3u410"),
|
||||
"material": ExtResource("1_e8utx"),
|
||||
"name": "Plane",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://b6dx0ovy15g5o"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://dnytoirugot2e" path="res://src/shaders/canvas_grunk.gdshader" id="1_pgbvb"]
|
||||
[ext_resource type="Shader" uid="uid://dnytoirugot2e" path="res://src/shaders/gunk/canvas_grunk.gdshader" id="1_pgbvb"]
|
||||
[ext_resource type="FastNoiseLite" uid="uid://cnlvdtx68giv6" path="res://assets/materials/gunk_noise.tres" id="2_g1nf5"]
|
||||
[ext_resource type="Script" uid="uid://06n7qs3l4tf6" path="res://src/effects/grunk_2d/grunk_2d.gd" id="3_g1nf5"]
|
||||
|
||||
|
@ -1,64 +0,0 @@
|
||||
/* Gunk shader adapted to a canvas item */
|
||||
shader_type canvas_item;
|
||||
|
||||
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 float pixellation = 128.0;
|
||||
uniform float time_pixellation = 30.0;
|
||||
|
||||
uniform float emission_strength = 0.05;
|
||||
|
||||
uniform float aspect_ratio = 1.0;
|
||||
|
||||
uniform float time_scale = 1.0;
|
||||
|
||||
uniform sampler3D gunk_noise;
|
||||
uniform sampler3D gunk_normal_map;
|
||||
|
||||
group_uniforms mask;
|
||||
uniform float mask_progress : hint_range(0.0, 1.0, 0.01) = 0.0;
|
||||
uniform sampler2D mask_noise : hint_default_white;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 scaled_pixellation = pixellation * vec2(1.0, aspect_ratio);
|
||||
vec2 local_uv = floor(UV * scaled_pixellation) / scaled_pixellation;
|
||||
float local_time = floor(TIME * time_scale * time_pixellation) / time_pixellation;
|
||||
|
||||
// swirl
|
||||
vec3 uvt = vec3(local_uv.x, local_uv.y, local_time);
|
||||
uvt.x += sin(uvt.y * 1.54 * PI + uvt.z) * cos(uvt.y * 1.31 * PI + uvt.z) * 0.2;
|
||||
uvt.y += cos(uvt.x * 1.74 * PI + uvt.z) * -sin(uvt.y * 1.64 * PI + uvt.z) * 0.2;
|
||||
|
||||
|
||||
float value = texture(gunk_noise, uvt).r;
|
||||
vec3 color = mix(color_1, color_2, value);
|
||||
vec3 emission = (1.0 - value) * emission_color * emission_strength;
|
||||
color += emission;
|
||||
|
||||
NORMAL_MAP = texture(gunk_normal_map, uvt).xyz;
|
||||
|
||||
// Radial mask effect
|
||||
float radius = 1.3 * length(local_uv - 0.5);
|
||||
float offset = radius + texture(mask_noise, local_uv).r - 0.5;
|
||||
float mask = 1.0 - clamp(offset - 1.0 + 2.0 * mask_progress, 0.0, 1.0);
|
||||
|
||||
//COLOR = vec4(mask, mask, mask, 1.0);
|
||||
|
||||
// soften edges
|
||||
NORMAL_MAP *= smoothstep(1.0, 0.0, mask);
|
||||
|
||||
// Harderish edge
|
||||
float alpha = hardstep(1.0 - mask);
|
||||
|
||||
COLOR = vec4(color, alpha);
|
||||
|
||||
// COLOR = vec4(mask, mask, mask, 1.0);
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
shader_type spatial;
|
||||
render_mode depth_prepass_alpha;
|
||||
|
||||
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;
|
||||
|
||||
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_power = 4.0;
|
||||
uniform float fresnel_intensity = 0.0;
|
||||
uniform float bump_strength = 1.0;
|
||||
|
||||
// Used ONLY by the gunk, does not affect the gunk mask.
|
||||
uniform vec2 uv_scale = vec2(1.0);
|
||||
|
||||
uniform float time_scale = 1.0;
|
||||
|
||||
uniform float edge_bleed = 0.25;
|
||||
|
||||
uniform sampler2D gunk_mask;
|
||||
|
||||
uniform highp sampler3D gunk_noise;
|
||||
uniform highp sampler3D gunk_normal_map;
|
||||
|
||||
group_uniforms overlay;
|
||||
uniform sampler2D overlay_albedo: hint_default_transparent, filter_nearest;
|
||||
uniform sampler2D overlay_emission: hint_default_transparent, filter_nearest;
|
||||
uniform float overlay_emission_scale = 1.0;
|
||||
|
||||
|
||||
vec3 fresnel_glow(vec3 normal, vec3 view) {
|
||||
float normal_angle = dot(normalize(normal), normalize(view));
|
||||
return pow((1.0 - clamp(normal_angle, 0.0, 1.0)), fresnel_power) * 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;
|
||||
}
|
||||
|
||||
float bump_sample(vec2 uv, vec3 uvt, float dx, float dy) {
|
||||
vec2 offset = vec2(dx / pixellation, dy / pixellation);
|
||||
float height = texture(gunk_normal_map, uvt + vec3(offset, 0.0)).r;
|
||||
float mask = texture(gunk_mask, uv + offset / uv_scale).r;
|
||||
return height * smoothstep(1.0, 0.0, mask);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 local_uv = floor(UV * uv_scale * pixellation) / pixellation;
|
||||
float local_time = floor(TIME * time_scale * time_pixellation) / time_pixellation;
|
||||
|
||||
// swirl
|
||||
vec3 uvt = vec3(local_uv.x, local_uv.y, local_time);
|
||||
uvt.x += sin(uvt.y * 1.54 * PI + uvt.z) * cos(uvt.y * 1.31 * PI + uvt.z) * 0.2;
|
||||
uvt.y += cos(uvt.x * 1.74 * PI + uvt.z) * -sin(uvt.y * 1.64 * PI + uvt.z) * 0.2;
|
||||
|
||||
|
||||
float value = texture(gunk_noise, uvt).r;
|
||||
vec3 color = mix(color_1, color_2, value);
|
||||
vec3 emission = (1.0 - value) * emission_color * emission_strength;
|
||||
|
||||
// overlay texture
|
||||
vec4 overlay_color = texture(overlay_albedo, UV);
|
||||
color = mix(color, overlay_color.rgb, overlay_color.a);
|
||||
vec4 overlay_em = texture(overlay_emission, UV);
|
||||
emission = mix(emission, overlay_em.rgb * overlay_emission_scale, overlay_em.a);
|
||||
|
||||
//ALBEDO = color.rgb;
|
||||
//ROUGHNESS = value * roughness;
|
||||
//EMISSION = emission;
|
||||
//SPECULAR = 0.5 * inversesqrt(specular_contribution);
|
||||
|
||||
// Build normal map from bump map
|
||||
float h_center = bump_sample(UV, uvt, 0.0, 0.0);
|
||||
float h_right = bump_sample(UV, uvt, 1.0, 0.0);
|
||||
float h_down = bump_sample(UV, uvt, 0.0, 1.0);
|
||||
float dx = (h_center - h_right) * bump_strength;
|
||||
float dy = (h_center - h_down) * bump_strength;
|
||||
vec3 normal_diff_map = normalize(vec3(dx, dy, 1.0));
|
||||
//NORMAL_MAP = normal_diff_map / 2.0 + 0.5;
|
||||
ALBEDO = normal_diff_map / 2.0 + 0.5;
|
||||
|
||||
// add fresnel
|
||||
//vec3 world_normal = mat3(TANGENT, BINORMAL, NORMAL) * (NORMAL_MAP * 2.0 - 1.0);
|
||||
//ALBEDO += fresnel_glow(world_normal, VIEW);
|
||||
|
||||
// Hardish edge
|
||||
//float mask = texture(gunk_mask, UV).r;
|
||||
//ALPHA = hardstep(1.0 - mask + edge_bleed);
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
shader_type spatial;
|
||||
render_mode depth_prepass_alpha;
|
||||
|
||||
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(1.0);
|
||||
uniform sampler2D fresnel_gradient;
|
||||
|
||||
uniform float pixellation = 128.0;
|
||||
uniform float time_pixellation = 30.0;
|
||||
|
||||
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_power = 4.0;
|
||||
uniform float fresnel_intensity = 0.0;
|
||||
uniform float bump_strength = 1.0;
|
||||
|
||||
// Used ONLY by the gunk, does not affect the gunk mask.
|
||||
uniform vec2 uv_scale = vec2(1.0);
|
||||
|
||||
uniform vec2 pan_speed = vec2(0.0);
|
||||
|
||||
uniform float time_scale = 1.0;
|
||||
|
||||
uniform highp sampler3D gunk_noise;
|
||||
uniform highp sampler3D gunk_normal_map;
|
||||
|
||||
group_uniforms jitter;
|
||||
uniform mediump float jitter_magnitude = 0.0;
|
||||
uniform lowp float jitter_time_scale = 0.1;
|
||||
|
||||
uniform highp sampler3D jitter_noise;
|
||||
|
||||
group_uniforms inflation;
|
||||
uniform highp float vertex_inflation = 0.0;
|
||||
uniform highp float inflation_pixellation = 10.0;
|
||||
|
||||
group_uniforms overlay;
|
||||
uniform sampler2D overlay_albedo: hint_default_transparent, filter_nearest;
|
||||
uniform sampler2D overlay_emission: hint_default_transparent, filter_nearest;
|
||||
uniform float overlay_emission_scale = 1.0;
|
||||
|
||||
void vertex() {
|
||||
float mixer = VERTEX.x + 0.553 * VERTEX.z + 1.618 * VERTEX.y;
|
||||
float local_time = floor(TIME * jitter_time_scale * time_pixellation) / time_pixellation;
|
||||
float sample = texture(jitter_noise, vec3(cos(mixer), sin(mixer), local_time)).r;
|
||||
float inflation = floor(vertex_inflation * inflation_pixellation) / inflation_pixellation;
|
||||
float jitter = jitter_magnitude * (sample - 0.5 + inflation);
|
||||
VERTEX *= 1.0 + jitter;
|
||||
}
|
||||
|
||||
vec3 fresnel_glow(vec3 normal, vec3 view) {
|
||||
float normal_angle = clamp(dot(normalize(normal), normalize(view)), 0.0, 1.0);
|
||||
vec3 color = texture(fresnel_gradient, vec2(normal_angle, 0.0)).rgb * fresnel_color;
|
||||
return pow((1.0 - normal_angle), fresnel_power) * color * fresnel_intensity;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
float local_time = floor(TIME * time_scale * time_pixellation) / time_pixellation;
|
||||
vec2 local_uv = floor(UV * uv_scale * pixellation) / pixellation + local_time * pan_speed;
|
||||
|
||||
// swirl
|
||||
vec3 uvt = vec3(local_uv.x, local_uv.y, local_time);
|
||||
uvt.x += sin(uvt.y * 1.54 * PI + uvt.z) * cos(uvt.y * 1.31 * PI + uvt.z) * 0.2;
|
||||
uvt.y += cos(uvt.x * 1.74 * PI + uvt.z) * -sin(uvt.y * 1.64 * PI + uvt.z) * 0.2;
|
||||
|
||||
|
||||
float value = texture(gunk_noise, uvt).r;
|
||||
vec3 color = mix(color_1, color_2, value);
|
||||
vec3 emission = (1.0 - value) * emission_color * emission_strength;
|
||||
|
||||
// overlay texture
|
||||
vec4 overlay_color = texture(overlay_albedo, UV);
|
||||
color = mix(color, overlay_color.rgb, overlay_color.a);
|
||||
vec4 overlay_em = texture(overlay_emission, UV);
|
||||
emission = mix(emission, overlay_em.rgb * overlay_emission_scale, overlay_em.a);
|
||||
|
||||
ALBEDO = color.rgb;
|
||||
ROUGHNESS = value * roughness;
|
||||
EMISSION = emission;
|
||||
SPECULAR = 0.5 * inversesqrt(specular_contribution);
|
||||
|
||||
// Build normal map from bump map
|
||||
float h_center = texture(gunk_normal_map, uvt).r;
|
||||
float h_right = texture(gunk_normal_map, uvt + vec3(1.0 / pixellation, 0.0, 0.0)).r;
|
||||
float h_down = texture(gunk_normal_map, uvt + vec3(0.0, 1.0 / pixellation, 0.0)).r;
|
||||
float dx = (h_right - h_center) * bump_strength;
|
||||
float dy = (h_down - h_center) * bump_strength;
|
||||
vec3 normal_diff_map = normalize(vec3(-dx, -dy, 1.0));
|
||||
NORMAL_MAP = normal_diff_map / 2.0 + 0.5;
|
||||
|
||||
// add fresnel
|
||||
vec3 world_normal = mat3(TANGENT, BINORMAL, NORMAL) * (NORMAL_MAP * 2.0 - 1.0);
|
||||
ALBEDO += fresnel_glow(world_normal, VIEW);
|
||||
}
|
37
src/shaders/gunk/canvas_grunk.gdshader
Normal file
37
src/shaders/gunk/canvas_grunk.gdshader
Normal file
@ -0,0 +1,37 @@
|
||||
/* Gunk shader adapted to a canvas item */
|
||||
shader_type canvas_item;
|
||||
|
||||
#include "common.gdshaderinc"
|
||||
|
||||
uniform float aspect_ratio = 1.0;
|
||||
|
||||
group_uniforms mask;
|
||||
uniform float mask_progress : hint_range(0.0, 1.0, 0.01) = 0.0;
|
||||
uniform sampler2D mask_noise : hint_default_white;
|
||||
|
||||
|
||||
void fragment() {
|
||||
vec2 scaled_pixellation = pixellation * vec2(1.0, aspect_ratio);
|
||||
float local_time = floor(TIME * time_scale * time_pixellation) / time_pixellation;
|
||||
vec2 local_uv = floor(UV * scaled_pixellation) / scaled_pixellation + local_time * pan_speed;
|
||||
|
||||
// swirl
|
||||
vec3 uvt = vec3(local_uv.x, local_uv.y, local_time);
|
||||
uvt = swirl_uvt(uvt);
|
||||
|
||||
float value = sample_noise(uvt);
|
||||
|
||||
NORMAL_MAP = texture(gunk_noise, uvt).xyz;
|
||||
|
||||
// Radial mask effect
|
||||
float radius = 1.3 * length(local_uv - 0.5);
|
||||
float offset = radius + texture(mask_noise, local_uv).r - 0.5;
|
||||
float mask = 1.0 - clamp(offset - 1.0 + 2.0 * mask_progress, 0.0, 1.0);
|
||||
|
||||
// soften edges
|
||||
NORMAL_MAP *= smoothstep(1.0, 0.0, mask);
|
||||
|
||||
vec3 color = base_albedo(UV, value) + base_emission(UV, value);
|
||||
float alpha = hardstep(1.0 - mask);
|
||||
COLOR = vec4(color, alpha);
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
shader_type spatial;
|
||||
render_mode depth_prepass_alpha;
|
||||
// Common logic for gunk shaders
|
||||
|
||||
group_uniforms gunk_material;
|
||||
uniform highp sampler3D gunk_noise;
|
||||
@ -7,10 +6,9 @@ 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);
|
||||
|
||||
|
||||
|
||||
// Used ONLY by the gunk, does not affect the gunk mask.
|
||||
uniform vec2 uv_scale = vec2(1.0);
|
||||
uniform vec2 pan_speed = vec2(0.0);
|
||||
|
||||
uniform float time_scale = 1.0;
|
||||
uniform float pixellation = 128.0;
|
||||
@ -21,10 +19,6 @@ uniform float specular_contribution = 0.8;
|
||||
uniform float emission_strength = 0.05;
|
||||
uniform float bump_strength = 1.0;
|
||||
|
||||
group_uniforms gunk_mask;
|
||||
uniform float edge_bleed = 0.25;
|
||||
uniform sampler2D gunk_mask;
|
||||
|
||||
group_uniforms fresnel;
|
||||
uniform vec3 fresnel_color: source_color = vec3(1.0);
|
||||
uniform sampler2D fresnel_gradient;
|
||||
@ -37,13 +31,11 @@ uniform sampler2D iridescence_gradient;
|
||||
uniform float iridescence_power = 4.0;
|
||||
uniform float iridescence_intensity = 0.0;
|
||||
|
||||
|
||||
group_uniforms overlay;
|
||||
uniform sampler2D overlay_albedo: hint_default_transparent, filter_nearest;
|
||||
uniform sampler2D overlay_emission: hint_default_transparent, filter_nearest;
|
||||
uniform float overlay_emission_scale = 1.0;
|
||||
|
||||
|
||||
vec3 rim_glow(
|
||||
vec3 normal,
|
||||
vec3 view,
|
||||
@ -62,69 +54,38 @@ float hardstep(float value) {
|
||||
return 0.5 * tanh( (20.0 * x - 10.0) * inversesqrt(x - x * x) ) + 0.5;
|
||||
}
|
||||
|
||||
float bump_sample(vec2 uv, vec3 uvt, float dx, float dy) {
|
||||
vec2 offset = vec2(dx / pixellation, dy / pixellation);
|
||||
float height = texture(gunk_noise, uvt + vec3(offset, 0.0)).r;
|
||||
float mask = texture(gunk_mask, uv + offset / uv_scale).r;
|
||||
return height * smoothstep(1.0, 0.0, mask);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 local_uv = floor(UV * uv_scale * pixellation) / pixellation;
|
||||
float local_time = floor(TIME * time_scale * time_pixellation) / time_pixellation;
|
||||
|
||||
// swirl
|
||||
vec3 uvt = vec3(local_uv.x, local_uv.y, local_time);
|
||||
vec3 swirl_uvt(vec3 uvt) {
|
||||
uvt.x += sin(uvt.y * 1.54 * PI + uvt.z) * cos(uvt.y * 1.31 * PI + uvt.z) * 0.2;
|
||||
uvt.y += cos(uvt.x * 1.74 * PI + uvt.z) * -sin(uvt.y * 1.64 * PI + uvt.z) * 0.2;
|
||||
|
||||
|
||||
float value = texture(gunk_noise, uvt).r;
|
||||
vec3 color = mix(color_1, color_2, value);
|
||||
vec3 emission = (1.0 - value) * emission_color * emission_strength;
|
||||
|
||||
// overlay texture
|
||||
vec4 overlay_color = texture(overlay_albedo, UV);
|
||||
color = mix(color, overlay_color.rgb, overlay_color.a);
|
||||
vec4 overlay_em = texture(overlay_emission, UV);
|
||||
emission = mix(emission, overlay_em.rgb * overlay_emission_scale, overlay_em.a);
|
||||
|
||||
ALBEDO = color.rgb;
|
||||
ROUGHNESS = value * roughness;
|
||||
EMISSION = emission;
|
||||
SPECULAR = 0.5 * inversesqrt(specular_contribution);
|
||||
|
||||
// Build normal map from bump map
|
||||
float h_center = bump_sample(UV, uvt, 0.0, 0.0);
|
||||
float h_right = bump_sample(UV, uvt, 1.0, 0.0);
|
||||
float h_down = bump_sample(UV, uvt, 0.0, 1.0);
|
||||
float dx = (h_center - h_right) * bump_strength;
|
||||
float dy = (h_center - h_down) * bump_strength;
|
||||
vec3 normal_diff_map = normalize(vec3(dx, dy, 1.0));
|
||||
NORMAL_MAP = normal_diff_map / 2.0 + 0.5;
|
||||
|
||||
// add fresnel
|
||||
vec3 world_normal = mat3(TANGENT, BINORMAL, NORMAL) * (NORMAL_MAP * 2.0 - 1.0);
|
||||
EMISSION += rim_glow(
|
||||
world_normal,
|
||||
VIEW,
|
||||
fresnel_gradient,
|
||||
fresnel_color,
|
||||
fresnel_power,
|
||||
fresnel_intensity
|
||||
);
|
||||
|
||||
// add iridescence
|
||||
ALBEDO += rim_glow(
|
||||
world_normal,
|
||||
VIEW,
|
||||
iridescence_gradient,
|
||||
iridescence_color,
|
||||
iridescence_power,
|
||||
iridescence_intensity
|
||||
);
|
||||
|
||||
// Hardish edge
|
||||
float mask = texture(gunk_mask, UV).r;
|
||||
ALPHA = hardstep(1.0 - mask + edge_bleed);
|
||||
return uvt;
|
||||
}
|
||||
|
||||
vec3 scale_uvt(vec2 uv, float time) {
|
||||
float local_time = floor(time * time_scale * time_pixellation) / time_pixellation;
|
||||
vec2 local_uv = floor(uv * uv_scale * pixellation) / pixellation + local_time * pan_speed;
|
||||
return swirl_uvt(vec3(local_uv.x, local_uv.y, local_time));
|
||||
}
|
||||
|
||||
float sample_noise(vec3 uvt) {
|
||||
return texture(gunk_noise, uvt).r;
|
||||
}
|
||||
|
||||
vec3 base_albedo(vec2 uv, float value) {
|
||||
vec3 color = mix(color_1, color_2, value);
|
||||
vec4 overlay = texture(overlay_albedo, uv);
|
||||
return mix(color.rgb, overlay.rgb, overlay.a);
|
||||
}
|
||||
|
||||
float base_roughness(float value) {
|
||||
return value * roughness;
|
||||
}
|
||||
|
||||
vec3 base_emission(vec2 uv, float value) {
|
||||
vec3 emission = (1.0 - value) * emission_color * emission_strength;
|
||||
vec4 overlay = texture(overlay_emission, uv);
|
||||
return mix(emission, overlay.rgb * overlay_emission_scale, overlay.a);
|
||||
}
|
||||
|
||||
float base_specular() {
|
||||
return 0.5 * inversesqrt(specular_contribution);
|
||||
}
|
1
src/shaders/gunk/common.gdshaderinc.uid
Normal file
1
src/shaders/gunk/common.gdshaderinc.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://biqqcriqs6gh0
|
31
src/shaders/gunk/debug_overlay.gdshader
Normal file
31
src/shaders/gunk/debug_overlay.gdshader
Normal file
@ -0,0 +1,31 @@
|
||||
shader_type spatial;
|
||||
render_mode depth_prepass_alpha, unshaded;
|
||||
|
||||
#include "common.gdshaderinc"
|
||||
|
||||
group_uniforms gunk_mask;
|
||||
uniform float edge_bleed = 0.25;
|
||||
uniform sampler2D gunk_mask;
|
||||
|
||||
|
||||
float bump_sample(vec2 uv, vec3 uvt, float dx, float dy) {
|
||||
vec2 offset = vec2(dx / pixellation, dy / pixellation);
|
||||
float height = texture(gunk_noise, uvt + vec3(offset, 0.0)).r;
|
||||
float mask = texture(gunk_mask, uv + offset / uv_scale).r;
|
||||
return height * smoothstep(1.0, 0.0, mask);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec3 uvt = scale_uvt(UV, TIME);
|
||||
float value = sample_noise(uvt);
|
||||
|
||||
|
||||
// Build normal map from bump map
|
||||
float h_center = bump_sample(UV, uvt, 0.0, 0.0);
|
||||
float h_right = bump_sample(UV, uvt, 1.0, 0.0);
|
||||
float h_down = bump_sample(UV, uvt, 0.0, 1.0);
|
||||
float dx = (h_center - h_right) * bump_strength;
|
||||
float dy = (h_center - h_down) * bump_strength;
|
||||
vec3 normal_diff_map = normalize(vec3(dx, dy, 1.0));
|
||||
ALBEDO = normal_diff_map / 2.0 + 0.5;
|
||||
}
|
68
src/shaders/gunk/gunk.gdshader
Normal file
68
src/shaders/gunk/gunk.gdshader
Normal file
@ -0,0 +1,68 @@
|
||||
shader_type spatial;
|
||||
render_mode depth_prepass_alpha;
|
||||
|
||||
#include "common.gdshaderinc"
|
||||
|
||||
group_uniforms jitter;
|
||||
uniform mediump float jitter_magnitude = 0.0;
|
||||
uniform lowp float jitter_time_scale = 0.1;
|
||||
|
||||
uniform highp sampler3D jitter_noise;
|
||||
|
||||
group_uniforms inflation;
|
||||
uniform highp float vertex_inflation = 0.0;
|
||||
uniform highp float inflation_pixellation = 10.0;
|
||||
|
||||
|
||||
void vertex() {
|
||||
float mixer = VERTEX.x + 0.553 * VERTEX.z + 1.618 * VERTEX.y;
|
||||
float local_time = floor(TIME * jitter_time_scale * time_pixellation) / time_pixellation;
|
||||
float sample = texture(jitter_noise, vec3(cos(mixer), sin(mixer), local_time)).r;
|
||||
float inflation = floor(vertex_inflation * inflation_pixellation) / inflation_pixellation;
|
||||
float jitter = jitter_magnitude * (sample - 0.5 + inflation);
|
||||
VERTEX *= 1.0 + jitter;
|
||||
}
|
||||
|
||||
float bump_sample(vec3 uvt, float dx, float dy) {
|
||||
vec2 offset = vec2(dx / pixellation, dy / pixellation);
|
||||
return texture(gunk_noise, uvt + vec3(offset, 0.0)).r;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec3 uvt = scale_uvt(UV, TIME);
|
||||
float value = sample_noise(uvt);
|
||||
ALBEDO = base_albedo(UV, value);
|
||||
ROUGHNESS = base_roughness(value);
|
||||
EMISSION = base_emission(UV, value);
|
||||
SPECULAR = base_specular();
|
||||
|
||||
// Build normal map from bump map
|
||||
float h_center = bump_sample(uvt, 0.0, 0.0);
|
||||
float h_right = bump_sample(uvt, 1.0, 0.0);
|
||||
float h_down = bump_sample(uvt, 0.0, 1.0);
|
||||
float dx = (h_center - h_right) * bump_strength;
|
||||
float dy = (h_center - h_down) * bump_strength;
|
||||
vec3 normal_diff_map = normalize(vec3(dx, dy, 1.0));
|
||||
NORMAL_MAP = normal_diff_map / 2.0 + 0.5;
|
||||
|
||||
// add fresnel
|
||||
vec3 world_normal = mat3(TANGENT, BINORMAL, NORMAL) * normal_diff_map;
|
||||
EMISSION += rim_glow(
|
||||
world_normal,
|
||||
VIEW,
|
||||
fresnel_gradient,
|
||||
fresnel_color,
|
||||
fresnel_power,
|
||||
fresnel_intensity
|
||||
);
|
||||
|
||||
// add iridescence
|
||||
ALBEDO += rim_glow(
|
||||
world_normal,
|
||||
VIEW,
|
||||
iridescence_gradient,
|
||||
iridescence_color,
|
||||
iridescence_power,
|
||||
iridescence_intensity
|
||||
);
|
||||
}
|
59
src/shaders/gunk/gunk_overlay.gdshader
Normal file
59
src/shaders/gunk/gunk_overlay.gdshader
Normal file
@ -0,0 +1,59 @@
|
||||
shader_type spatial;
|
||||
render_mode depth_prepass_alpha;
|
||||
|
||||
#include "common.gdshaderinc"
|
||||
|
||||
group_uniforms gunk_mask;
|
||||
uniform float edge_bleed = 0.25;
|
||||
uniform sampler2D gunk_mask;
|
||||
|
||||
|
||||
float bump_sample(vec2 uv, vec3 uvt, float dx, float dy) {
|
||||
vec2 offset = vec2(dx / pixellation, dy / pixellation);
|
||||
float height = texture(gunk_noise, uvt + vec3(offset, 0.0)).r;
|
||||
float mask = texture(gunk_mask, uv + offset / uv_scale).r;
|
||||
return height * smoothstep(1.0, 0.0, mask);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec3 uvt = scale_uvt(UV, TIME);
|
||||
float value = sample_noise(uvt);
|
||||
ALBEDO = base_albedo(UV, value);
|
||||
ROUGHNESS = base_roughness(value);
|
||||
EMISSION = base_emission(UV, value);
|
||||
SPECULAR = base_specular();
|
||||
|
||||
// Build normal map from bump map
|
||||
float h_center = bump_sample(UV, uvt, 0.0, 0.0);
|
||||
float h_right = bump_sample(UV, uvt, 1.0, 0.0);
|
||||
float h_down = bump_sample(UV, uvt, 0.0, 1.0);
|
||||
float dx = (h_center - h_right) * bump_strength;
|
||||
float dy = (h_center - h_down) * bump_strength;
|
||||
vec3 normal_diff_map = normalize(vec3(dx, dy, 1.0));
|
||||
NORMAL_MAP = normal_diff_map / 2.0 + 0.5;
|
||||
|
||||
// add fresnel
|
||||
vec3 world_normal = mat3(TANGENT, BINORMAL, NORMAL) * normal_diff_map;
|
||||
EMISSION += rim_glow(
|
||||
world_normal,
|
||||
VIEW,
|
||||
fresnel_gradient,
|
||||
fresnel_color,
|
||||
fresnel_power,
|
||||
fresnel_intensity
|
||||
);
|
||||
|
||||
// add iridescence
|
||||
ALBEDO += rim_glow(
|
||||
world_normal,
|
||||
VIEW,
|
||||
iridescence_gradient,
|
||||
iridescence_color,
|
||||
iridescence_power,
|
||||
iridescence_intensity
|
||||
);
|
||||
|
||||
// Hardish edge
|
||||
float mask = texture(gunk_mask, UV).r;
|
||||
ALPHA = hardstep(1.0 - mask + edge_bleed);
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b7ds08rj0yk7j" path="res://assets/ui/corpo_logo/corpo_logo_128_bg.png" id="1_1oh6t"]
|
||||
[ext_resource type="Texture2D" uid="uid://dixpjnlaj86x2" path="res://assets/ui/corpo_logo/corpo_logo_128.png" id="1_p2l3a"]
|
||||
[ext_resource type="Shader" uid="uid://dnytoirugot2e" path="res://src/shaders/canvas_grunk.gdshader" id="2_q367f"]
|
||||
[ext_resource type="Shader" uid="uid://dnytoirugot2e" path="res://src/shaders/gunk/canvas_grunk.gdshader" id="2_q367f"]
|
||||
[ext_resource type="FastNoiseLite" uid="uid://cnlvdtx68giv6" path="res://assets/materials/gunk_noise.tres" id="3_8o5hc"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6dx0ovy15g5o" path="res://src/effects/grunk_2d/grunk_2d.tscn" id="5_xrtbx"]
|
||||
[ext_resource type="Theme" uid="uid://b07fevr214mmr" path="res://src/ui/hud/hud_theme.tres" id="6_t8g1i"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://c0uitm5cg88h1"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://dnytoirugot2e" path="res://src/shaders/canvas_grunk.gdshader" id="1_28vyc"]
|
||||
[ext_resource type="Shader" uid="uid://dnytoirugot2e" path="res://src/shaders/gunk/canvas_grunk.gdshader" id="1_28vyc"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6dx0ovy15g5o" path="res://src/effects/grunk_2d/grunk_2d.tscn" id="1_sv5d8"]
|
||||
[ext_resource type="FastNoiseLite" uid="uid://cnlvdtx68giv6" path="res://assets/materials/gunk_noise.tres" id="2_qsvii"]
|
||||
[ext_resource type="Theme" uid="uid://b07fevr214mmr" path="res://src/ui/hud/hud_theme.tres" id="3_a6m17"]
|
||||
|
@ -1,11 +1,11 @@
|
||||
[gd_scene load_steps=22 format=3 uid="uid://bctwol681jdk0"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://bctwol681jdk0"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://dj2ij1b2yjicr" path="res://src/ui/menus/title_screen/title_screen.theme" id="1_3lcvc"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6dx0ovy15g5o" path="res://src/effects/grunk_2d/grunk_2d.tscn" id="2_7vchy"]
|
||||
[ext_resource type="Script" uid="uid://dysldhadfr4oj" path="res://src/ui/menus/title_screen/title_screen.gd" id="2_rjwhj"]
|
||||
[ext_resource type="Texture2D" uid="uid://buc0oy5col0et" path="res://assets/ui/title.png" id="2_uxv0r"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3eaqw2rdurct" path="res://src/ui/menus/settings_menu/settings_menu.tscn" id="3_wqn52"]
|
||||
[ext_resource type="Shader" uid="uid://dnytoirugot2e" path="res://src/shaders/canvas_grunk.gdshader" id="3_yrys0"]
|
||||
[ext_resource type="Shader" uid="uid://dnytoirugot2e" path="res://src/shaders/gunk/canvas_grunk.gdshader" id="3_yrys0"]
|
||||
[ext_resource type="FastNoiseLite" uid="uid://cnlvdtx68giv6" path="res://assets/materials/gunk_noise.tres" id="4_cgiy0"]
|
||||
[ext_resource type="Texture2D" uid="uid://dixpjnlaj86x2" path="res://assets/ui/corpo_logo/corpo_logo_128.png" id="5_yrys0"]
|
||||
[ext_resource type="FontFile" uid="uid://cj5luctpn3bfm" path="res://assets/fonts/Sixtyfour/Sixtyfour-Regular-VariableFont_BLED,SCAN.ttf" id="8_x67pi"]
|
||||
@ -20,13 +20,6 @@ seamless = true
|
||||
seamless_blend_skirt = 0.5
|
||||
noise = ExtResource("4_cgiy0")
|
||||
|
||||
[sub_resource type="NoiseTexture3D" id="NoiseTexture3D_d72jk"]
|
||||
width = 256
|
||||
height = 256
|
||||
seamless = true
|
||||
seamless_blend_skirt = 0.5
|
||||
noise = ExtResource("4_cgiy0")
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_qsvii"]
|
||||
frequency = 0.0006
|
||||
fractal_type = 2
|
||||
@ -42,16 +35,27 @@ noise = SubResource("FastNoiseLite_qsvii")
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_rjwhj"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource("3_yrys0")
|
||||
shader_parameter/gunk_noise = SubResource("NoiseTexture3D_7v5ka")
|
||||
shader_parameter/color_1 = Color(0, 0.03, 0.1, 1)
|
||||
shader_parameter/color_2 = Color(0, 0.1, 0.3, 1)
|
||||
shader_parameter/emission_color = Color(0.25, 0.88, 1, 1)
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/pan_speed = Vector2(0, 0)
|
||||
shader_parameter/time_scale = 0.4
|
||||
shader_parameter/pixellation = 30.0
|
||||
shader_parameter/time_pixellation = 30.0
|
||||
shader_parameter/roughness = 0.15
|
||||
shader_parameter/specular_contribution = 0.8
|
||||
shader_parameter/emission_strength = 0.0
|
||||
shader_parameter/bump_strength = 1.0
|
||||
shader_parameter/fresnel_color = Color(1, 1, 1, 1)
|
||||
shader_parameter/fresnel_power = 4.0
|
||||
shader_parameter/fresnel_intensity = 0.0
|
||||
shader_parameter/iridescence_color = Color(1, 1, 1, 1)
|
||||
shader_parameter/iridescence_power = 4.0
|
||||
shader_parameter/iridescence_intensity = 0.0
|
||||
shader_parameter/overlay_emission_scale = 1.0
|
||||
shader_parameter/aspect_ratio = 0.5625
|
||||
shader_parameter/time_scale = 0.4
|
||||
shader_parameter/gunk_noise = SubResource("NoiseTexture3D_7v5ka")
|
||||
shader_parameter/gunk_normal_map = SubResource("NoiseTexture3D_d72jk")
|
||||
shader_parameter/mask_progress = 0.0
|
||||
shader_parameter/mask_noise = SubResource("NoiseTexture2D_pgbvb")
|
||||
|
||||
|
@ -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 = 4.05264
|
||||
wait_time = 3.98107
|
||||
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 = 3.9133
|
||||
wait_time = 5.28899
|
||||
metadata/_custom_type_script = "uid://beyk2xtbjrsg4"
|
||||
|
||||
[node name="PickRandomLurkTarget" type="Node" parent="GrunkBeastBehavior/StateSelector/LurkSequence/RandomDelay"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://bi5mxt5s4aq1a" path="res://assets/npc/grunk_beast/grunk_beast.gltf" id="1_hoss2"]
|
||||
[ext_resource type="Script" uid="uid://dkll8s6kwb41r" path="res://src/world/grunk_beast/procedural_grunk_beast/start_ik.gd" id="2_qic24"]
|
||||
[ext_resource type="Script" uid="uid://dgy2ubsj1fotp" path="res://src/world/grunk_beast/procedural_grunk_beast/procedural_grunk_beast.gd" id="2_qqnhb"]
|
||||
[ext_resource type="Shader" uid="uid://ckxc0ngd37rtk" path="res://src/shaders/gunk.gdshader" id="4_0gxpq"]
|
||||
[ext_resource type="Shader" uid="uid://ckxc0ngd37rtk" path="res://src/shaders/gunk/gunk.gdshader" id="4_0gxpq"]
|
||||
[ext_resource type="Script" uid="uid://7is3sa00qejh" path="res://src/world/grunk_beast/procedural_grunk_beast/ik_target.gd" id="4_3gbao"]
|
||||
[ext_resource type="Script" uid="uid://bpyovjodpxjpb" path="res://src/world/grunk_beast/procedural_grunk_beast/step_ray.gd" id="4_faau1"]
|
||||
[ext_resource type="Script" uid="uid://c1gitpy7s78ev" path="res://src/world/grunk_beast/procedural_grunk_beast/target_container.gd" id="5_wffas"]
|
||||
|
Binary file not shown.
BIN
src/world/grunk_beast/slutch_beast/face_nodule.material.depren
Normal file
BIN
src/world/grunk_beast/slutch_beast/face_nodule.material.depren
Normal file
Binary file not shown.
BIN
src/world/grunk_beast/slutch_beast/slutch.material.depren
Normal file
BIN
src/world/grunk_beast/slutch_beast/slutch.material.depren
Normal file
Binary file not shown.
BIN
src/world/grunk_beast/slutch_beast/slutch_nodule.material.depren
Normal file
BIN
src/world/grunk_beast/slutch_beast/slutch_nodule.material.depren
Normal file
Binary file not shown.
@ -1,138 +1,13 @@
|
||||
[gd_scene load_steps=33 format=3 uid="uid://kctp5erogwcb"]
|
||||
[gd_scene load_steps=17 format=3 uid="uid://kctp5erogwcb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bde7cglaqobkd" path="res://src/world/mechanics/listener/listener.gd" id="1_htscg"]
|
||||
[ext_resource type="Script" uid="uid://cfsiyhhrcua6o" path="res://src/world/game_sound/game_sound_listener.gd" id="2_htscg"]
|
||||
[ext_resource type="PackedScene" uid="uid://c2c0ooj1re3dk" path="res://src/world/mechanics/listener/listener_model.tscn" id="3_r42ft"]
|
||||
[ext_resource type="Shader" uid="uid://ckxc0ngd37rtk" path="res://src/shaders/gunk.gdshader" id="4_gjouv"]
|
||||
[ext_resource type="FastNoiseLite" uid="uid://cnlvdtx68giv6" path="res://assets/materials/gunk_noise.tres" id="5_pp7wn"]
|
||||
[ext_resource type="Texture2D" uid="uid://bl1aniu87mioa" path="res://assets/particles/light_02.png" id="7_pp7wn"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_2ibh1"]
|
||||
radius = 1.0
|
||||
|
||||
[sub_resource type="NoiseTexture3D" id="NoiseTexture3D_2roq2"]
|
||||
width = 256
|
||||
height = 256
|
||||
depth = 32
|
||||
seamless = true
|
||||
seamless_blend_skirt = 0.5
|
||||
noise = ExtResource("5_pp7wn")
|
||||
|
||||
[sub_resource type="NoiseTexture3D" id="NoiseTexture3D_fk1xc"]
|
||||
width = 256
|
||||
height = 256
|
||||
depth = 32
|
||||
seamless = true
|
||||
seamless_blend_skirt = 0.5
|
||||
noise = ExtResource("5_pp7wn")
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_7fplw"]
|
||||
frequency = 0.0703
|
||||
|
||||
[sub_resource type="NoiseTexture3D" id="NoiseTexture3D_omayi"]
|
||||
width = 32
|
||||
height = 32
|
||||
depth = 128
|
||||
noise = SubResource("FastNoiseLite_7fplw")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_ih22n"]
|
||||
offsets = PackedFloat32Array(0, 0.001, 0.05)
|
||||
colors = PackedColorArray(0, 0, 0, 1, 0.25098, 0.878431, 1, 1, 0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_v2pcm"]
|
||||
gradient = SubResource("Gradient_ih22n")
|
||||
fill = 1
|
||||
fill_from = Vector2(0.5, 0.5)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_c5snp"]
|
||||
resource_local_to_scene = true
|
||||
render_priority = 0
|
||||
shader = ExtResource("4_gjouv")
|
||||
shader_parameter/color_1 = Color(0, 0.03, 0.1, 1)
|
||||
shader_parameter/color_2 = Color(0, 0.1, 0.3, 1)
|
||||
shader_parameter/emission_color = Color(0.25, 0.88, 1, 1)
|
||||
shader_parameter/pixellation = 128.0
|
||||
shader_parameter/time_pixellation = 30.0
|
||||
shader_parameter/roughness = 0.15
|
||||
shader_parameter/specular_contribution = 0.8
|
||||
shader_parameter/emission_strength = 0.02
|
||||
shader_parameter/normal_scale = 1.0
|
||||
shader_parameter/uv_scale = Vector2(2, 2)
|
||||
shader_parameter/time_scale = 0.2
|
||||
shader_parameter/gunk_noise = SubResource("NoiseTexture3D_2roq2")
|
||||
shader_parameter/gunk_normal_map = SubResource("NoiseTexture3D_fk1xc")
|
||||
shader_parameter/jitter_magnitude = 0.4
|
||||
shader_parameter/jitter_time_scale = 0.1
|
||||
shader_parameter/jitter_noise = SubResource("NoiseTexture3D_omayi")
|
||||
shader_parameter/vertex_inflation = 0.0
|
||||
shader_parameter/inflation_pixellation = 10.0
|
||||
shader_parameter/overlay_emission = SubResource("GradientTexture2D_v2pcm")
|
||||
shader_parameter/overlay_emission_scale = 0.02
|
||||
|
||||
[sub_resource type="NoiseTexture3D" id="NoiseTexture3D_pp7wn"]
|
||||
width = 256
|
||||
height = 256
|
||||
depth = 32
|
||||
seamless = true
|
||||
seamless_blend_skirt = 0.5
|
||||
noise = ExtResource("5_pp7wn")
|
||||
|
||||
[sub_resource type="NoiseTexture3D" id="NoiseTexture3D_c5snp"]
|
||||
width = 256
|
||||
height = 256
|
||||
depth = 32
|
||||
seamless = true
|
||||
seamless_blend_skirt = 0.5
|
||||
noise = ExtResource("5_pp7wn")
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_c5snp"]
|
||||
frequency = 0.0703
|
||||
|
||||
[sub_resource type="NoiseTexture3D" id="NoiseTexture3D_q7kpl"]
|
||||
width = 32
|
||||
height = 32
|
||||
depth = 128
|
||||
noise = SubResource("FastNoiseLite_c5snp")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_yuift"]
|
||||
resource_local_to_scene = true
|
||||
offsets = PackedFloat32Array(0, 0.001, 0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008)
|
||||
colors = PackedColorArray(0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_rwi8p"]
|
||||
resource_local_to_scene = true
|
||||
gradient = SubResource("Gradient_yuift")
|
||||
width = 32
|
||||
height = 32
|
||||
fill = 1
|
||||
fill_from = Vector2(0.5, 0.5)
|
||||
fill_to = Vector2(1, 1)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_co1mg"]
|
||||
resource_local_to_scene = true
|
||||
render_priority = 0
|
||||
shader = ExtResource("4_gjouv")
|
||||
shader_parameter/color_1 = Color(0, 0.03, 0.1, 1)
|
||||
shader_parameter/color_2 = Color(0, 0.1, 0.3, 1)
|
||||
shader_parameter/emission_color = Color(0.66, 0.943333, 1, 1)
|
||||
shader_parameter/pixellation = 128.0
|
||||
shader_parameter/time_pixellation = 30.0
|
||||
shader_parameter/roughness = 0.15
|
||||
shader_parameter/specular_contribution = 0.8
|
||||
shader_parameter/emission_strength = 0.2
|
||||
shader_parameter/normal_scale = 1.0
|
||||
shader_parameter/uv_scale = Vector2(2, 2)
|
||||
shader_parameter/time_scale = 0.2
|
||||
shader_parameter/gunk_noise = SubResource("NoiseTexture3D_pp7wn")
|
||||
shader_parameter/gunk_normal_map = SubResource("NoiseTexture3D_c5snp")
|
||||
shader_parameter/jitter_magnitude = 0.4
|
||||
shader_parameter/jitter_time_scale = 0.1
|
||||
shader_parameter/jitter_noise = SubResource("NoiseTexture3D_q7kpl")
|
||||
shader_parameter/vertex_inflation = 0.0
|
||||
shader_parameter/inflation_pixellation = 10.0
|
||||
shader_parameter/overlay_emission = SubResource("GradientTexture2D_rwi8p")
|
||||
shader_parameter/overlay_emission_scale = 6.0
|
||||
|
||||
[sub_resource type="Curve" id="Curve_pp7wn"]
|
||||
_limits = [0.0, 0.3, 0.0, 1.0]
|
||||
_data = [Vector2(0, 0), 0.0, 1.51554, 0, 0, Vector2(0.101629, 0.115028), 0.436038, 0.436038, 0, 0, Vector2(0.421742, 0.0779494), 0.21293, 0.21293, 0, 0, Vector2(1, 0), -0.0537925, 0.0, 0, 0]
|
||||
@ -255,16 +130,12 @@ bones/38/rotation = Quaternion(0.247978, -1.26717e-07, -3.12779e-07, 0.968766)
|
||||
bones/39/rotation = Quaternion(0.148338, 2.72959e-08, 3.46469e-07, 0.988937)
|
||||
bones/40/rotation = Quaternion(0.237284, 5.07144e-06, -1.68211e-06, 0.97144)
|
||||
|
||||
[node name="Listener" parent="ListenerModel/Armature/Skeleton3D" index="0"]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_c5snp")
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_co1mg")
|
||||
|
||||
[node name="PhysicalBoneSimulator3D" type="PhysicalBoneSimulator3D" parent="ListenerModel/Armature/Skeleton3D" index="6"]
|
||||
|
||||
[node name="PhysicalBone3D" type="PhysicalBone3D" parent="ListenerModel/Armature/Skeleton3D/PhysicalBoneSimulator3D"]
|
||||
transform = Transform3D(0.323527, 1.2631e-06, 1.20741, -3.57116e-07, 1.25, -1.21197e-06, -1.20741, -3.1263e-08, 0.323527, -4.8128e-06, 0.800007, -1.25658e-06)
|
||||
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.3854e-08, -5.72204e-06, 3.9816e-06)
|
||||
body_offset = Transform3D(1.25, 3.57626e-07, -3.57628e-07, -3.57627e-07, 1.25, -1.22189e-06, 3.57628e-07, 1.22189e-06, 1.25, -2.9814e-08, 7.15256e-06, -4.97699e-06)
|
||||
transform = Transform3D(0.323524, 1.2631e-06, 1.20741, -3.57116e-07, 1.25, -1.21197e-06, -1.20741, -3.12658e-08, 0.323524, -4.8128e-06, 0.800007, -1.25657e-06)
|
||||
joint_offset = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.38539e-08, -5.72204e-06, 3.9816e-06)
|
||||
body_offset = Transform3D(1.25, 3.57626e-07, -3.57628e-07, -3.57627e-07, 1.25, -1.22189e-06, 3.57628e-07, 1.22189e-06, 1.25, -2.98139e-08, 7.15256e-06, -4.97699e-06)
|
||||
bone_name = "Stem5"
|
||||
|
||||
[node name="RemoteTransform3D" type="RemoteTransform3D" parent="ListenerModel/Armature/Skeleton3D/PhysicalBoneSimulator3D/PhysicalBone3D"]
|
||||
@ -287,7 +158,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.14, 0)
|
||||
shape = SubResource("CylinderShape3D_dqq13")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(0.258816, 1.01046e-06, 0.965909, -2.85686e-07, 0.999981, -9.69562e-07, -0.965904, -2.50099e-08, 0.258817, -3.61278e-06, 0.875006, -1.01114e-06)
|
||||
transform = Transform3D(0.258814, 1.01046e-06, 0.96591, -2.85687e-07, 0.999981, -9.69562e-07, -0.965905, -2.50121e-08, 0.258815, -3.61278e-06, 0.875006, -1.01113e-06)
|
||||
shape = SubResource("CylinderShape3D_r42ft")
|
||||
|
||||
[node name="CooldownTimer" type="Timer" parent="."]
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://coucghe370fff" path="res://assets/grunk/listener/listener.gltf" id="1_lgdkx"]
|
||||
[ext_resource type="Script" uid="uid://co4gkdwyhdbmc" path="res://src/world/mechanics/listener/listener_model.gd" id="2_yh3g4"]
|
||||
[ext_resource type="Shader" uid="uid://ckxc0ngd37rtk" path="res://src/shaders/gunk.gdshader" id="4_q7kpl"]
|
||||
[ext_resource type="Shader" uid="uid://ckxc0ngd37rtk" path="res://src/shaders/gunk/gunk.gdshader" id="4_q7kpl"]
|
||||
[ext_resource type="Animation" uid="uid://dihyn82xf67ou" path="res://assets/grunk/listener/animations/RESET.res" id="4_y4jww"]
|
||||
[ext_resource type="Animation" uid="uid://c236lo5xytxaa" path="res://assets/grunk/listener/animations/idle.res" id="5_3vskp"]
|
||||
[ext_resource type="FastNoiseLite" uid="uid://cnlvdtx68giv6" path="res://assets/materials/gunk_noise.tres" id="6_ftf52"]
|
||||
|
@ -4,7 +4,7 @@
|
||||
[ext_resource type="Resource" uid="uid://tgac5tnfx56r" path="res://src/world/world_manager.tres" id="2_5kmgb"]
|
||||
[ext_resource type="PackedScene" uid="uid://byvjsvavbg5xe" path="res://src/ui/menus/pause_menu/pause_menu.tscn" id="2_6fy3g"]
|
||||
[ext_resource type="Resource" uid="uid://0i72bf8ip1lx" path="res://src/world/spook_manager.tres" id="3_l0av5"]
|
||||
[ext_resource type="PackedScene" uid="uid://dc4tts6342cuj" path="res://levels/prop_test/prop_test.tscn" id="4_5kmgb"]
|
||||
[ext_resource type="PackedScene" uid="uid://b8rv6dg4tgaeb" path="res://levels/mechanic_test/mechanic_test.tscn" id="4_5kmgb"]
|
||||
[ext_resource type="PackedScene" uid="uid://c0uitm5cg88h1" path="res://src/ui/menus/kill_screen/kill_screen.tscn" id="6_l0av5"]
|
||||
[ext_resource type="PackedScene" uid="uid://brknr57xc2cp0" path="res://src/ui/elements/save_icon/save_icon.tscn" id="7_5kmgb"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user