ISO C90 fix

This commit is contained in:
M.G. Kishalmi
2011-01-29 12:09:11 +00:00
parent 50d434f2f4
commit 28e91fcd28

View File

@@ -1899,10 +1899,7 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
TexResult ttexr = {0, 0, 0, 0, 0, texres->talpha, NULL}; // temp TexResult
const int fromrgb = ((tex->type == TEX_IMAGE) || ((tex->flag & TEX_COLORBAND)!=0));
// TODO: solve this Hscale issue more elegantly.
float Hscale = 0.1f * Tnor*mtex->norfac; // factor 0.1 proved to look like the previous bump code
if( mtex->texflag & MTEX_BUMP_TEXTURESPACE )
Hscale *= 130.0f;
// 2 channels for 2D texture and 3 for 3D textures.
const int nr_channels = (mtex->texco == TEXCO_UV)? 2 : 3;
@@ -1913,6 +1910,10 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
float *nvec = texres->nor;
texres->nor = NULL;
// TODO: solve this Hscale issue more elegantly.
if( mtex->texflag & MTEX_BUMP_TEXTURESPACE )
Hscale *= 130.0f;
if(!(mtex->texflag & MTEX_5TAP_BUMP)) {
// compute height derivatives with respect to output image pixel coordinates x and y
float STll[3], STlr[3], STul[3];