|
|
@ -968,6 +968,7 @@ void R_UploadRipples( texture_t *image ) |
|
|
|
gl_texture_t *glt; |
|
|
|
gl_texture_t *glt; |
|
|
|
uint32_t *pixels; |
|
|
|
uint32_t *pixels; |
|
|
|
int wbits, wmask, wshft; |
|
|
|
int wbits, wmask, wshft; |
|
|
|
|
|
|
|
int y; |
|
|
|
|
|
|
|
|
|
|
|
// discard unuseful textures
|
|
|
|
// discard unuseful textures
|
|
|
|
if( !r_ripple.value || image->width > RIPPLES_CACHEWIDTH || image->width != image->height ) |
|
|
|
if( !r_ripple.value || image->width > RIPPLES_CACHEWIDTH || image->width != image->height ) |
|
|
@ -1005,11 +1006,12 @@ void R_UploadRipples( texture_t *image ) |
|
|
|
wshft = 7 - wbits; |
|
|
|
wshft = 7 - wbits; |
|
|
|
wmask = image->width - 1; |
|
|
|
wmask = image->width - 1; |
|
|
|
|
|
|
|
|
|
|
|
for( int y = 0; y < image->height; y++ ) |
|
|
|
for( y = 0; y < image->height; y++ ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int ry = y << ( 7 + wshft ); |
|
|
|
int ry = y << ( 7 + wshft ); |
|
|
|
|
|
|
|
int x; |
|
|
|
|
|
|
|
|
|
|
|
for( int x = 0; x < image->width; x++ ) |
|
|
|
for( x = 0; x < image->width; x++ ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int rx = x << wshft; |
|
|
|
int rx = x << wshft; |
|
|
|
int val = g_ripple.curbuf[ry + rx] >> 4; |
|
|
|
int val = g_ripple.curbuf[ry + rx] >> 4; |
|
|
|