Animaatiot toimii
This commit is contained in:
@ -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?
|
||||
|
||||
29
shader.glsl
29
shader.glsl
@ -275,6 +275,8 @@ void main( )
|
||||
vec3 rd = GetRayDir(uv, ro, vec3(0, 0., 0.), 1.); // ray direction
|
||||
vec3 col = vec3(0); // color
|
||||
|
||||
if(u_time > 0.0)
|
||||
{
|
||||
float d = rayMarch(ro, rd);
|
||||
|
||||
if (d < 1000.)
|
||||
@ -311,6 +313,31 @@ void main( )
|
||||
col *= vec3(1,0,0);
|
||||
}
|
||||
}
|
||||
|
||||
gl_FragColor = vec4(col, 1);
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
// ************* post-process pass ******************
|
||||
// Uncomment this to try a post-processing "effect"
|
||||
|
||||
vec4 c = texture2D(texture_sampler, (gl_FragCoord.xy / u_resolution )),
|
||||
c1 = texture2D(texture_sampler, ((gl_FragCoord.xy + vec2(1.0, 0.0)) / u_resolution) ),
|
||||
c2 = texture2D(texture_sampler, ((gl_FragCoord.xy + vec2(0.0, 1.0)) / u_resolution) ),
|
||||
c3 = texture2D(texture_sampler, ((gl_FragCoord.xy + vec2(1.0, 1.0)) / u_resolution) ),
|
||||
c4 = texture2D(texture_sampler, ((gl_FragCoord.xy + vec2(-1.0, 1.0)) / u_resolution) ),
|
||||
c5 = texture2D(texture_sampler, ((gl_FragCoord.xy + vec2(-1.0, 0.0)) / u_resolution) ),
|
||||
c6 = texture2D(texture_sampler, ((gl_FragCoord.xy + vec2(-1.0, -1.0)) / u_resolution) ),
|
||||
c7 = texture2D(texture_sampler, ((gl_FragCoord.xy + vec2(0.0, -1.0)) / u_resolution) ),
|
||||
c8 = texture2D(texture_sampler, ((gl_FragCoord.xy + vec2(1.0, -1.0)) / u_resolution) )
|
||||
;
|
||||
|
||||
// weird emboss effect
|
||||
// gl_FragColor = (c - c1 - c2 - c3 - c4 + c5 + c6 + c7 + c8) / 2.0;
|
||||
|
||||
|
||||
// some sort of gamma correction with smoothing
|
||||
gl_FragColor = sqrt(c * 2.0 + c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8) / 3.0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user