This commit is contained in:
2024-05-25 01:15:49 +03:00
parent 05de1acfc9
commit 9c461b49a2
4 changed files with 52 additions and 43 deletions

View File

@ -6,7 +6,7 @@ PROJECT_INFO_FILE=prod.nfo
PROJECT_SCREENSHOT= PROJECT_SCREENSHOT=
# Currently active config file name # Currently active config file name
ACTIVE_CONFIG=minified.config ACTIVE_CONFIG=base.config
# ------- GUI options/preferences -------- # ------- GUI options/preferences --------
# Automatically rebuild DLLs when things have changed? # Automatically rebuild DLLs when things have changed?

View File

@ -27,10 +27,10 @@ SECOND_PASS_NEGATIVE_TIME=1
USE_TEXTS=1 USE_TEXTS=1
USE_TEXTS_UNIFORM=1 USE_TEXTS_UNIFORM=1
TEXTS_UNIFORM_NAME='texts' TEXTS_UNIFORM_NAME='texts'
TEXT_BITMAP_RESOLUTION_X=1024 TEXT_BITMAP_RESOLUTION_X=2048
TEXT_BITMAP_RESOLUTION_Y=1024 TEXT_BITMAP_RESOLUTION_Y=512
TEXT_FONT_NAME='Segoe UI Black' TEXT_FONT_NAME='Segoe UI Black'
TEXT_FONT_SIZE=120 TEXT_FONT_SIZE=32
TEXT_FONT_STRIKEOUT=0 TEXT_FONT_STRIKEOUT=0
TEXT_FONT_UNDERLINE=0 TEXT_FONT_UNDERLINE=0
TEXT_FONT_ITALIC=0 TEXT_FONT_ITALIC=0

View File

@ -1,16 +1,18 @@
#version 120
uniform float time; uniform float time;
uniform vec2 resolution; uniform vec2 resolution;
uniform sampler2D texture_sampler; uniform sampler2D texture_sampler;
uniform sampler2D texts; uniform sampler2D texts;
float zoom = 1.; float zoom = 1.;
float gTime = 0.; float gTime = 0.;
int getBeat(void) { float getBeat(void) {
return floor(abs(time*4) / (60./133) ); return floor(abs(time*4.) / (60./133.) );
} }
int getBar(void) { float getBar(void) {
return floor(abs(time) / (60./133)); return floor(abs(time) / (60./133.));
} }
vec2 csqr(vec2 a) { vec2 csqr(vec2 a) {
@ -91,12 +93,12 @@ void CoolSphere(out vec4 fragColor, in vec2 fragCoord) {
// raymarch // raymarch
vec3 col = raymarch(ro, rd, tmm); vec3 col = raymarch(ro, rd, tmm);
if(tmm.x < 0.) if(tmm.x < 0.)
col = texture2D(texture_sampler, rd).rgb; col = texture2D(texture_sampler, rd.xy).rgb;
else { else {
vec3 nor = (ro + tmm.x * rd) / 2.; vec3 nor = (ro + tmm.x * rd) / 2.;
nor = reflect(rd, nor); nor = reflect(rd, nor);
float fre = pow(.5 + clamp(dot(nor, rd), 0.0, 1.0), 3.) * 1.3; float fre = pow(.5 + clamp(dot(nor, rd), 0.0, 1.0), 3.) * 1.3;
col += texture2D(texture_sampler, nor).rgb * fre; col += texture2D(texture_sampler, nor.xy).rgb * fre;
} }
@ -157,7 +159,7 @@ float map(vec3 pos, float time) {
return box_set1; return box_set1;
} }
void mainImage2(out vec4 fragColor, in vec2 fragCoord) { vec4 mainImage2(vec2 fragCoord) {
vec2 p = (fragCoord.xy * 2. - resolution.xy) / min(resolution.x, resolution.y); vec2 p = (fragCoord.xy * 2. - resolution.xy) / min(resolution.x, resolution.y);
vec3 ro = vec3(0., -0.2, time * 4.); vec3 ro = vec3(0., -0.2, time * 4.);
vec3 ray = normalize(vec3(p, 1.5)); vec3 ray = normalize(vec3(p, 1.5));
@ -179,12 +181,9 @@ void mainImage2(out vec4 fragColor, in vec2 fragCoord) {
t += d * 0.55; t += d * 0.55;
} }
col = vec3(ac * 0.02); col = vec3(ac * 0.02);
col += vec3(0., 0.2 * abs(sin(time)), 0.5 + sin(time) * 0.2); col += vec3(0., 0.2 * abs(sin(time)), 0.5 + sin(time) * 0.2);
return vec4(col, 1.0 - t * (0.02 + 0.02 * sin(time)));
fragColor = vec4(col, 1.0 - t * (0.02 + 0.02 * sin(time)));
} }
vec3 palette(float t) { vec3 palette(float t) {
@ -204,24 +203,35 @@ float rand(vec2 co) {
return fract(sin(sn) * c); return fract(sin(sn) * c);
} }
vec3 random(vec2 coord) { vec3 random(vec2 uv) {
float rng = rand(vec2(coord.x+time, coord.y)); float rng = rand(vec2(uv.x+time, uv.y));
return vec3(0.05, 0.05, 0.05) * rng; vec3 col = vec3(0.0+rng*0.1, 0.2+rng*0.1, 0.4+rng*0.1);
col.x += sin(uv.x+time*0.2)*0.1;
col.y += sin(uv.y+time*0.2)*0.1;
col.z += sin(uv.y+time*0.2)*0.1;
return col;
} }
vec3 wave(vec2 uv, float phase, float _offset, float height, float waveLenght, float color) { vec3 wave(vec2 uv, float phase, float _offset, float height, float waveLenght, float color) {
float val = -(sin(phase+uv.x*waveLenght+time) + (uv.y*6.+height)+_offset)*0.055; float val = -(sin(phase+uv.x*waveLenght+time) + (uv.y*6.+height)+_offset)*0.055;
val *= 1. + sin(phase + uv.x*waveLenght+time) + (uv.y*6.-height+_offset); val *= 1. + sin(phase + uv.x*waveLenght+time) + (uv.y*6.-height+_offset);
// return smoothstep(0.0, 32.0, val) * palette(color/360.); //return smoothstep(0.0, 1.0, val) * palette(color/360.);
return clamp(val, 0., 1.) * palette(color/360.); return clamp(val, 0., .9) * palette(color/360.);
} }
vec2 waveTexture(vec2 uv) { float gStartTime = 0.;
uv.y = clamp(sin(uv.x*7. + time)/10. + uv.y, 0., 1.)+0.4; float gPrevTime = -0.1;
uv.x += sin(time);
return uv; vec4 waveTexture(vec2 uv) {
uv.y = sin(uv.x*5. + time)/25. + uv.y;
uv.x -= (time-gStartTime)*0.2;
vec4 tex = texture2D(texts, uv);
if (tex.y > 0. && (gPrevTime != gStartTime)) {
gStartTime = time;
gPrevTime = gStartTime;
}
return vec4(tex.rgb, 1.0);
} }
@ -229,29 +239,27 @@ void TextScroller(out vec4 fragColor, in vec2 fragCoord )
{ {
// Normalized pixel coordinates (from -1 to 1, origo at 0,0) // Normalized pixel coordinates (from -1 to 1, origo at 0,0)
vec2 uv = (fragCoord*2. - resolution) / resolution; vec2 uv = (fragCoord*2. - resolution) / resolution;
vec2 uv2 = (fragCoord / resolution); vec3 col = vec3(0., 0.4, 0.6);
vec3 col = vec3(0., 0.3, 0.6); col += wave(uv, 0., 1., 3., 1., sin(time+0.3)*90.);
col += texture2D(texts, waveTexture(uv2));
col += wave(uv, 0., 1., 3., 1., sin(time+0.3)*360.);
col += wave(uv, sin(time), 0., 3., -1., sin(time-1.2)*120.); col += wave(uv, sin(time), 0., 3., -1., sin(time-1.2)*120.);
col += wave(uv, -3., 0., 3., 1., sin(time+0.5)*90.); col += wave(uv, -3., 0., 3., 1., sin(time+0.5)*90.);
col += random(uv*2.); vec4 outBuf = waveTexture(uv * 0.1);
// Output to screen fragColor = mainImage2(fragCoord)*0.5 + (vec4(col, 1.0)*outBuf); // + vec4(random(uv*2.), 1.0);
fragColor = vec4(col, 1.);
} }
void main(void) { void main(void) {
if (getBar() <= 32)
TextScroller(gl_FragColor, gl_FragCoord.xy); TextScroller(gl_FragColor, gl_FragCoord.xy);
else /*else
{ {
mainImage2(gl_FragColor, gl_FragCoord.xy); mainImage2(gl_FragColor, gl_FragCoord.xy);
vec3 l; vec4 l;
vec2 texttop = vec2(0., -.35), pt = (gl_FragCoord.xy / resolution) - texttop; vec2 texttop = vec2(0., -.35), pt = (gl_FragCoord.xy / resolution) - texttop;
if(pt.y > 0.) { if(pt.y > 0.) {
l = gl_FragColor + texture2D(texts, pt); l = gl_FragColor + texture2D(texts, pt);
} }
gl_FragColor = vec4(l * (1.0), 1.0); gl_FragColor = l;
} } */
} }

View File

@ -45,16 +45,17 @@ TIMINGS_REC_STRING_PTR_FIELD_OFS equ (REC_TIMINGS_TIME_FIELD_SIZE + REC_TIMINGS_
section .textstr1 data section .textstr1 data
;______STRINGS_START______ ;______STRINGS_START______
_string0: DEFINE_STRING 65, 115, 115, 101, 109, 98, 108, 121, 32, 50, 48, 50, 52 END_STRING _string0: DEFINE_STRING 32, 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33, 32, 32, 32, 32, 87, 101, 39, 114, 101, 32, 98, 97, 99, 107, 32, 97, 116, 32, 65, 115, 115, 101, 109, 98, 108, 121, 32, 50, 48, 50, 52, 32, 119, 105, 116, 104, 32, 97, 32, 32, 110, 101, 119, 32, 112, 114, 111, 100, 117, 99, 116, 105, 111, 110, 33 END_STRING
_string1: DEFINE_STRING 65, 115, 115, 101, 109, 98, 108, 121, 13, 50, 48, 50, 52 END_STRING _string1: DEFINE_STRING 84, 104, 105, 115, 32, 116, 101, 120, 116, 32, 115, 104, 111, 117, 108, 100, 32, 99, 111, 110, 116, 105, 110, 117, 101, 32, 110, 105, 99, 101, 108, 121, 32, 119, 105, 116, 104, 32, 115, 99, 114, 111, 108, 108, 101, 114, 33, 32, 119, 104, 105, 99, 104, 32, 105, 115, 32, 97, 103, 97, 105, 110, 32, 118, 101, 114, 121, 32, 110, 105, 99, 101, 32, 105, 110, 100, 101, 101, 100, 33 END_STRING
_string2: DEFINE_STRING 71, 111, 111, 100, 98, 121, 101, 33 END_STRING _string2: DEFINE_STRING 32 END_STRING
;______STRINGS_END______ ;______STRINGS_END______
section .textstr2 data section .textstr2 data
text_string_timings: text_string_timings:
;______TIMINGS_START______ ;______TIMINGS_START______
DEFINE_TIMING TIMING_TIME(0,0.00000,0) TIMING_ALIAS('') TIMING_CUSTOM(0) TIMING_STRING(0,_string0) ; DEFINE_TIMING TIMING_TIME(0,0.00000,0) TIMING_ALIAS('') TIMING_CUSTOM(0) TIMING_STRING(0,_string0) ;
DEFINE_TIMING TIMING_TIME(4,0.00000,318315) TIMING_ALIAS('') TIMING_CUSTOM(0) TIMING_STRING(0,_string1) ; DEFINE_TIMING TIMING_TIME(5,0.50000,437684) TIMING_ALIAS('') TIMING_CUSTOM(0) TIMING_STRING(0,_string1) ;
DEFINE_TIMING TIMING_TIME(9,0.00000,716210) TIMING_ALIAS('') TIMING_CUSTOM(0) TIMING_STRING(0,_string2) ;
DEFINE_TIMING TIMING_TIME(20,0.00000,1591578) TIMING_ALIAS('END_TIME') TIMING_CUSTOM(0) TIMING_STRING(0,_string2) ; DEFINE_TIMING TIMING_TIME(20,0.00000,1591578) TIMING_ALIAS('END_TIME') TIMING_CUSTOM(0) TIMING_STRING(0,_string2) ;
;______TIMINGS_END______ ;______TIMINGS_END______
dd 0xFFFFFFFF ; end-of-time dd 0xFFFFFFFF ; end-of-time