Hey all trying to translate a vertex but I’m having problems with specifying a quad to move.
I can move everything in the frustum using a translation matrix and then sending it up the vertex shader and * by the position like so
#version 330
//Position Container
in vec4 position;
//Container for TexCoords
in vec4 Texcoord0;
// THIS IS OUT VEC2 TEXCOORD IN OTHER CODE
smooth out vec2 Texcoord_VSPS;
//Translation Matrix
uniform mat4x4 myMatrix;
//out vec2 ex_texcoord;
//TO USE A DIFFERENT COORDINATE SYSTEM JUST MULTIPLY THE MATRIX YOU WANT
//mat4 = projection mat4{
//1.0, 0.0, 0.0, 0.0,
//0.0, 1.0, 0.0, 0.0,
//0.0, 0.0, -2.0, 0.0,
//0.0, 0.0, 0.0, 1.0
//};
//Main Entry Point
void main(void)
{
//Translations and w Cordinates stuff
gl_Position = myMatrix * position;
Texcoord_VSPS = Texcoord0.st;
}
/// //Translations and w Cordinates stuff
// gl_Position = vec4(position.xyz, 1.0);
But how too specify a specific quad to move ?
I was thinking I would put the translation matrix next to the binding of the vbo being used at that current time but that didn’t return valid results I craved.
anyways
thanks in advance