-
Hello again. This concerns the block of code at: Line 2380 in 226c0e3
This code is run inside a loop, eventhough none of the values involved rely on anything defined in the loop. Also not a bug, and outside of Stereo rendering, this won't have any effect. But when doing stereo rendering, we are binding the shader program and computing/uploading the MVP matrix twice without any benefit. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Some more uniforms are set a few lines down at: Line 2414 in 226c0e3 These can also be moved out of the loop. |
Beta Was this translation helpful? Give feedback.
-
@Hexaflex Actually // Set current eye view offset to modelview matrix
rlSetMatrixModelview(rlMatrixMultiply(matModelView, RLGL.State.viewOffsetStereo[eye]));
// Set current eye projection matrix
rlSetMatrixProjection(RLGL.State.projectionStereo[eye]); In any case, the overhead of calling those functions for one or two eyes is minimal so I prefer to keep all the code inside the loop. |
Beta Was this translation helpful? Give feedback.
@Hexaflex Actually
RLGL.State.modelview
andRLGL.State.projection
depend on:In any case, the overhead of calling those functions for one or two eyes is minimal so I prefer to keep all the code inside the loop.