Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>The MODELVIEW_MATRIX is assembled in the vertex shader by combining the object’s MODEL_MATRIX and the camera’s VIEW_MATRIX

I was taught that MV/MVP should be calculated CPU-side per-model, and that doing it in the vertex shader is wasteful. Is that advice out of date?



Not necessarily, but it doesn’t solve the problem - if you calculate MVP on the CPU with double float precision, when you pass the final matrix to the shader, it will be cast down to single float precision, and cause the issue described.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: