mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2025-02-02 05:32:14 +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 )
|
static void RB_CalcDeformNormals( const deformStage_t* ds )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
double scale;
|
float scale;
|
||||||
double *xyz = ( double * ) tess.xyz;
|
const float *xyz = ( const float * ) tess.xyz;
|
||||||
float *normal = ( float * ) tess.normal;
|
float *normal = ( float * ) tess.normal;
|
||||||
|
|
||||||
for ( i = 0; i < tess.numVertexes; i++, xyz += 4, normal += 4 ) {
|
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,
|
scale = R_NoiseGet4f( xyz[0] * scale, xyz[1] * scale, xyz[2] * scale,
|
||||||
tess.shaderTime * ds->deformationWave.frequency );
|
tess.shaderTime * ds->deformationWave.frequency );
|
||||||
normal[ 0 ] += ds->deformationWave.amplitude * scale;
|
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,
|
scale = R_NoiseGet4f( 100 + xyz[0] * scale, xyz[1] * scale, xyz[2] * scale,
|
||||||
tess.shaderTime * ds->deformationWave.frequency );
|
tess.shaderTime * ds->deformationWave.frequency );
|
||||||
normal[ 1 ] += ds->deformationWave.amplitude * scale;
|
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,
|
scale = R_NoiseGet4f( 200 + xyz[0] * scale, xyz[1] * scale, xyz[2] * scale,
|
||||||
tess.shaderTime * ds->deformationWave.frequency );
|
tess.shaderTime * ds->deformationWave.frequency );
|
||||||
normal[ 2 ] += ds->deformationWave.amplitude * scale;
|
normal[ 2 ] += ds->deformationWave.amplitude * scale;
|
||||||
|
|
Loading…
Reference in a new issue