FAQ Database Discussion Community


Check vertex visibility in OpenGL ES 2.0

c++11,matrix,opengl-es-2.0,vertex-shader,frustum
How can I check if vertex is visible in the most simple way? If my vertex shader looks like: void main(void) { vec4 glPosition = vec4(VTPosition.x * VTAspectRatio, VTPosition.y, VTPosition.z, 1.0); gl_Position = VTProjection * VTModelview * glPosition; } Can I check visibility on CPU the same way ? Vector4...

Applying perspective with GLSL matrix

opengl,matrix,glsl,frustum
I am not quite sure what is missing, but I loaded a uniform matrix into a vertex shader and when the matrix was: GLfloat translation[4][4] = { {1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.2, 0.0, 1.0}}; or so, I seemed to be able...