From 73c4457de421480bd6e691692f77eac5a48bf2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20J=C3=A4rvisalo?= Date: Wed, 31 Jul 2024 21:06:04 +0300 Subject: [PATCH] portaali fresnel --- 4kdemo.compofiller | 2 +- base.config | 6 +++--- minified.config | 2 ++ shader.glsl | 7 +++++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/4kdemo.compofiller b/4kdemo.compofiller index baa5bd0..a1db361 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=minified.config +ACTIVE_CONFIG=base.config # ------- GUI options/preferences -------- # Automatically rebuild DLLs when things have changed? diff --git a/base.config b/base.config index 9005839..fc411fc 100644 --- a/base.config +++ b/base.config @@ -63,7 +63,7 @@ CRINKLER_ORDERTRIES=4000 AUDIO_BUFFER_ALLOCATED_LENGTH=2830240 AUDIO_SAMPLING_RATE=44100 -LOOP_END=5.0 -LOOP_START=3.0 -LOOP_ENABLED=0 +LOOP_END=28.0 +LOOP_START=24.0 +LOOP_ENABLED=1 TIME_DIVIDER_INT=91241 diff --git a/minified.config b/minified.config index bafe933..ef7e55b 100644 --- a/minified.config +++ b/minified.config @@ -21,3 +21,5 @@ TWO_PASS_RENDERING=0 SECOND_PASS_NEGATIVE_TIME=0 USE_TEXTS=0 USE_TEXTS_UNIFORM=0 +RESOLUTION_X=1270 +RESOLUTION_Y=768 diff --git a/shader.glsl b/shader.glsl index 623f066..24b4d5a 100644 --- a/shader.glsl +++ b/shader.glsl @@ -406,7 +406,10 @@ vec3 sceneGate(vec2 uv) if(mat==0.) col *= vec3(0.21, 0.35, 0.33) + addSpecular(n,rd,.5, 2.); if(mat==1.) - col = getSeaColor(p, n, no(vec3(0.0,0.3,0.8)),no(rd)); + { + float fresnel = pow(clamp(1.-dot(n, -rd), 0., 1.), 0.6); + col = getSeaColor(p, n, no(vec3(0.0,0.3,0.8)),no(rd)) - vec3(1., 1.0 ,1.) * fresnel; + } if(mat==2.) col *= vec3(.8, .8, .5); if(mat==3.) @@ -414,7 +417,7 @@ vec3 sceneGate(vec2 uv) if(mat==4.) col *= vec3(0.0, 0.08, 0.11) + addSpecular(n,rd,0.3,0.7); if(mat ==5.) - col = chevronColor*0.4;// * pow(cl(1. -dot(n, -rd), 0., 1.), .3); + col = chevronColor*0.4 * pow(cl(1. -dot(n, -rd), 0., 1.), .3); if(mat == 6.) col *= vec3(0.01, 0.04, 0.06) + addSpecular(n,rd,.1, 2.5); }