Merge branch 'dev' of http://gitlab.xn--jrvisalo-0za.fi/markus.jarvisalo/4kdemo into dev
This commit is contained in:
14
shader.glsl
14
shader.glsl
@ -322,9 +322,15 @@ vec3 postProcess(vec3 col) {
|
||||
return col;
|
||||
}
|
||||
|
||||
vec3 getCpos(float time) {
|
||||
return vec3((cos(time)-0.9)*2., -sin(time)*0.8, 5.);;
|
||||
}
|
||||
|
||||
|
||||
vec3 cameraPos()
|
||||
{
|
||||
// first zoom in to the gate
|
||||
|
||||
vec3 cPos = vec3(0., clamp(6.-u_time,2.,6.), clamp((75.-u_time*8.),6.,75.));
|
||||
if (u_time > 7.5) cPos += vec3(0., clamp(7.5-u_time,-1.,0.), 0.);
|
||||
// close up shot for 1st glyph lock
|
||||
@ -340,6 +346,13 @@ vec3 cameraPos()
|
||||
{
|
||||
cPos = vec3(-1., -.7, 4.);
|
||||
}
|
||||
if (u_time > 22.) {
|
||||
cPos = getCpos(u_time);
|
||||
}
|
||||
if (u_time > 26.5) {
|
||||
cPos = mix(getCpos(26.5), vec3(0., 0., 5.), clamp((u_time-26.5) * 1.5, 0., 1.1));
|
||||
}
|
||||
|
||||
return cPos;
|
||||
}
|
||||
|
||||
@ -417,6 +430,7 @@ vec3 sceneGate(vec2 uv)
|
||||
if(mat ==5.)
|
||||
col *= chevronColor; // activated glyph color
|
||||
}
|
||||
|
||||
col = applyFog(col, d, rd, vec3(0., -.1, -1.), .01);
|
||||
col = colorFlashesAnim(col); // animated color flash
|
||||
return postProcess(col);
|
||||
|
||||
Reference in New Issue
Block a user