After a bit of thinking i don't think it will actually work unless the girl isn't moving much due to the low framerate of the clips.Thats true, it would be relative & speed of movement dependent.
// Coordonnees de texture et couleur pour le fragment
varying vec4 gl_TexCoord[];
varying vec4 gl_FrontColor;
uniform float u_Elapsed;
void main()
{
vec4 displacedVertex;
displacedVertex = gl_Vertex;
float len = length( displacedVertex );
displacedVertex.x += 5.0 * sin( u_Elapsed + len );
//displacedVertex.y += 2.0 * cos(u_Elapsed + len );
// Position sur l'ecran
gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * displacedVertex;
// Position dans la texture
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_FrontColor = gl_Color;
}
varying vec4 gl_TexCoord[];
varying vec4 gl_FrontColor;
void main()
{
gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_FrontColor = gl_Color;
}
I forgot to say that you can control the number of vertices used for a quad, sprite or clipSprite by using a resolution: clause in the relevent node in the .scn file, e.g.
resolution : 200 // use 200 vertices for this sprite.
I think the default is 4 - one at each corner which divides the sprite into two triangles via one of its diagonals.
I guess most of their time is taken up by bugfixes and the vr app,@Z22, I don't think Totem are ***** up a lot of @Team priority time on vr app.
uniform sampler2D texture0;and for the .scn
uniform sampler2D texture1;
uniform float u_Elapsed;
//varying vec4 gl_TexCoord[];
//vec4 vTexCoord = gl_TexCoord[0];
void main(void)
if(( sin(u_Elapsed*01) ) > 0.5)
{
output = texture0;
}
else
{
output = texture1;
}
gl_FragColor = output;
clip {
id: Dancer
deny: top, table
}
texture {
id: space0
source: Backgrounds/redbg.jpg
}
texture {
id: space1
source: Backgrounds/bluebg.jpg
}
camera {
type: 2D
pos: 0, 0
size: 800, 450
sprite {
pos: 380, 550
hotspot: 0.5, 1.0
size: 920, 655
source: space0, 0
source: space1, 1
shader: fragment, SwapBg.fsh
}
clipSprite {
pos: 400, 450, 1
standingHeight: 400
source: Dancer
scale: -1, 1, 1
}
}
En tant qu'utilisateur gratuit de iStripper, vous n'êtes pas autorisé à répondre sur le forum ou à créer de nouveau sujet.
Vous pouvez cependant consulter les catégories de bases et commencer à découvrir notre communauté !