diff options
Diffstat (limited to 'source/blender/render/intern/source/renderdatabase.c')
-rw-r--r-- | source/blender/render/intern/source/renderdatabase.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c index afe4d5c7e35..0c5ad0475ab 100644 --- a/source/blender/render/intern/source/renderdatabase.c +++ b/source/blender/render/intern/source/renderdatabase.c @@ -446,7 +446,7 @@ VlakRen *RE_vlakren_copy(ObjectRen *obr, VlakRen *vlr) return vlr1; } -void RE_vlakren_get_normal(Render *re, ObjectInstanceRen *obi, VlakRen *vlr, float *nor) +void RE_vlakren_get_normal(Render *UNUSED(re), ObjectInstanceRen *obi, VlakRen *vlr, float *nor) { float (*nmat)[3]= obi->nmat; @@ -943,13 +943,13 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f float tin, tr, tg, tb, ta; float xn, yn, zn, texvec[3], hoco[4], hoco1[4]; - if(hasize==0.0) return NULL; + if(hasize==0.0f) return NULL; projectverto(vec, re->winmat, hoco); - if(hoco[3]==0.0) return NULL; + if(hoco[3]==0.0f) return NULL; if(vec1) { projectverto(vec1, re->winmat, hoco1); - if(hoco1[3]==0.0) return NULL; + if(hoco1[3]==0.0f) return NULL; } har= RE_findOrAddHalo(obr, obr->tothalo++); @@ -959,8 +959,8 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f /* actual projectvert is done in function project_renderdata() because of parts/border/pano */ /* we do it here for sorting of halos */ zn= hoco[3]; - har->xs= 0.5*re->winx*(hoco[0]/zn); - har->ys= 0.5*re->winy*(hoco[1]/zn); + har->xs= 0.5f*re->winx*(hoco[0]/zn); + har->ys= 0.5f*re->winy*(hoco[1]/zn); har->zs= 0x7FFFFF*(hoco[2]/zn); har->zBufDist = 0x7FFFFFFF*(hoco[2]/zn); @@ -970,16 +970,16 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f har->type |= HA_VECT; - xn= har->xs - 0.5*re->winx*(hoco1[0]/hoco1[3]); - yn= har->ys - 0.5*re->winy*(hoco1[1]/hoco1[3]); - if(xn==0.0 || (xn==0.0 && yn==0.0)) zn= 0.0; + xn= har->xs - 0.5f*re->winx*(hoco1[0]/hoco1[3]); + yn= har->ys - 0.5f*re->winy*(hoco1[1]/hoco1[3]); + if(xn==0.0f || (xn==0.0f && yn==0.0f)) zn= 0.0f; else zn= atan2(yn, xn); har->sin= sin(zn); har->cos= cos(zn); zn= len_v3v3(vec1, vec); - har->hasize= vectsize*zn + (1.0-vectsize)*hasize; + har->hasize= vectsize*zn + (1.0f-vectsize)*hasize; sub_v3_v3v3(har->no, vec, vec1); normalize_v3(har->no); @@ -991,7 +991,7 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f har->r= ma->r; har->g= ma->g; har->b= ma->b; - har->add= (255.0*ma->add); + har->add= (255.0f*ma->add); har->mat= ma; har->hard= ma->har; har->seed= seed % 256; @@ -1032,7 +1032,7 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f zn= tin*mtex->alphafac; if(mtex->mapto & MAP_COL) { - zn= 1.0-yn; + zn= 1.0f-yn; har->r= (yn*tr+ zn*ma->r); har->g= (yn*tg+ zn*ma->g); har->b= (yn*tb+ zn*ma->b); @@ -1057,13 +1057,13 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater float xn, yn, zn, texvec[3], hoco[4], hoco1[4], in[3],tex[3],out[3]; int i, hasrgb; - if(hasize==0.0) return NULL; + if(hasize==0.0f) return NULL; projectverto(vec, re->winmat, hoco); - if(hoco[3]==0.0) return NULL; + if(hoco[3]==0.0f) return NULL; if(vec1) { projectverto(vec1, re->winmat, hoco1); - if(hoco1[3]==0.0) return NULL; + if(hoco1[3]==0.0f) return NULL; } har= RE_findOrAddHalo(obr, obr->tothalo++); @@ -1073,8 +1073,8 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater /* actual projectvert is done in function project_renderdata() because of parts/border/pano */ /* we do it here for sorting of halos */ zn= hoco[3]; - har->xs= 0.5*re->winx*(hoco[0]/zn); - har->ys= 0.5*re->winy*(hoco[1]/zn); + har->xs= 0.5f*re->winx*(hoco[0]/zn); + har->ys= 0.5f*re->winy*(hoco[1]/zn); har->zs= 0x7FFFFF*(hoco[2]/zn); har->zBufDist = 0x7FFFFFFF*(hoco[2]/zn); @@ -1084,16 +1084,16 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater har->type |= HA_VECT; - xn= har->xs - 0.5*re->winx*(hoco1[0]/hoco1[3]); - yn= har->ys - 0.5*re->winy*(hoco1[1]/hoco1[3]); - if(xn==0.0 || (xn==0.0 && yn==0.0)) zn= 0.0; + xn= har->xs - 0.5f*re->winx*(hoco1[0]/hoco1[3]); + yn= har->ys - 0.5f*re->winy*(hoco1[1]/hoco1[3]); + if(xn==0.0f || (xn==0.0f && yn==0.0f)) zn= 0.0; else zn= atan2(yn, xn); har->sin= sin(zn); har->cos= cos(zn); - zn= len_v3v3(vec1, vec)*0.5; + zn= len_v3v3(vec1, vec)*0.5f; - har->hasize= vectsize*zn + (1.0-vectsize)*hasize; + har->hasize= vectsize*zn + (1.0f-vectsize)*hasize; sub_v3_v3v3(har->no, vec, vec1); normalize_v3(har->no); @@ -1105,7 +1105,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater har->r= ma->r; har->g= ma->g; har->b= ma->b; - har->add= (255.0*ma->add); + har->add= (255.0f*ma->add); har->mat= ma; har->hard= ma->har; har->seed= seed % 256; @@ -1185,13 +1185,13 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater if(mtex->mapto & MAP_ALPHA) har->alfa = texture_value_blend(mtex->def_var,har->alfa,tin,mtex->alphafac,mtex->blendtype); if(mtex->mapto & MAP_HAR) - har->hard = 1.0+126.0*texture_value_blend(mtex->def_var,((float)har->hard)/127.0,tin,mtex->hardfac,mtex->blendtype); + har->hard = 1.0f+126.0f*texture_value_blend(mtex->def_var,((float)har->hard)/127.0f,tin,mtex->hardfac,mtex->blendtype); if(mtex->mapto & MAP_RAYMIRR) - har->hasize = 100.0*texture_value_blend(mtex->def_var,har->hasize/100.0,tin,mtex->raymirrfac,mtex->blendtype); + har->hasize = 100.0f*texture_value_blend(mtex->def_var,har->hasize/100.0f,tin,mtex->raymirrfac,mtex->blendtype); if(mtex->mapto & MAP_TRANSLU) { - float add = texture_value_blend(mtex->def_var,(float)har->add/255.0,tin,mtex->translfac,mtex->blendtype); + float add = texture_value_blend(mtex->def_var,(float)har->add/255.0f,tin,mtex->translfac,mtex->blendtype); CLAMP(add, 0.f, 1.f); - har->add = 255.0*add; + har->add = 255.0f*add; } /* now what on earth is this good for?? */ //if(mtex->texco & 16) { @@ -1238,7 +1238,7 @@ static int panotestclip(Render *re, int do_pano, float *v) - shadow buffering (shadbuf.c) */ -void project_renderdata(Render *re, void (*projectfunc)(float *, float mat[][4], float *), int do_pano, float xoffs, int do_buckets) +void project_renderdata(Render *re, void (*projectfunc)(float *, float mat[][4], float *), int do_pano, float xoffs, int UNUSED(do_buckets)) { ObjectRen *obr; HaloRen *har = NULL; @@ -1270,24 +1270,24 @@ void project_renderdata(Render *re, void (*projectfunc)(float *, float mat[][4], projectfunc(vec, re->winmat, hoco); /* we clip halos less critical, but not for the Z */ - hoco[0]*= 0.5; - hoco[1]*= 0.5; + hoco[0]*= 0.5f; + hoco[1]*= 0.5f; if( panotestclip(re, do_pano, hoco) ) { har->miny= har->maxy= -10000; /* that way render clips it */ } - else if(hoco[3]<0.0) { + else if(hoco[3]<0.0f) { har->miny= har->maxy= -10000; /* render clips it */ } else /* do the projection...*/ { /* bring back hocos */ - hoco[0]*= 2.0; - hoco[1]*= 2.0; + hoco[0]*= 2.0f; + hoco[1]*= 2.0f; zn= hoco[3]; - har->xs= 0.5*re->winx*(1.0+hoco[0]/zn); /* the 0.5 negates the previous 2...*/ - har->ys= 0.5*re->winy*(1.0+hoco[1]/zn); + har->xs= 0.5f*re->winx*(1.0f+hoco[0]/zn); /* the 0.5 negates the previous 2...*/ + har->ys= 0.5f*re->winy*(1.0f+hoco[1]/zn); /* this should be the zbuffer coordinate */ har->zs= 0x7FFFFF*(hoco[2]/zn); @@ -1298,11 +1298,11 @@ void project_renderdata(Render *re, void (*projectfunc)(float *, float mat[][4], projectfunc(vec, re->winmat, hoco); vec[0]-= har->hasize; zn= hoco[3]; - har->rad= fabs(har->xs- 0.5*re->winx*(1.0+hoco[0]/zn)); + har->rad= fabsf(har->xs- 0.5f*re->winx*(1.0f+hoco[0]/zn)); /* this clip is not really OK, to prevent stars to become too large */ if(har->type & HA_ONLYSKY) { - if(har->rad>3.0) har->rad= 3.0; + if(har->rad>3.0f) har->rad= 3.0f; } har->radsq= har->rad*har->rad; |