reduce shader time rollover to 240 seconds and alter shaders to accomodate (closes #198)
This commit is contained in:
parent
bd12aa68c1
commit
9c507a9b4f
8 changed files with 17 additions and 11 deletions
|
@ -42,7 +42,7 @@ shader_param/arc_scale = 8.0
|
|||
shader_param/arc_threshold = 0.15
|
||||
shader_param/arc_color = Color( 1, 0.93, 0, 1 )
|
||||
shader_param/gamma = 2.0
|
||||
shader_param/flash_rate = 20.0
|
||||
shader_param/flash_rate = 3.0
|
||||
shader_param/flash_intensity = 0.2
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
|
|
|
@ -47,8 +47,8 @@ shader = ExtResource( 1 )
|
|||
shader_param/color_1 = Color( 0.501961, 1, 0.929412, 1 )
|
||||
shader_param/color_2 = Color( 0, 0.713726, 0.631373, 1 )
|
||||
shader_param/checker_size = Vector2( 32, 32 )
|
||||
shader_param/pan_speed = Vector2( 15, 0 )
|
||||
shader_param/cycle_speed = Vector2( 9, 0 )
|
||||
shader_param/pan_speed = Vector2( 12, 0 )
|
||||
shader_param/cycle_speed = Vector2( 8, 0 )
|
||||
shader_param/cycle_alternation = Vector2( 2, 0 )
|
||||
shader_param/uv_transform = Transform2D( 0, 3, 2, 1, 0, 0 )
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
|
||||
[sub_resource type="ShaderMaterial" id=9]
|
||||
shader = ExtResource( 4 )
|
||||
shader_param/speed = 5.0
|
||||
shader_param/speed = 1.0
|
||||
shader_param/cycle_offset = 0.0
|
||||
shader_param/wave_length = 8.0
|
||||
shader_param/thickness = 0.1
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=10]
|
||||
shader = ExtResource( 4 )
|
||||
shader_param/speed = -6.0
|
||||
shader_param/speed = -2.0
|
||||
shader_param/cycle_offset = 3.0
|
||||
shader_param/wave_length = 5.0
|
||||
shader_param/thickness = 0.1
|
||||
|
|
|
@ -370,4 +370,5 @@ common/enable_pause_aware_picking=true
|
|||
quality/driver/driver_name="GLES2"
|
||||
2d/snapping/use_gpu_pixel_snap=true
|
||||
vram_compression/import_etc=true
|
||||
limits/time/time_rollover_secs=240.0
|
||||
environment/default_environment="res://default_env.tres"
|
||||
|
|
|
@ -6,5 +6,5 @@ uniform sampler2D gradient;
|
|||
|
||||
void fragment() {
|
||||
COLOR = texture(TEXTURE, UV);
|
||||
COLOR *= texture(gradient, vec2(TIME * cycle_speed, 0.0));
|
||||
COLOR *= texture(gradient, vec2(fract(TIME) * floor(cycle_speed), 0.0));
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
const float TAU = 6.28319;
|
||||
|
||||
uniform float speed = 1.0;
|
||||
uniform float cycle_offset = 0.0;
|
||||
uniform float wave_length = 1.0;
|
||||
|
@ -11,6 +13,7 @@ float plot(vec2 st, float pct) {
|
|||
}
|
||||
|
||||
void fragment() {
|
||||
float x = sin(UV.y * wave_length + TIME * speed + cycle_offset)*0.5+0.5;
|
||||
float sin_time = fract(TIME * floor(speed)) * TAU;
|
||||
float x = sin(UV.y * wave_length + sin_time + cycle_offset)*0.5+0.5;
|
||||
COLOR = COLOR * vec4(1.0, 1.0, 1.0, plot(UV * vec2(1.2, 1.0) + vec2(-0.1, 0.0), x));
|
||||
}
|
|
@ -9,7 +9,7 @@ float random (vec2 uv) {
|
|||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 noise_uv = SCREEN_UV + TIME * float(animate_noise);
|
||||
vec2 noise_uv = SCREEN_UV + fract(TIME) * float(animate_noise);
|
||||
float noise = random(noise_uv);
|
||||
noise = mix(1.0 - noise_intensity, 1.0, noise);
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
const float TAU = 6.28319;
|
||||
|
||||
uniform float arc_speed = 4.0;
|
||||
uniform float arc_fps = 10.0;
|
||||
uniform float arc_scale = 8.0;
|
||||
uniform float arc_threshold = 0.15;
|
||||
uniform vec4 arc_color : hint_color = vec4(1.0, 0.93, 0.0, 1.0);
|
||||
uniform float gamma = 2.0;
|
||||
uniform float flash_rate = 20.0;
|
||||
uniform float flash_rate = 3.0;
|
||||
uniform float flash_intensity = 0.2;
|
||||
|
||||
// Description : Array and textureless GLSL 2D/3D/4D simplex
|
||||
|
@ -115,11 +117,11 @@ void fragment() {
|
|||
COLOR = vec4(1.0, 1.0, 1.0, COLOR.a);
|
||||
} else {
|
||||
vec4 tex_color = texture(TEXTURE, UV);
|
||||
tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / (gamma + sin(TIME * flash_rate) * flash_intensity)));
|
||||
tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / (gamma + sin(fract(TIME * floor(flash_rate)) * TAU) * flash_intensity)));
|
||||
// tex_color.rgb = pow(tex_color.rgb, vec3(0.5 + sin(TIME * 20.0) * 0.1));
|
||||
// tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / 2.0));
|
||||
// tex_color.rgb += (round(sin(TIME * 20.0) * 4.0)) * 0.25 * 0.05;
|
||||
float n = snoise(vec3(SCREEN_UV / SCREEN_PIXEL_SIZE / arc_scale, floor(TIME * arc_fps) * arc_speed / arc_fps));
|
||||
float n = snoise(vec3(SCREEN_UV / SCREEN_PIXEL_SIZE / arc_scale, floor(fract(TIME) * arc_fps) * arc_speed / arc_fps));
|
||||
n = step(abs(n), arc_threshold);
|
||||
COLOR = vec4(mix(tex_color.rgb, arc_color.rgb, n * arc_color.a), tex_color.a);
|
||||
// float worley = worley(SCREEN_UV, 128.0, 96.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue