Orthographic projection
manuel-kroeter opened this issue · 2 comments
Hi Sebastian,
is it possible to use an orthographic projection instead of the perspective one? Do I need to change some shader code or is it enough to just change the projection matrix of the camera? If I have to change the shaders, can you shortly point out what needs to be changed?
Thanks in advance,
Manuel
Hi Manuel,
since I did not look into the code for quite a while, I quickly tried this myself using the orthographic projection matrix:
m_projection_matrix <<
2.0f / (r - l), 0.0f, 0.0f, -(r + l) / (r - l),
0.0f, 2.0f / (t - b), 0.0f, -(t + b) / (t - b),
0.0f, 0.0f, -2.0f / (f - n), -(f + n) / (f - n),
0.0f, 0.0f, 0.0f, 1.0f;
Unfortunately, this seems to break the splat rendering code, since the results do not look correct. I am afraid this means you cannot get away without any changes to the shader code.
Start by checking whether the computation of gl_PointSize is still correct.
Yes, I also tried that projection matrix. With EWA filter turned off, it even results in an empty image. I also think that the attribute fragment shader needs to be changed. Can you maybe tell me what "w3d" and and "w2d" represents?