kamera ajo
This commit is contained in:
@ -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?
|
||||||
|
|||||||
31
shader.glsl
31
shader.glsl
@ -4,7 +4,7 @@
|
|||||||
* Contact: tdmaav@gmail.com
|
* Contact: tdmaav@gmail.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
precision mediump float;
|
//precision mediump float;
|
||||||
uniform vec2 u_resolution;
|
uniform vec2 u_resolution;
|
||||||
uniform float u_time;
|
uniform float u_time;
|
||||||
const float PI = 22./7.;
|
const float PI = 22./7.;
|
||||||
@ -75,15 +75,13 @@ float sdTriPrism( vec3 p, vec2 h, float rot )
|
|||||||
//////////////////
|
//////////////////
|
||||||
|
|
||||||
// POSITIONS
|
// POSITIONS
|
||||||
/*
|
|
||||||
const vec3 glyph1Pos = vec3(1.7,-1.1,0.0);
|
const vec3 glyph1Pos = vec3(1.7,-1.1,0.0);
|
||||||
const vec3 glyph2Pos = vec3(2.0,0.0,0.0);
|
const vec3 glyph2Pos = vec3(2.0,0.0,0.0);
|
||||||
const vec3 glyph3Pos = vec3(1.5,1.4,0.0);
|
const vec3 glyph3Pos = vec3(1.5,1.4,0.0);
|
||||||
const vec3 glyph4Pos = vec3(0.0,2.0,0.0);
|
const vec3 glyph4Pos = vec3(0.0,2.0,0.0);
|
||||||
const vec3 glyph5Pos = vec3(1.5,1.4,0.0);
|
const vec3 glyph5Pos = vec3(-1.5,1.4,0.0);
|
||||||
const vec3 glyph6Pos = vec3(1.5 * -1.,1.4,0.0);
|
const vec3 glyph6Pos = vec3(1.5 * -1.,1.4,0.0);
|
||||||
const vec3 glyph7Pos = vec3(1.7 * -1.,-1.1,0.0);
|
const vec3 glyph7Pos = vec3(1.7 * -1.,-1.1,0.0);
|
||||||
*/
|
|
||||||
|
|
||||||
// DELAYS
|
// DELAYS
|
||||||
float STARTDELAY = 9.;
|
float STARTDELAY = 9.;
|
||||||
@ -332,8 +330,16 @@ vec3 cameraPos()
|
|||||||
// close up shot for 1st glyph lock
|
// close up shot for 1st glyph lock
|
||||||
if (u_time > 10.5) cPos = vec3(2.,-1.,1.);
|
if (u_time > 10.5) cPos = vec3(2.,-1.,1.);
|
||||||
// zoom away for 2nd glyph animation
|
// zoom away for 2nd glyph animation
|
||||||
if (u_time > 12.) cPos = vec3(-1., -.7, 4.);
|
if (u_time > 12.) cPos = vec3(-1., -.7, 4.);
|
||||||
if (u_time > 22.) cPos = vec3(0., -1., 5.);
|
if (u_time > 13.5) {
|
||||||
|
cPos = vec3(0., 0., 4.);
|
||||||
|
cPos.yz *= rot2D(-0.6-(cos(u_time-15.))*0.2);
|
||||||
|
cPos.xz *= rot2D(sin((u_time-16.5)*0.5)*.6);
|
||||||
|
}
|
||||||
|
if (u_time > 19.5)
|
||||||
|
{
|
||||||
|
cPos = vec3(-1., -.7, 4.);
|
||||||
|
}
|
||||||
return cPos;
|
return cPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,7 +348,15 @@ vec3 cameraPointAt() {
|
|||||||
// look at 1st glyph
|
// look at 1st glyph
|
||||||
if (u_time > 10.5) p = vec3(1.7,-1.1,0.);
|
if (u_time > 10.5) p = vec3(1.7,-1.1,0.);
|
||||||
// look gate at distance
|
// look gate at distance
|
||||||
if(u_time > 12.) p = vec3(0.);
|
if(u_time > 12.) p = vec3(0.);
|
||||||
|
if(u_time > 13.5) {
|
||||||
|
p = mix(glyph3Pos,glyph4Pos, (u_time-13.5)*0.3);
|
||||||
|
}
|
||||||
|
if(u_time > 16.8)
|
||||||
|
{
|
||||||
|
p = mix(glyph4Pos,glyph5Pos, clamp((u_time-16.8)*0.3,0.,1.));
|
||||||
|
}
|
||||||
|
if(u_time > 19.5) p = vec3(0.);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,10 +416,9 @@ vec3 sceneGate(vec2 uv)
|
|||||||
col *= vec3(.1)+ addSpecular(n,rd,0.5);
|
col *= vec3(.1)+ addSpecular(n,rd,0.5);
|
||||||
if(mat ==5.)
|
if(mat ==5.)
|
||||||
col *= chevronColor; // activated glyph color
|
col *= chevronColor; // activated glyph color
|
||||||
|
|
||||||
}
|
}
|
||||||
col = applyFog(col, d, rd, vec3(0., -.1, -1.), .01);
|
col = applyFog(col, d, rd, vec3(0., -.1, -1.), .01);
|
||||||
col = colorFlashesAnim(col); // animated color flash
|
col = colorFlashesAnim(col); // animated color flash
|
||||||
return postProcess(col);
|
return postProcess(col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user