diff options
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r-- | source/blender/render/intern/raytrace/bvh.h | 8 | ||||
-rw-r--r-- | source/blender/render/intern/raytrace/reorganize.h | 6 | ||||
-rw-r--r-- | source/blender/render/intern/raytrace/vbvh.h | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/convertblender.c | 10 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 8 | ||||
-rw-r--r-- | source/blender/render/intern/source/pixelshading.c | 4 | ||||
-rw-r--r-- | source/blender/render/intern/source/rayshade.c | 36 | ||||
-rw-r--r-- | source/blender/render/intern/source/render_texture.c | 26 | ||||
-rw-r--r-- | source/blender/render/intern/source/shadbuf.c | 18 | ||||
-rw-r--r-- | source/blender/render/intern/source/shadeoutput.c | 14 | ||||
-rw-r--r-- | source/blender/render/intern/source/sunsky.c | 4 | ||||
-rw-r--r-- | source/blender/render/intern/source/volumetric.c | 2 |
12 files changed, 71 insertions, 67 deletions
diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h index d99debd6cb5..c38d9b1dcb4 100644 --- a/source/blender/render/intern/raytrace/bvh.h +++ b/source/blender/render/intern/raytrace/bvh.h @@ -99,7 +99,7 @@ static int rayobject_bb_intersect_test(const Isect *isec, const float *_bb) /* bvh tree generics */ template<class Tree> static void bvh_add(Tree *obj, RayObject *ob) { - rtbuild_add( obj->builder, ob ); + rtbuild_add(obj->builder, ob); } template<class Node> @@ -150,7 +150,7 @@ template<class Node> static inline void bvh_node_merge_bb(Node *node, float *min, float *max) { if (is_leaf(node)) { - RE_rayobject_merge_bb( (RayObject*)node, min, max); + RE_rayobject_merge_bb((RayObject *)node, min, max); } else { DO_MIN(node->bb, min); @@ -364,7 +364,7 @@ static int bvh_node_raycast(Node *node, Isect *isec) template<class Node, class HintObject> void bvh_dfs_make_hint(Node *node, LCTSHint *hint, int reserve_space, HintObject *hintObject) { - assert( hint->size + reserve_space + 1 <= RE_RAY_LCTS_MAX_SIZE ); + assert(hint->size + reserve_space + 1 <= RE_RAY_LCTS_MAX_SIZE); if (is_leaf(node)) { hint->stack[hint->size++] = (RayObject*)node; @@ -396,7 +396,7 @@ template<class Tree, int DFS_STACK_SIZE> static inline RayObject *bvh_create_tree(int size) { Tree *obj= (Tree*)MEM_callocN(sizeof(Tree), "BVHTree" ); - assert( RE_rayobject_isAligned(obj) ); /* RayObject API assumes real data to be 4-byte aligned */ + assert(RE_rayobject_isAligned(obj)); /* RayObject API assumes real data to be 4-byte aligned */ obj->rayobj.api = bvh_get_api<Tree>(DFS_STACK_SIZE); obj->root = NULL; diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h index cb557ae32c8..a47bd27d11b 100644 --- a/source/blender/render/intern/raytrace/reorganize.h +++ b/source/blender/render/intern/raytrace/reorganize.h @@ -93,11 +93,11 @@ void reorganize(Node *root) if (RE_rayobject_isAligned(node->child)) { for (Node **prev = &node->child; *prev; ) { - assert( RE_rayobject_isAligned(*prev) ); + assert(RE_rayobject_isAligned(*prev)); q.push(*prev); std::pair<float, Node*> best(FLT_MAX, root); - reorganize_find_fittest_parent( root, *prev, best ); + reorganize_find_fittest_parent(root, *prev, best); if (best.second == node) { //Already inside the fitnest BB @@ -349,7 +349,7 @@ struct OVBVHNode //Calc new childs { OVBVHNode **cut = &(this->child); - set_cut( best_cutsize, &cut ); + set_cut(best_cutsize, &cut); *cut = NULL; } diff --git a/source/blender/render/intern/raytrace/vbvh.h b/source/blender/render/intern/raytrace/vbvh.h index f916dd412f7..d8ff9000a3f 100644 --- a/source/blender/render/intern/raytrace/vbvh.h +++ b/source/blender/render/intern/raytrace/vbvh.h @@ -127,7 +127,7 @@ struct BuildBinaryVBVH Node *create_node() { Node *node = (Node*)BLI_memarena_alloc( arena, sizeof(Node) ); - assert( RE_rayobject_isAligned(node) ); + assert(RE_rayobject_isAligned(node)); node->sibling = NULL; node->child = NULL; diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 8cd31eb289f..22629764cbe 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -469,11 +469,11 @@ static void calc_tangent_vector(ObjectRen *obr, VertexTangent **vtangents, MemAr } else if (v1->orco) { uv1= uv[0]; uv2= uv[1]; uv3= uv[2]; uv4= uv[3]; - map_to_sphere( &uv[0][0], &uv[0][1], v1->orco[0], v1->orco[1], v1->orco[2]); - map_to_sphere( &uv[1][0], &uv[1][1], v2->orco[0], v2->orco[1], v2->orco[2]); - map_to_sphere( &uv[2][0], &uv[2][1], v3->orco[0], v3->orco[1], v3->orco[2]); + map_to_sphere(&uv[0][0], &uv[0][1], v1->orco[0], v1->orco[1], v1->orco[2]); + map_to_sphere(&uv[1][0], &uv[1][1], v2->orco[0], v2->orco[1], v2->orco[2]); + map_to_sphere(&uv[2][0], &uv[2][1], v3->orco[0], v3->orco[1], v3->orco[2]); if (v4) - map_to_sphere( &uv[3][0], &uv[3][1], v4->orco[0], v4->orco[1], v4->orco[2]); + map_to_sphere(&uv[3][0], &uv[3][1], v4->orco[0], v4->orco[1], v4->orco[2]); } else return; @@ -3584,7 +3584,7 @@ static void initshadowbuf(Render *re, LampRen *lar, float mat[][4]) /* if (la->spsi<16) return; */ /* memory alloc */ - shb= (struct ShadBuf *)MEM_callocN( sizeof(struct ShadBuf), "initshadbuf"); + shb= (struct ShadBuf *)MEM_callocN(sizeof(struct ShadBuf), "initshadbuf"); lar->shb= shb; if (shb==NULL) return; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index cf233f1b6cd..ff45f991dc0 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -541,7 +541,9 @@ void RE_SetWindow(Render *re, rctf *viewplane, float clipsta, float clipend) re->clipend= clipend; re->r.mode &= ~R_ORTHO; - perspective_m4( re->winmat, re->viewplane.xmin, re->viewplane.xmax, re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend); + perspective_m4(re->winmat, + re->viewplane.xmin, re->viewplane.xmax, + re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend); } @@ -554,7 +556,9 @@ void RE_SetOrtho(Render *re, rctf *viewplane, float clipsta, float clipend) re->clipend= clipend; re->r.mode |= R_ORTHO; - orthographic_m4( re->winmat, re->viewplane.xmin, re->viewplane.xmax, re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend); + orthographic_m4(re->winmat, + re->viewplane.xmin, re->viewplane.xmax, + re->viewplane.ymin, re->viewplane.ymax, re->clipsta, re->clipend); } void RE_SetView(Render *re, float mat[][4]) diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index 826a31e17a8..ac48a5f41f2 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -351,7 +351,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, rc= hashvectf + (ofs % 768); - fac= fabsf( rc[1]*(har->rad*fabsf(rc[0]) - radist) ); + fac = fabsf(rc[1] * (har->rad * fabsf(rc[0]) - radist)); if (fac< 1.0f) { ringf+= (1.0f-fac); @@ -360,7 +360,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, } if (har->type & HA_VECT) { - dist= fabsf( har->cos*(yn) - har->sin*(xn) )/har->rad; + dist= fabsf(har->cos * (yn) - har->sin * (xn)) / har->rad; if (dist>1.0f) dist= 1.0f; if (har->tex) { zn= har->sin*xn - har->cos*yn; diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 33523ab346f..c68fb578d4c 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -88,7 +88,7 @@ static int test_break(void *data) static void RE_rayobject_config_control(RayObject *r, Render *re) { if (RE_rayobject_isRayAPI(r)) { - r = RE_rayobject_align( r ); + r = RE_rayobject_align(r); r->control.data = re; r->control.test_break = test_break; } @@ -177,7 +177,7 @@ void freeraytree(Render *re) #ifdef RE_RAYCOUNTER { RayCounter sum; - memset( &sum, 0, sizeof(sum) ); + memset(&sum, 0, sizeof(sum)); int i; for (i=0; i<BLENDER_MAX_THREADS; i++) RE_RC_MERGE(&sum, re_rc_counter+i); @@ -252,17 +252,17 @@ RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi) VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255); if (is_raytraceable_vlr(re, vlr)) { if ((re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS)) { - RE_rayobject_add( raytree, RE_vlakprimitive_from_vlak( vlakprimitive, obi, vlr ) ); + RE_rayobject_add(raytree, RE_vlakprimitive_from_vlak(vlakprimitive, obi, vlr)); vlakprimitive++; } else { RE_rayface_from_vlak(face, obi, vlr); - RE_rayobject_add( raytree, RE_rayobject_unalignRayFace(face) ); + RE_rayobject_add(raytree, RE_rayobject_unalignRayFace(face)); face++; } } } - RE_rayobject_done( raytree ); + RE_rayobject_done(raytree); /* in case of cancel during build, raytree is not usable */ if (test_break(re)) @@ -355,7 +355,7 @@ static void makeraytree_single(Render *re) break; if (obj) - RE_rayobject_add( re->raytree, obj ); + RE_rayobject_add(re->raytree, obj); } else { int v; @@ -370,7 +370,7 @@ static void makeraytree_single(Render *re) if (is_raytraceable_vlr(re, vlr)) { if ((re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS)) { RayObject *obj = RE_vlakprimitive_from_vlak( vlakprimitive, obi, vlr ); - RE_rayobject_add( raytree, obj ); + RE_rayobject_add(raytree, obj); vlakprimitive++; } else { @@ -383,7 +383,7 @@ static void makeraytree_single(Render *re) mul_m4_v3(obi->mat, face->v4); } - RE_rayobject_add( raytree, RE_rayobject_unalignRayFace(face) ); + RE_rayobject_add(raytree, RE_rayobject_unalignRayFace(face)); face++; } } @@ -395,7 +395,7 @@ static void makeraytree_single(Render *re) re->i.infostr= "Raytree.. building"; re->stats_draw(re->sdh, &re->i); - RE_rayobject_done( raytree ); + RE_rayobject_done(raytree); } } @@ -424,7 +424,7 @@ void makeraytree(Render *re) //Calculate raytree max_size //This is ONLY needed to kept a bogus behavior of SUN and HEMI lights INIT_MINMAX(min, max); - RE_rayobject_merge_bb( re->raytree, min, max ); + RE_rayobject_merge_bb(re->raytree, min, max); for (i=0; i<3; i++) { min[i] += 0.01f; max[i] += 0.01f; @@ -439,7 +439,7 @@ void makeraytree(Render *re) } #ifdef RE_RAYCOUNTER - memset( re_rc_counter, 0, sizeof(re_rc_counter) ); + memset(re_rc_counter, 0, sizeof(re_rc_counter)); #endif } @@ -692,7 +692,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, con float dist_mir = origshi->mat->dist_mir; copy_v3_v3(isec.start, start); - copy_v3_v3(isec.dir, dir ); + copy_v3_v3(isec.dir, dir); isec.dist = dist_mir > 0 ? dist_mir : RE_RAYTRACE_MAXDIST; isec.mode= RE_RAY_MIRROR; isec.check = RE_CHECK_VLR_RENDER; @@ -1239,7 +1239,7 @@ static int adaptive_sample_contrast_val(int samples, float prev, float val, floa /* if the last sample's contribution to the total value was below a small threshold * (i.e. the samples taken are very similar), then taking more samples that are probably * going to be the same is wasting effort */ - if (fabsf( prev/(float)(samples-1) - val/(float)samples ) < thresh) { + if (fabsf(prev / (float)(samples - 1) - val / (float)samples ) < thresh) { return 1; } else @@ -1679,7 +1679,7 @@ static int UNUSED_FUNCTION(ray_trace_shadow_rad)(ShadeInput *ship, ShadeResult * vec[2]-= vec[2]; } - copy_v3_v3(isec.dir, vec ); + copy_v3_v3(isec.dir, vec); isec.dist = RE_RAYTRACE_MAXDIST; if (RE_rayobject_raycast(R.raytree, &isec)) { @@ -1889,7 +1889,7 @@ static void ray_ao_qmc(ShadeInput *shi, float ao[3], float env[3]) isec.lay= -1; copy_v3_v3(isec.start, shi->co); - RE_rayobject_hint_bb( R.raytree, &point_hint, isec.start, isec.start ); + RE_rayobject_hint_bb(R.raytree, &point_hint, isec.start, isec.start); isec.hint = &point_hint; zero_v3(ao); @@ -2029,7 +2029,7 @@ static void ray_ao_spheresamp(ShadeInput *shi, float ao[3], float env[3]) isec.lay= -1; copy_v3_v3(isec.start, shi->co); - RE_rayobject_hint_bb( R.raytree, &point_hint, isec.start, isec.start ); + RE_rayobject_hint_bb(R.raytree, &point_hint, isec.start, isec.start); isec.hint = &point_hint; zero_v3(ao); @@ -2237,7 +2237,7 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, const float lampco[3], for (i=0; i<totjitco; i++) { DO_MINMAX(jitco[i], min, max); } - RE_rayobject_hint_bb( R.raytree, &bb_hint, min, max); + RE_rayobject_hint_bb(R.raytree, &bb_hint, min, max); isec->hint = &bb_hint; isec->check = RE_CHECK_VLR_RENDER; @@ -2386,7 +2386,7 @@ static void ray_shadow_jitter(ShadeInput *shi, LampRen *lar, const float lampco[ copy_v3_v3(isec->start, shi->co); isec->orig.ob = shi->obi; isec->orig.face = shi->vlr; - RE_rayobject_hint_bb( R.raytree, &point_hint, isec->start, isec->start ); + RE_rayobject_hint_bb(R.raytree, &point_hint, isec->start, isec->start); isec->hint = &point_hint; while (a--) { diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index fce22c388e5..521b295fb0b 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -970,7 +970,7 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d fy = (t[1] + 1.0f) / 2.0f; } else if (wrap==MTEX_TUBE) map_to_tube( &fx, &fy, t[0], t[1], t[2]); - else if (wrap==MTEX_SPHERE) map_to_sphere( &fx, &fy, t[0], t[1], t[2]); + else if (wrap==MTEX_SPHERE) map_to_sphere(&fx, &fy, t[0], t[1], t[2]); else { if (texco==TEXCO_OBJECT) cubemap_ob(ob, n, t[0], t[1], t[2], &fx, &fy); else if (texco==TEXCO_GLOB) cubemap_glob(n, t[0], t[1], t[2], &fx, &fy); @@ -1041,20 +1041,20 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d } if (ok) { if (wrap==MTEX_TUBE) { - map_to_tube( area, area+1, t[0], t[1], t[2]); - map_to_tube( area+2, area+3, t[0]+dxt[0], t[1]+dxt[1], t[2]+dxt[2]); - map_to_tube( area+4, area+5, t[0]+dyt[0], t[1]+dyt[1], t[2]+dyt[2]); + map_to_tube(area, area+1, t[0], t[1], t[2]); + map_to_tube(area + 2, area + 3, t[0] + dxt[0], t[1] + dxt[1], t[2] + dxt[2]); + map_to_tube(area + 4, area + 5, t[0] + dyt[0], t[1] + dyt[1], t[2] + dyt[2]); } else { map_to_sphere(area, area+1, t[0], t[1], t[2]); - map_to_sphere( area+2, area+3, t[0]+dxt[0], t[1]+dxt[1], t[2]+dxt[2]); - map_to_sphere( area+4, area+5, t[0]+dyt[0], t[1]+dyt[1], t[2]+dyt[2]); + map_to_sphere(area + 2, area + 3, t[0] + dxt[0], t[1] + dxt[1], t[2] + dxt[2]); + map_to_sphere(area + 4, area + 5, t[0] + dyt[0], t[1] + dyt[1], t[2] + dyt[2]); } areaflag= 1; } else { if (wrap==MTEX_TUBE) map_to_tube( &fx, &fy, t[0], t[1], t[2]); - else map_to_sphere( &fx, &fy, t[0], t[1], t[2]); + else map_to_sphere(&fx, &fy, t[0], t[1], t[2]); dxt[0]/= 2.0f; dxt[1]/= 2.0f; dyt[0]/= 2.0f; @@ -2102,9 +2102,9 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T // generate the surface derivatives in object space mul_m3_v3(view2obj, dPdx); - mul_m3_v3( view2obj, dPdy ); + mul_m3_v3(view2obj, dPdy); // generate the unit normal in object space - mul_transposed_m3_v3( obj2view, vN ); + mul_transposed_m3_v3(obj2view, vN); normalize_v3(vN); } @@ -2126,9 +2126,9 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T fMagnitude = abs_fDet; if ( mtex->texflag & MTEX_BUMP_OBJECTSPACE ) { // pre do transform of texres->nor by the inverse transposed of obj2view - mul_transposed_m3_v3( view2obj, vN ); - mul_transposed_m3_v3( view2obj, ntap_bump->vR1 ); - mul_transposed_m3_v3( view2obj, ntap_bump->vR2 ); + mul_transposed_m3_v3(view2obj, vN); + mul_transposed_m3_v3(view2obj, ntap_bump->vR1); + mul_transposed_m3_v3(view2obj, ntap_bump->vR2); fMagnitude *= len_v3(vN); } @@ -3078,7 +3078,7 @@ void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float h case TEXCO_H_TUBEMAP: if (skyflag & WO_ZENUP) { if (mtex->texco==TEXCO_H_TUBEMAP) map_to_tube( tempvec, tempvec+1, lo[0], lo[2], lo[1]); - else map_to_sphere( tempvec, tempvec+1, lo[0], lo[2], lo[1]); + else map_to_sphere(tempvec, tempvec+1, lo[0], lo[2], lo[1]); /* tube/spheremap maps for outside view, not inside */ tempvec[0]= 1.0f-tempvec[0]; /* only top half */ diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c index 4956eedbb87..1c572524a70 100644 --- a/source/blender/render/intern/source/shadbuf.c +++ b/source/blender/render/intern/source/shadbuf.c @@ -319,7 +319,7 @@ static void compress_deepshadowbuf(Render *re, ShadBuf *shb, APixstr *apixbuf, A int a, b, c, tot, minz, found, prevtot, newtot; int sampletot[RE_MAX_OSA], totsample = 0, totsamplec = 0; - shsample= MEM_callocN( sizeof(ShadSampleBuf), "shad sample buf"); + shsample= MEM_callocN(sizeof(ShadSampleBuf), "shad sample buf"); BLI_addtail(&shb->buffers, shsample); shsample->totbuf= MEM_callocN(sizeof(int)*size*size, "deeptotbuf"); @@ -511,11 +511,11 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square) int a, x, y, minx, miny, byt1, byt2; char *rc, *rcline, *ctile, *zt; - shsample= MEM_callocN( sizeof(ShadSampleBuf), "shad sample buf"); + shsample= MEM_callocN(sizeof(ShadSampleBuf), "shad sample buf"); BLI_addtail(&shb->buffers, shsample); - shsample->zbuf= MEM_mallocN( sizeof(uintptr_t)*(size*size)/256, "initshadbuf2"); - shsample->cbuf= MEM_callocN( (size*size)/256, "initshadbuf3"); + shsample->zbuf= MEM_mallocN(sizeof(uintptr_t)*(size*size)/256, "initshadbuf2"); + shsample->cbuf= MEM_callocN((size*size)/256, "initshadbuf3"); ztile= (uintptr_t *)shsample->zbuf; ctile= shsample->cbuf; @@ -779,7 +779,7 @@ void makeshadowbuf(Render *re, LampRen *lar) shb->pixsize= (shb->d)/temp; wsize= shb->pixsize*(shb->size/2.0f); - perspective_m4( shb->winmat, -wsize, wsize, -wsize, wsize, shb->d, shb->clipend); + perspective_m4(shb->winmat, -wsize, wsize, -wsize, wsize, shb->d, shb->clipend); mult_m4_m4m4(shb->persmat, shb->winmat, shb->viewmat); if (ELEM3(lar->buftype, LA_SHADBUF_REGULAR, LA_SHADBUF_HALFWAY, LA_SHADBUF_DEEP)) { @@ -2160,8 +2160,8 @@ static int isb_add_samples(RenderPart *pa, ISBBranch *root, MemArena *memarena, int sample, bsp_err= 0; /* bsp split doesn't like to handle regular sequences */ - xcos= MEM_mallocN( pa->rectx*sizeof(int), "xcos"); - ycos= MEM_mallocN( pa->recty*sizeof(int), "ycos"); + xcos= MEM_mallocN(pa->rectx*sizeof(int), "xcos"); + ycos= MEM_mallocN(pa->recty*sizeof(int), "ycos"); for (xi=0; xi<pa->rectx; xi++) xcos[xi]= xi; for (yi=0; yi<pa->recty; yi++) @@ -2364,8 +2364,8 @@ static int isb_add_samples_transp(RenderPart *pa, ISBBranch *root, MemArena *mem int sample, bsp_err= 0; /* bsp split doesn't like to handle regular sequences */ - xcos= MEM_mallocN( pa->rectx*sizeof(int), "xcos"); - ycos= MEM_mallocN( pa->recty*sizeof(int), "ycos"); + xcos= MEM_mallocN(pa->rectx*sizeof(int), "xcos"); + ycos= MEM_mallocN(pa->recty*sizeof(int), "ycos"); for (xi=0; xi<pa->rectx; xi++) xcos[xi]= xi; for (yi=0; yi<pa->recty; yi++) diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index e74041c9006..53d06893a3f 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -550,7 +550,7 @@ static float spec(float inp, int hard) return inp; } -static float Phong_Spec( float *n, float *l, float *v, int hard, int tangent ) +static float Phong_Spec(float *n, float *l, float *v, int hard, int tangent ) { float h[3]; float rslt; @@ -638,7 +638,7 @@ static float Blinn_Spec(float *n, float *l, float *v, float refrac, float spec_p else if ( b < a && b < c ) g = b; else if ( c < a && c < b ) g = c; - p = sqrt( (double)((refrac * refrac)+(vh*vh)-1.0f) ); + p = sqrt((double)((refrac * refrac)+(vh * vh) - 1.0f)); f = (((p-vh)*(p-vh))/((p+vh)*(p+vh)))*(1+((((vh*(p+vh))-1.0f)*((vh*(p+vh))-1.0f))/(((vh*(p-vh))+1.0f)*((vh*(p-vh))+1.0f)))); ang = saacos(nh); @@ -649,7 +649,7 @@ static float Blinn_Spec(float *n, float *l, float *v, float refrac, float spec_p } /* cartoon render spec */ -static float Toon_Spec( float *n, float *l, float *v, float size, float smooth, int tangent) +static float Toon_Spec(float *n, float *l, float *v, float size, float smooth, int tangent) { float h[3]; float ang; @@ -673,7 +673,7 @@ static float Toon_Spec( float *n, float *l, float *v, float size, float smooth, } /* Ward isotropic gaussian spec */ -static float WardIso_Spec( float *n, float *l, float *v, float rms, int tangent) +static float WardIso_Spec(float *n, float *l, float *v, float rms, int tangent) { float i, nh, nv, nl, h[3], angle, alpha; @@ -705,7 +705,7 @@ static float WardIso_Spec( float *n, float *l, float *v, float rms, int tangent) } /* cartoon render diffuse */ -static float Toon_Diff( float *n, float *l, float *UNUSED(v), float size, float smooth ) +static float Toon_Diff(float *n, float *l, float *UNUSED(v), float size, float smooth) { float rslt, ang; @@ -754,12 +754,12 @@ static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough Lit_B[0] = l[0] - (realnl * n[0]); Lit_B[1] = l[1] - (realnl * n[1]); Lit_B[2] = l[2] - (realnl * n[2]); - normalize_v3( Lit_B ); + normalize_v3(Lit_B); View_B[0] = v[0] - (nv * n[0]); View_B[1] = v[1] - (nv * n[1]); View_B[2] = v[2] - (nv * n[2]); - normalize_v3( View_B ); + normalize_v3(View_B); t = Lit_B[0]*View_B[0] + Lit_B[1]*View_B[1] + Lit_B[2]*View_B[2]; if ( t < 0 ) t = 0; diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c index 5f274e379ad..5d0e7c1d4c8 100644 --- a/source/blender/render/intern/source/sunsky.c +++ b/source/blender/render/intern/source/sunsky.c @@ -340,7 +340,7 @@ static void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3]) for (i = 0; i < 3; i++) { // Rayleigh Scattering - fTauR = expf( -m * 0.008735f * powf(fLambda[i], (float)(-4.08f))); + fTauR = expf(-m * 0.008735f * powf(fLambda[i], (float)(-4.08f))); // Aerosal (water + dust) attenuation fTauA = exp(-m * fBeta * powf(fLambda[i], -fAlpha)); @@ -434,7 +434,7 @@ void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float r * s, is distance * rgb, contains rendered color value for a pixle * */ -void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float rgb[3]) +void AtmospherePixleShader(struct SunSky* sunSky, float view[3], float s, float rgb[3]) { float costheta; float Phase_1; diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index e63c9b7b4dd..c51cb2af842 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -97,7 +97,7 @@ static float vol_get_shadow(ShadeInput *shi, LampRen *lar, const float co[3]) } else { sub_v3_v3v3(is.dir, lar->co, is.start); - is.dist = normalize_v3( is.dir ); + is.dist = normalize_v3(is.dir ); } is.mode = RE_RAY_MIRROR; |