opengl - Optimising the model-view transformation in GLSL for 2D -
Then, the standard way to change the corner and then pass the piece shader in the GLSL is something like this:
Uniform Matte 4U_ModelviewView; Attribute vec4 a_position; Zero main () {gl_Position = u_modelview * a_position; } However, I am working in 2D so there is redundancy in 4x4 matrix. Will it be more efficient for me?
Uniform Mat 3 u_modelview; Attribute vec3 a_position; Zero Main () {gl_Position = vec4 (u_modelview * a_position, 1.0); } The gl_Position requires 4 component vectors, so an additional operation is required on the output. Although the matrix is multiplied by 9 instead of 9 elements. Can i do better
I think graphics graphics varies with 3x3 and 4x4 matrix for the same time. Do you have a proven obstacle in the process of changing the corner? Usually the recession appears in the stadium shader, not at the top
Comments
Post a Comment