Fixed MD5 models.

GI now bounces off textures properly.
This commit is contained in:
Justin Marshall
2026-05-21 18:58:43 -07:00
parent 1f5f0733fe
commit 345e6bfc81
10 changed files with 384 additions and 70 deletions
+3 -1
View File
@@ -192,6 +192,7 @@ public:
void Reload( bool checkPrecompressed, bool force );
void AddReference() { refCount++; };
const float* GetAverageColor() const { return averageColor; };
//==========================================================
@@ -250,6 +251,7 @@ public:
// data for listImages
int uploadWidth, uploadHeight, uploadDepth; // after power of two, downsample, and MAX_TEXTURE_SIZE
int internalFormat;
float averageColor[4]; // normalized average source pixel color
idImage *cacheUsagePrev, *cacheUsageNext; // for dynamic cache purging of old images
@@ -286,6 +288,7 @@ ID_INLINE idImage::idImage() {
bindCount = 0;
uploadWidth = uploadHeight = uploadDepth = 0;
internalFormat = 0;
averageColor[0] = averageColor[1] = averageColor[2] = averageColor[3] = 1.0f;
cacheUsagePrev = cacheUsageNext = NULL;
hashNext = NULL;
isMonochrome = false;
@@ -499,4 +502,3 @@ IMAGEPROGRAM
void R_LoadImageProgram( const char *name, byte **pic, int *width, int *height, ID_TIME_T *timestamp, textureDepth_t *depth = NULL );
const char *R_ParsePastImageProgram( idLexer &src );