From 610c2391b1e23157a10c2d318ddf92e4c10b5247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petri=20J=C3=A4rvisalo?= Date: Wed, 31 Jul 2024 21:16:38 +0300 Subject: [PATCH] final ? 4095 --- 4kdemo.compofiller | 2 +- base.config | 4 ++-- shader.glsl | 5 ++--- shader_minified.h | 16 +++++++--------- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/4kdemo.compofiller b/4kdemo.compofiller index a1db361..baa5bd0 100644 --- a/4kdemo.compofiller +++ b/4kdemo.compofiller @@ -6,7 +6,7 @@ PROJECT_INFO_FILE=prod.nfo PROJECT_SCREENSHOT= # Currently active config file name -ACTIVE_CONFIG=base.config +ACTIVE_CONFIG=minified.config # ------- GUI options/preferences -------- # Automatically rebuild DLLs when things have changed? diff --git a/base.config b/base.config index 52287ae..5cfcc5d 100644 --- a/base.config +++ b/base.config @@ -8,8 +8,8 @@ MUSIC_BEATS_PER_BAR=4.0 ########### Visuals ############ SHADER_FILE=shader.glsl -RESOLUTION_X=1280 -RESOLUTION_Y=720 +RESOLUTION_X=1980 +RESOLUTION_Y=1080 USE_TIME_UNIFORM=1 TIME_UNIFORM_NAME='u_time' diff --git a/shader.glsl b/shader.glsl index 8bf2b75..121c5a1 100644 --- a/shader.glsl +++ b/shader.glsl @@ -287,10 +287,9 @@ float specular(vec3 normal,vec3 lightPos,vec3 rayOrigin,float specular) { } vec3 getSeaColor(vec3 p, vec3 n, vec3 l, vec3 eye) { - + vec3 color = SEA_BASE + diffuse(n,l,60.0) * SEA_WATER_COLOR * 0.3; - float fresnel = pow(clamp(1.-dot(n, -eye), 0., 1.), .9); - color -= vec3(0.73, 0.15, 0.66) * fresnel; + color -= vec3(0.73, 0.15, 0.66) * pow(clamp(1.-dot(n, -eye), 0., 1.), .7); color += vec3(specular(n,l,eye,60.0))*0.2; return color; } diff --git a/shader_minified.h b/shader_minified.h index 653558f..d6fdde9 100644 --- a/shader_minified.h +++ b/shader_minified.h @@ -26,8 +26,6 @@ const char *__temp_cleaned_shader_glsl = "{" "float z=max(m-abs(v-y),0.);" "return max(v,y)+z*z*.25/m;" - "float z=max(m-abs(v-y),0.);" - "return max(v,y)+z*z*.25/m;" "}" "float f(vec2 v,int y)" "{" @@ -111,7 +109,7 @@ const char *__temp_cleaned_shader_glsl = "vec3 C=x(v),K=C;" "r=m/16.;" "K.xy=n(floor(atan(C.y,C.x)/r+.5)*r)*K.xy;" - "l=n(K.xyz-vec3(1.75,0,0),vec3(.04,.14,.05))-.02;" + "l=n(K.xyz-vec3(1.75,0,0),vec3(.04,.14,.05))-.02+x(v.xy*1e2,.001,0);" "c=min(c,l);" "if(c==l)" "z=6.;" @@ -172,11 +170,11 @@ const char *__temp_cleaned_shader_glsl = "float i=0.;" "for(int c=0;c<100;c++)" "{" - "m=x(v+y*i,0).x;" - "if(f==0)" - "z+=.05/(1.+10.*pow(x(v+y*i,0).z,.5));" - "i+=m;" - "if(m<1e-4||i>6e2)" + "m=x(v+y*i,0);" + "if(f==0&&m.z<.3)" + "z+=.05/(1.+10.*pow(m.z,.5));" + "i+=m.x;" + "if(m.x<.001||i>4e2)" "break;" "}" "return i;" @@ -202,7 +200,7 @@ const char *__temp_cleaned_shader_glsl = "}" "vec3 s(vec3 v,vec3 y,vec3 f,vec3 m)" "{" - "return F+pow(dot(y,f)*.4+.6,60.)*K*.3-vec3(.73,.15,.66)*pow(clamp(1.-dot(y,-m),0.,1.),.9)+vec3(n(y,f,m,60.))*.2;" + "return F+pow(dot(y,f)*.4+.6,60.)*K*.3-vec3(.73,.15,.66)*pow(clamp(1.-dot(y,-m),0.,1.),.7)+vec3(n(y,f,m,60.))*.2;" "}" "vec3 t(vec2 v,vec3 y,vec3 i,float m)" "{"