Open bagnell opened 8 years ago
Prevent possible precision errors when transforming vertices be multiple matrices.
Go through all of the shaders and change things like:
vec4 positionWC = czm_inverseView * positionEC; vec4 positionMC = czm_inverseModel * positionWC;
to vec4 positionMC = czm_inverseModelView * positionEC;
vec4 positionMC = czm_inverseModelView * positionEC;
The only exception here is the projection matrix where we would want to do the opposite. Change gl_Position = czm_modelViewProjection * position; to
gl_Position = czm_modelViewProjection * position;
vec4 positionEC = czm_modelView * position; gl_Position = czm_projection * positionEC;
For the first change see Creating Vast Game Worls by Emil Persson. For the second change see Tightening the Precision of Perspective Rendering by Paul Upchurch and Mathieu Desbrun and Depth Precision Visualized by Nathan Reed.
Hi @bagnell Can You assign me this task I am ready to contribute to this
Prevent possible precision errors when transforming vertices be multiple matrices.
Go through all of the shaders and change things like:
to
vec4 positionMC = czm_inverseModelView * positionEC;
The only exception here is the projection matrix where we would want to do the opposite. Change
gl_Position = czm_modelViewProjection * position;
toFor the first change see Creating Vast Game Worls by Emil Persson. For the second change see Tightening the Precision of Perspective Rendering by Paul Upchurch and Mathieu Desbrun and Depth Precision Visualized by Nathan Reed.