forked from bartvdbraak/blender
remove normalize call in derived mesh GetNormal, its not done anywhere else.
This commit is contained in:
parent
1860c0c565
commit
ee2ddfc58a
@ -2558,7 +2558,6 @@ static void GetNormal(const SMikkTSpaceContext * pContext, float fNorm[], const
|
||||
else {
|
||||
const short *no= pMesh->mvert[(&pMesh->mface[face_num].v1)[vert_index]].no;
|
||||
normal_short_to_float_v3(fNorm, no);
|
||||
normalize_v3(fNorm); /* XXX, is this needed */
|
||||
}
|
||||
}
|
||||
static void SetTSpace(const SMikkTSpaceContext * pContext, const float fvTangent[], const float fSign, const int face_num, const int iVert)
|
||||
|
@ -172,11 +172,7 @@ static void cdDM_getVertCos(DerivedMesh *dm, float (*cos_r)[3])
|
||||
static void cdDM_getVertNo(DerivedMesh *dm, int index, float no_r[3])
|
||||
{
|
||||
CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
|
||||
short *no = cddm->mvert[index].no;
|
||||
|
||||
no_r[0] = no[0]/32767.f;
|
||||
no_r[1] = no[1]/32767.f;
|
||||
no_r[2] = no[2]/32767.f;
|
||||
normal_short_to_float_v3(no_r, cddm->mvert[index].no);
|
||||
}
|
||||
|
||||
static ListBase *cdDM_getFaceMap(Object *ob, DerivedMesh *dm)
|
||||
|
@ -424,14 +424,14 @@ MINLINE float normalize_v3(float n[3])
|
||||
return normalize_v3_v3(n, n);
|
||||
}
|
||||
|
||||
MINLINE void normal_short_to_float_v3(float *out, const short *in)
|
||||
MINLINE void normal_short_to_float_v3(float out[3], const short in[3])
|
||||
{
|
||||
out[0] = in[0]*(1.0f/32767.0f);
|
||||
out[1] = in[1]*(1.0f/32767.0f);
|
||||
out[2] = in[2]*(1.0f/32767.0f);
|
||||
}
|
||||
|
||||
MINLINE void normal_float_to_short_v3(short *out, const float *in)
|
||||
MINLINE void normal_float_to_short_v3(short out[3], const float in[3])
|
||||
{
|
||||
out[0] = (short)(in[0]*32767.0f);
|
||||
out[1] = (short)(in[1]*32767.0f);
|
||||
|
Loading…
Reference in New Issue
Block a user