Fix floating point precision loss in renderer [part 1]
Patch for https://bugzilla.icculus.org/show_bug.cgi?id=5931 by Eugene C. from 2013 plus recent fix for tcMod rotate. I merged the changes into the OpenGL2 renderer though the fix for tcMod turb doesn't translate.
This commit is contained in:
parent
9c4c363ccc
commit
30fdd88c9f
8 changed files with 63 additions and 47 deletions
|
@ -189,10 +189,10 @@ typedef enum {
|
|||
typedef struct {
|
||||
genFunc_t func;
|
||||
|
||||
float base;
|
||||
float amplitude;
|
||||
float phase;
|
||||
float frequency;
|
||||
double base;
|
||||
double amplitude;
|
||||
double phase;
|
||||
double frequency;
|
||||
} waveForm_t;
|
||||
|
||||
#define TR_MAX_TEXMODS 4
|
||||
|
@ -252,7 +252,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
image_t *image[MAX_IMAGE_ANIMATIONS];
|
||||
int numImageAnimations;
|
||||
float imageAnimationSpeed;
|
||||
double imageAnimationSpeed;
|
||||
|
||||
texCoordGen_t tcGen;
|
||||
vec3_t tcGenVectors[2];
|
||||
|
@ -362,8 +362,8 @@ typedef struct shader_s {
|
|||
|
||||
void (*optimalStageIteratorFunc)( void );
|
||||
|
||||
float clampTime; // time this shader is clamped to
|
||||
float timeOffset; // current time offset for this shader
|
||||
double clampTime; // time this shader is clamped to
|
||||
double timeOffset; // current time offset for this shader
|
||||
|
||||
struct shader_s *remappedShader; // current shader this one is remapped too
|
||||
|
||||
|
@ -388,7 +388,7 @@ typedef struct {
|
|||
byte areamask[MAX_MAP_AREA_BYTES];
|
||||
qboolean areamaskModified; // qtrue if areamask changed since last scene
|
||||
|
||||
float floatTime; // tr.refdef.time / 1000.0
|
||||
double floatTime; // tr.refdef.time / 1000.0
|
||||
|
||||
// text messages for deform text shaders
|
||||
char text[MAX_RENDER_STRINGS][MAX_RENDER_STRING_LENGTH];
|
||||
|
@ -1217,7 +1217,7 @@ typedef struct shaderCommands_s
|
|||
color4ub_t constantColor255[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
|
||||
shader_t *shader;
|
||||
float shaderTime;
|
||||
double shaderTime;
|
||||
int fogNum;
|
||||
|
||||
int dlightBits; // or together of all vertexDlightBits
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue