Fix floating point precision loss in renderer [part 2]
Fix floatTime using float precision instead of double using GCC. Fix R_BindAnimatedImage to be in sync with function table. Fix vertexDeform bulge, vertexDeform normals, noise wave function at high level time. Revert unnecessary float -> double conversions.
This commit is contained in:
parent
30fdd88c9f
commit
59b1262b82
12 changed files with 62 additions and 69 deletions
|
@ -219,7 +219,6 @@ R_BindAnimatedImage
|
|||
*/
|
||||
static void R_BindAnimatedImage( textureBundle_t *bundle ) {
|
||||
int64_t index;
|
||||
double v;
|
||||
|
||||
if ( bundle->isVideoMap ) {
|
||||
ri.CIN_RunCinematic(bundle->videoMapHandle);
|
||||
|
@ -234,10 +233,8 @@ static void R_BindAnimatedImage( textureBundle_t *bundle ) {
|
|||
|
||||
// it is necessary to do this messy calc to make sure animations line up
|
||||
// exactly with waveforms of the same frequency
|
||||
//index = ri.ftol(tess.shaderTime * bundle->imageAnimationSpeed * FUNCTABLE_SIZE);
|
||||
//index >>= FUNCTABLE_SIZE2;
|
||||
v = tess.shaderTime * bundle->imageAnimationSpeed;
|
||||
index = v;
|
||||
index = tess.shaderTime * bundle->imageAnimationSpeed * FUNCTABLE_SIZE;
|
||||
index >>= FUNCTABLE_SIZE2;
|
||||
|
||||
if ( index < 0 ) {
|
||||
index = 0; // may happen with shader time offsets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue