Hello all!
I’m implementing a deferred rendering pipeline in Panda and for the anti aliasing I’m implementing this technique. For that I need a velocity buffer and therefore the modelviewprojection matrix of the previous frame in my shader.
Now from what I read I should be able to get the modelview matrix by using node.getTransform(base.cam).getMat() and I should be able to get the projection matrix from a Lens.
I started by testing if I can replace this node.getTransform(base.cam).getMat() modelview matrix with p3d_ModelViewMatrix in my shader. Everything seems to be in the right place except that the shadows are reversed/ mirrored. It must have something to do with the z component but by playing around with that I can’t get it to work.
My question:
- Is there a way to simply store the generated glsl p3d_ModelViewProjectionMatrix in Python so I can input it to the shader the next frame?
- If not: How can I get the p3d_ModelViewMatrix and p3d_ProjectionMatrix in Python exactly as they are in glsl?
Note 2 configurational aspects:
- I use gl-coordinate-system default #t in my config.prc
- I use trans_view_of_cam_to_clip_of_light instead of ShadowViewMatrix for the deferred shader.
Any help is appreciated,
thanks!