   How to mirror a scene by transform the camera?
  I want to render a water plane with reflect effect, so I need to mirror the whole scene with the water plane.    I rathor to transform the camera than transform every meshs and objects in the scene. I think transform the camera will have the same effect as transform the scene, for it just world matrix mulity view matrix.    But I found when I mirror the camera, it not just reverse the up down, but also reverse the left right.    Who can tell me how to make the transform? Thank you~~   
  In your modelview matrix, change the sign of all elements of the 3rd line - this will just change the sign of the transformed Z coordinate, and will not impact the x,y coordinates.   ;  Mirroring is a non-uniform scaling where untouched dimensions are scaled by +1 (the identity for scaling) and touched dimensions are scaled by -1 (length preserving, but sign toggling).There are dependencies on the used vector convention and viewing convention as follows:Assuming that the up vector is in y direction (as used by OpenGL or D3D), you'll need S(+1,-1,+1) which gives a matrix like[ +1  0  0  0 ][  0 -1  0  0 ][  0  0 +1  0 ][  0  0  0  1 ]If you apply this matrix to a model matrix using column vectors (e.g. OpenGL)M' := S * Mthen you'll see that the 2nd row is negated, but for row vectors (e.g. D3D)M * Sthen you'll see that the 2nd column is negated (I've neglected the transpose operator here).Doing the above sets the world's xy plane as mirror plane, so the water surface must be located therein. If it isn't, e.g. it is offsetted by a valuet := [ 0, dy, 0 ]then you'll need to consider that by wrapping the mirroring with a temporary translation like so for column vectorsM' := T * S * T-1 * Mrespectively its reverse for row vectors.To transform into the view space, the view transformation (i.e. the inverse camera transformation if the camera is defined w.r.t. the world) is applied on the left (for column vectors)V * M'With S' being either S or T * S * T-1, see above, we can write this asV * ( S' * M )what is the same as= ( V * S' ) * Mso that the mirroring can alternatively be incorporated into the view transformation. If needed, you can convert this further into camera space.This may not be the desired solution, but I hope it at least helps you in solving the problem.   