mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
fixed RB_CalcDeformNormals from accessing floats as doubles, which was breaking the rendering of flags and probably many other things
This commit is contained in:
parent
1efd5b6d82
commit
ddb6f080f3
1 changed files with 6 additions and 6 deletions
|
@ -160,22 +160,22 @@ static void RB_CalcDeformVertexes( const deformStage_t* ds )
|
|||
static void RB_CalcDeformNormals( const deformStage_t* ds )
|
||||
{
|
||||
int i;
|
||||
double scale;
|
||||
double *xyz = ( double * ) tess.xyz;
|
||||
float *normal = ( float * ) tess.normal;
|
||||
float scale;
|
||||
const float *xyz = ( const float * ) tess.xyz;
|
||||
float *normal = ( float * ) tess.normal;
|
||||
|
||||
for ( i = 0; i < tess.numVertexes; i++, xyz += 4, normal += 4 ) {
|
||||
scale = 0.98;
|
||||
scale = 0.98f;
|
||||
scale = R_NoiseGet4f( xyz[0] * scale, xyz[1] * scale, xyz[2] * scale,
|
||||
tess.shaderTime * ds->deformationWave.frequency );
|
||||
normal[ 0 ] += ds->deformationWave.amplitude * scale;
|
||||
|
||||
scale = 0.98;
|
||||
scale = 0.98f;
|
||||
scale = R_NoiseGet4f( 100 + xyz[0] * scale, xyz[1] * scale, xyz[2] * scale,
|
||||
tess.shaderTime * ds->deformationWave.frequency );
|
||||
normal[ 1 ] += ds->deformationWave.amplitude * scale;
|
||||
|
||||
scale = 0.98;
|
||||
scale = 0.98f;
|
||||
scale = R_NoiseGet4f( 200 + xyz[0] * scale, xyz[1] * scale, xyz[2] * scale,
|
||||
tess.shaderTime * ds->deformationWave.frequency );
|
||||
normal[ 2 ] += ds->deformationWave.amplitude * scale;
|
||||
|
|
Loading…
Reference in a new issue