Extensive work on VFX for the guild, assets for the world, and portrait variance. Work on quests. Extra work on User Flow completion and file saving.
This commit is contained in:
28
shaders/starfield.tres
Normal file
28
shaders/starfield.tres
Normal file
@@ -0,0 +1,28 @@
|
||||
[gd_resource type="Shader" format=3 uid="uid://dvdm8x66gwu2v"]
|
||||
|
||||
[resource]
|
||||
code = "shader_type canvas_item;
|
||||
|
||||
uniform vec2 stars_speed = vec2(0.0);
|
||||
uniform float stars_density: hint_range(0.0, 1.0, 0.001) = 0.01;
|
||||
|
||||
varying vec4 modulate;
|
||||
varying vec2 position;
|
||||
|
||||
// https://thebookofshaders.com/10/
|
||||
float random(vec2 st) {
|
||||
return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453123);
|
||||
}
|
||||
|
||||
// Called for every vertex the material is visible on.
|
||||
void vertex() {
|
||||
modulate = COLOR;
|
||||
position = VERTEX;
|
||||
}
|
||||
|
||||
// Called for every pixel the material is visible on.
|
||||
void fragment() {
|
||||
vec2 uv = (position + TIME * stars_speed) * TEXTURE_PIXEL_SIZE;
|
||||
uv = fract(uv) * step(random(floor(uv)), stars_density);
|
||||
COLOR = texture(TEXTURE, uv) * modulate;
|
||||
}"
|
||||
@@ -1,35 +1,36 @@
|
||||
[gd_resource type="VisualShader" load_steps=13 format=3 uid="uid://dbcokq5fn2les"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dk1fkcth50ii8" path="res://shaders/test.png" id="1_mue8a"]
|
||||
[ext_resource type="Texture2D" uid="uid://c8cvo15p3vosu" path="res://external/test portrait/gradients/blue_hair.tres" id="1_mue8a"]
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorFunc" id="VisualShaderNodeColorFunc_n1g6q"]
|
||||
function = 1
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_kuvpm"]
|
||||
parameter_name = "Color_Gradient"
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_m6etp"]
|
||||
input_name = "texture"
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_s3ye8"]
|
||||
parameter_name = "Luminosity_Gradient"
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_x6ow4"]
|
||||
source = 5
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_n1g6q"]
|
||||
texture = ExtResource("1_mue8a")
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_kuvpm"]
|
||||
default_input_values = [0, Quaternion(0, 0, 0, 0)]
|
||||
op_type = 2
|
||||
expanded_output_ports = [0]
|
||||
source = 5
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorCompose" id="VisualShaderNodeVectorCompose_m6etp"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_s3ye8"]
|
||||
offsets = PackedFloat32Array(0, 0.495114, 1)
|
||||
colors = PackedColorArray(0, 0.45, 0.14249997, 1, 0.88283366, 1.732707e-06, 0.5201918, 1, 1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_x6ow4"]
|
||||
gradient = SubResource("Gradient_s3ye8")
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_yjp8t"]
|
||||
texture = SubResource("GradientTexture1D_x6ow4")
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_3315r"]
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_n7htp"]
|
||||
parameter_name = "Texture2DParameter"
|
||||
|
||||
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_3ksh6"]
|
||||
expanded_output_ports = [0]
|
||||
source = 5
|
||||
texture = ExtResource("1_mue8a")
|
||||
texture_type = 1
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorFunc" id="VisualShaderNodeColorFunc_yjp8t"]
|
||||
expanded_output_ports = [0]
|
||||
function = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_fwk6d"]
|
||||
input_name = "uv"
|
||||
@@ -38,12 +39,12 @@ input_name = "uv"
|
||||
input_name = "vertex"
|
||||
|
||||
[resource]
|
||||
resource_local_to_scene = true
|
||||
code = "shader_type canvas_item;
|
||||
render_mode blend_mix;
|
||||
|
||||
uniform sampler2D tex_vtx_2 : source_color;
|
||||
uniform sampler2D tex_frg_3;
|
||||
uniform sampler2D tex_frg_6;
|
||||
uniform sampler2D Color_Gradient;
|
||||
uniform sampler2D Luminosity_Gradient;
|
||||
|
||||
|
||||
|
||||
@@ -56,42 +57,64 @@ void vertex() {
|
||||
vec2 n_out4p0 = UV;
|
||||
|
||||
|
||||
// Texture2D:2
|
||||
vec4 n_out2p0 = texture(tex_vtx_2, n_out4p0);
|
||||
|
||||
|
||||
// Output:0
|
||||
VERTEX = n_out5p0;
|
||||
UV = n_out4p0;
|
||||
COLOR.rgb = vec3(n_out2p0.xyz);
|
||||
COLOR.a = n_out2p0.x;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec4 n_out3p0;
|
||||
// Texture2D:3
|
||||
vec4 n_out3p0 = texture(tex_frg_3, UV);
|
||||
|
||||
|
||||
// VectorDecompose:4
|
||||
float n_out4p0 = n_out3p0.x;
|
||||
float n_out4p1 = n_out3p0.y;
|
||||
float n_out4p2 = n_out3p0.z;
|
||||
float n_out4p3 = n_out3p0.w;
|
||||
n_out3p0 = texture(TEXTURE, UV);
|
||||
float n_out3p1 = n_out3p0.r;
|
||||
float n_out3p2 = n_out3p0.g;
|
||||
float n_out3p4 = n_out3p0.a;
|
||||
|
||||
|
||||
vec4 n_out6p0;
|
||||
// Texture2D:6
|
||||
vec4 n_out6p0 = texture(tex_frg_6, vec2(n_out4p0));
|
||||
n_out6p0 = texture(Color_Gradient, vec2(n_out3p1));
|
||||
|
||||
|
||||
// VectorOp:7
|
||||
vec3 n_out7p0 = vec3(n_out6p0.xyz) * vec3(n_out4p1);
|
||||
vec3 n_out9p0;
|
||||
// ColorFunc:9
|
||||
{
|
||||
vec3 c = vec3(n_out6p0.xyz);
|
||||
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
||||
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
|
||||
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
|
||||
float d = q.x - min(q.w, q.y);
|
||||
float e = 1.0e-10;
|
||||
n_out9p0 = vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
|
||||
}
|
||||
float n_out9p1 = n_out9p0.r;
|
||||
float n_out9p2 = n_out9p0.g;
|
||||
|
||||
|
||||
vec4 n_out15p0;
|
||||
// Texture2D:15
|
||||
n_out15p0 = texture(Luminosity_Gradient, vec2(n_out3p2));
|
||||
|
||||
|
||||
// VectorCompose:5
|
||||
vec3 n_out5p0 = vec3(n_out9p1, n_out9p2, n_out15p0.x);
|
||||
|
||||
|
||||
vec3 n_out10p0;
|
||||
// ColorFunc:10
|
||||
{
|
||||
vec3 c = n_out5p0;
|
||||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
||||
n_out10p0 = c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||
}
|
||||
|
||||
|
||||
// Output:0
|
||||
COLOR.rgb = n_out7p0;
|
||||
COLOR.a = n_out4p3;
|
||||
COLOR.rgb = n_out10p0;
|
||||
COLOR.a = n_out3p4;
|
||||
|
||||
|
||||
}
|
||||
@@ -99,24 +122,28 @@ void fragment() {
|
||||
mode = 1
|
||||
flags/light_only = false
|
||||
nodes/vertex/0/position = Vector2(660, 160)
|
||||
nodes/vertex/2/node = SubResource("VisualShaderNodeTexture_3ksh6")
|
||||
nodes/vertex/2/position = Vector2(120, 260)
|
||||
nodes/vertex/4/node = SubResource("VisualShaderNodeInput_fwk6d")
|
||||
nodes/vertex/4/position = Vector2(-240, 160)
|
||||
nodes/vertex/5/node = SubResource("VisualShaderNodeInput_jobvs")
|
||||
nodes/vertex/5/position = Vector2(-240, 60)
|
||||
nodes/vertex/connections = PackedInt32Array(4, 0, 2, 0, 2, 0, 0, 2, 2, 0, 0, 3, 5, 0, 0, 0, 4, 0, 0, 1)
|
||||
nodes/fragment/0/position = Vector2(580, 240)
|
||||
nodes/vertex/connections = PackedInt32Array(5, 0, 0, 0, 4, 0, 0, 1)
|
||||
nodes/fragment/0/position = Vector2(1000, 80)
|
||||
nodes/fragment/3/node = SubResource("VisualShaderNodeTexture_n1g6q")
|
||||
nodes/fragment/3/position = Vector2(-500, 60)
|
||||
nodes/fragment/4/node = SubResource("VisualShaderNodeVectorDecompose_kuvpm")
|
||||
nodes/fragment/4/position = Vector2(-200, 160)
|
||||
nodes/fragment/3/position = Vector2(-820, 80)
|
||||
nodes/fragment/5/node = SubResource("VisualShaderNodeVectorCompose_m6etp")
|
||||
nodes/fragment/5/position = Vector2(260, 160)
|
||||
nodes/fragment/5/position = Vector2(500, -60)
|
||||
nodes/fragment/6/node = SubResource("VisualShaderNodeTexture_yjp8t")
|
||||
nodes/fragment/6/position = Vector2(20, -60)
|
||||
nodes/fragment/7/node = SubResource("VisualShaderNodeVectorOp_3315r")
|
||||
nodes/fragment/7/position = Vector2(320, 400)
|
||||
nodes/fragment/8/node = SubResource("VisualShaderNodeTexture2DParameter_n7htp")
|
||||
nodes/fragment/8/position = Vector2(-780, 440)
|
||||
nodes/fragment/connections = PackedInt32Array(3, 0, 4, 0, 4, 0, 5, 0, 4, 1, 5, 1, 4, 2, 5, 2, 4, 3, 0, 1, 4, 0, 6, 0, 6, 0, 7, 0, 7, 0, 0, 0, 4, 1, 7, 1)
|
||||
nodes/fragment/6/position = Vector2(-340, -80)
|
||||
nodes/fragment/9/node = SubResource("VisualShaderNodeColorFunc_yjp8t")
|
||||
nodes/fragment/9/position = Vector2(220, -80)
|
||||
nodes/fragment/10/node = SubResource("VisualShaderNodeColorFunc_n1g6q")
|
||||
nodes/fragment/10/position = Vector2(740, -40)
|
||||
nodes/fragment/11/node = SubResource("VisualShaderNodeTexture2DParameter_kuvpm")
|
||||
nodes/fragment/11/position = Vector2(-880, -340)
|
||||
nodes/fragment/13/node = SubResource("VisualShaderNodeInput_m6etp")
|
||||
nodes/fragment/13/position = Vector2(-1120, 160)
|
||||
nodes/fragment/14/node = SubResource("VisualShaderNodeTexture2DParameter_s3ye8")
|
||||
nodes/fragment/14/position = Vector2(-880, 440)
|
||||
nodes/fragment/15/node = SubResource("VisualShaderNodeTexture_x6ow4")
|
||||
nodes/fragment/15/position = Vector2(-99.206764, 351.4282)
|
||||
nodes/fragment/connections = PackedInt32Array(6, 0, 9, 0, 3, 1, 6, 0, 9, 1, 5, 0, 9, 2, 5, 1, 5, 0, 10, 0, 11, 0, 6, 2, 13, 0, 3, 2, 3, 4, 0, 1, 10, 0, 0, 0, 14, 0, 15, 2, 3, 2, 15, 0, 15, 0, 5, 2)
|
||||
|
||||
26
shaders/void.tres
Normal file
26
shaders/void.tres
Normal file
@@ -0,0 +1,26 @@
|
||||
[gd_resource type="Shader" format=3 uid="uid://hr8vdp56p4yo"]
|
||||
|
||||
[resource]
|
||||
code = "shader_type canvas_item;
|
||||
render_mode blend_mix;
|
||||
|
||||
uniform sampler2D void_view;
|
||||
|
||||
|
||||
|
||||
void fragment() {
|
||||
// Input:4
|
||||
vec2 n_out4p0 = SCREEN_UV;
|
||||
|
||||
|
||||
vec4 n_out2p0;
|
||||
// Texture2D:2
|
||||
n_out2p0 = texture(void_view, n_out4p0);
|
||||
|
||||
|
||||
// Output:0
|
||||
COLOR.rgb = vec3(n_out2p0.xyz);
|
||||
|
||||
|
||||
}
|
||||
"
|
||||
52
shaders/void_composite.gdshader
Normal file
52
shaders/void_composite.gdshader
Normal file
@@ -0,0 +1,52 @@
|
||||
shader_type canvas_item;
|
||||
render_mode unshaded;
|
||||
|
||||
const vec2 OFFSETS[8] = {
|
||||
vec2(-0.71, -0.71),
|
||||
vec2(-1, 0),
|
||||
vec2(-0.71, 0.71),
|
||||
vec2(0, -1),
|
||||
vec2(0, 1),
|
||||
vec2(0.71, -0.71),
|
||||
vec2(1, 0),
|
||||
vec2(0.71, 0.71)
|
||||
};
|
||||
|
||||
uniform bool ripple = false;
|
||||
uniform float line_thickness : hint_range(0.0, 100.0);
|
||||
uniform vec4 line_color : source_color = vec4(1.0);
|
||||
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
|
||||
|
||||
void fragment() {
|
||||
// Get the size of the pixels on screen, and create a variable for out outline
|
||||
vec2 size = line_thickness * SCREEN_PIXEL_SIZE;
|
||||
float outline = 0.0;
|
||||
|
||||
// Project in each direction, and add up the alpha of each projection.
|
||||
// This is similar to picking a point, hit testing in 8 directions, and
|
||||
// returning true if the hit test works
|
||||
for (int i = 0; i < OFFSETS.length(); i++) {
|
||||
vec2 coordinate_offset = SCREEN_UV + size * OFFSETS[i];
|
||||
outline += texture(screen_texture, coordinate_offset).a;
|
||||
}
|
||||
|
||||
// Force outline to 1 or 0
|
||||
//outline = sign(outline);
|
||||
outline = .4 * (outline / 8.0) + .6 * sign(outline);
|
||||
// Get the texture from the screen
|
||||
vec4 c = texture(screen_texture, SCREEN_UV);
|
||||
|
||||
|
||||
if(ripple){
|
||||
c.rgb = line_color.rgb;
|
||||
COLOR = c;
|
||||
}else{
|
||||
// If the alpha exists at least a little bit, amplify the colors.
|
||||
// This ensures alpha and colors remain precise even when reading from screen.
|
||||
if (c.a > 0.0001) {
|
||||
c.rgb /= c.a;
|
||||
}
|
||||
COLOR = mix(c, line_color, outline - c.a);
|
||||
}
|
||||
|
||||
}
|
||||
1
shaders/void_composite.gdshader.uid
Normal file
1
shaders/void_composite.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cenbje61a2wi6
|
||||
86
shaders/void_ripple.gdshader
Normal file
86
shaders/void_ripple.gdshader
Normal file
@@ -0,0 +1,86 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform float offset = 0;
|
||||
uniform bool allow_out_of_bounds = true;
|
||||
uniform float outline_thickness: hint_range(0.0, 16.0, 1.0) = 1.0;
|
||||
uniform vec4 outline_color: source_color = vec4(1.0);
|
||||
|
||||
bool is_inside_usquare(vec2 x) {
|
||||
return x == clamp(x, vec2(0.0), vec2(1.0));
|
||||
}
|
||||
|
||||
vec4 blend(vec4 bottom, vec4 top) {
|
||||
float alpha = top.a + bottom.a * (1.0 - top.a);
|
||||
if (alpha < 0.0001) return vec4(0.0);
|
||||
|
||||
vec3 color = mix(bottom.rgb * bottom.a, top.rgb, top.a) / alpha;
|
||||
return vec4(color, alpha);
|
||||
}
|
||||
|
||||
void vertex() {
|
||||
float i;
|
||||
float r = modf(TIME * .5 + offset, i);
|
||||
float output_min = 1.0;
|
||||
float output_max = 1.05;
|
||||
r = output_min + r * (output_max - output_min);
|
||||
VERTEX = vec2(980, 540) + VERTEX * r - vec2(980.0 * r,540.0 * r);
|
||||
float ot = modf(outline_thickness, i);
|
||||
if (allow_out_of_bounds) VERTEX += (UV * 2.0 - 1.0) * ot;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
float i;
|
||||
float ot = outline_thickness * (1.0 - modf(TIME * .5 + offset, i));
|
||||
if (ot > 0.0 && outline_color.a > 0.0) {
|
||||
vec2 uv = UV;
|
||||
vec4 texture_color = texture(TEXTURE, UV);
|
||||
|
||||
if (allow_out_of_bounds) {
|
||||
vec2 texture_pixel_size = vec2(1.0) / (vec2(1.0) / TEXTURE_PIXEL_SIZE + vec2(ot * 2.0));
|
||||
uv = (uv - texture_pixel_size * ot) * TEXTURE_PIXEL_SIZE / texture_pixel_size;
|
||||
|
||||
if (is_inside_usquare(uv)) {
|
||||
texture_color = texture(TEXTURE, uv);
|
||||
} else {
|
||||
texture_color = vec4(0.0);
|
||||
}
|
||||
}
|
||||
|
||||
float alpha = 0.0;
|
||||
|
||||
for (float y = 1.0; y <= ot; y++) {
|
||||
for (float x = 0.0; x <= y; x++) {
|
||||
if (length(vec2(x, y - 0.5)) > ot) break;
|
||||
|
||||
float look_at_alpha;
|
||||
vec2 look_at_uv[8] = {
|
||||
uv + vec2(x, y) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(-x, y) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(x, -y) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(-x, -y) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(y, x) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(-y, x) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(y, -x) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(-y, -x) * TEXTURE_PIXEL_SIZE
|
||||
};
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (is_inside_usquare(look_at_uv[i])) {
|
||||
look_at_alpha = texture(TEXTURE, look_at_uv[i]).a;
|
||||
if (look_at_alpha > alpha) alpha = look_at_alpha;
|
||||
if (1.0 - alpha < 0.0001) break;
|
||||
}
|
||||
}
|
||||
|
||||
if (1.0 - alpha < 0.0001) break;
|
||||
}
|
||||
|
||||
if (1.0 - alpha < 0.0001) break;
|
||||
}
|
||||
vec4 oc = outline_color;
|
||||
float i;
|
||||
float r = modf(TIME * .5 + offset, i);
|
||||
oc.a = outline_color.a * (1.0-r);
|
||||
COLOR = vec4(oc.rgb, (alpha * oc.a) - texture_color.a);
|
||||
}
|
||||
}
|
||||
1
shaders/void_ripple.gdshader.uid
Normal file
1
shaders/void_ripple.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://2kgpm3f7ydt7
|
||||
Reference in New Issue
Block a user