Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-21 09:46:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-21 09:46:41 +0400
commitf3ece5a108db0bdbefb4663ef4ebd9a7e039e263 (patch)
treecb6329453be169ef1ec49ef8b8d50a6b14364880 /source/blender/render
parenta1a0c8da13a7b91b0264c7535752864379f3d852 (diff)
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/extern/include/RE_pipeline.h2
-rw-r--r--source/blender/render/intern/include/render_types.h2
-rw-r--r--source/blender/render/intern/include/shadbuf.h18
-rw-r--r--source/blender/render/intern/raytrace/bvh.h2
-rw-r--r--source/blender/render/intern/raytrace/rayobject_blibvh.cpp4
-rw-r--r--source/blender/render/intern/raytrace/rayobject_instance.cpp2
-rw-r--r--source/blender/render/intern/raytrace/rayobject_internal.h2
-rw-r--r--source/blender/render/intern/raytrace/rayobject_qbvh.cpp2
-rw-r--r--source/blender/render/intern/raytrace/rayobject_raycounter.cpp4
-rw-r--r--source/blender/render/intern/raytrace/rayobject_rtbuild.cpp14
-rw-r--r--source/blender/render/intern/raytrace/rayobject_vbvh.cpp4
-rw-r--r--source/blender/render/intern/raytrace/reorganize.h20
-rw-r--r--source/blender/render/intern/raytrace/svbvh.h4
-rw-r--r--source/blender/render/intern/raytrace/vbvh.h2
-rw-r--r--source/blender/render/intern/source/convertblender.c30
-rw-r--r--source/blender/render/intern/source/envmap.c6
-rw-r--r--source/blender/render/intern/source/gammaCorrectionTables.c8
-rw-r--r--source/blender/render/intern/source/imagetexture.c6
-rw-r--r--source/blender/render/intern/source/occlusion.c2
-rw-r--r--source/blender/render/intern/source/pipeline.c10
-rw-r--r--source/blender/render/intern/source/pixelshading.c2
-rw-r--r--source/blender/render/intern/source/pointdensity.c4
-rw-r--r--source/blender/render/intern/source/rayshade.c20
-rw-r--r--source/blender/render/intern/source/render_texture.c24
-rw-r--r--source/blender/render/intern/source/rendercore.c18
-rw-r--r--source/blender/render/intern/source/renderdatabase.c8
-rw-r--r--source/blender/render/intern/source/shadbuf.c20
-rw-r--r--source/blender/render/intern/source/shadeinput.c4
-rw-r--r--source/blender/render/intern/source/shadeoutput.c18
-rw-r--r--source/blender/render/intern/source/strand.c2
-rw-r--r--source/blender/render/intern/source/sunsky.c4
-rw-r--r--source/blender/render/intern/source/volume_precache.c4
-rw-r--r--source/blender/render/intern/source/volumetric.c6
-rw-r--r--source/blender/render/intern/source/voxeldata.c6
-rw-r--r--source/blender/render/intern/source/zbuf.c18
35 files changed, 151 insertions, 151 deletions
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h
index a29994a430d..7777a220512 100644
--- a/source/blender/render/extern/include/RE_pipeline.h
+++ b/source/blender/render/extern/include/RE_pipeline.h
@@ -83,7 +83,7 @@ typedef struct RenderLayer {
/* copy of RenderData */
char name[RE_MAXNAME];
unsigned int lay, lay_zmask, lay_exclude;
- int layflag, passflag, pass_xor;
+ int layflag, passflag, pass_xor;
struct Material *mat_override;
struct Group *light_override;
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 8474d9ff09e..1e62ab6d14d 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -128,7 +128,7 @@ struct Render
/* if render with single-layer option, other rendered layers are stored here */
RenderResult *pushedresult;
/* a list of RenderResults, for fullsample */
- ListBase fullresult;
+ ListBase fullresult;
/* read/write mutex, all internal code that writes to re->result must use a
* write lock, all external code must use a read lock. internal code is assumed
* to not conflict with writes, so no lock used for that */
diff --git a/source/blender/render/intern/include/shadbuf.h b/source/blender/render/intern/include/shadbuf.h
index 5cde8e5106a..7c168baada7 100644
--- a/source/blender/render/intern/include/shadbuf.h
+++ b/source/blender/render/intern/include/shadbuf.h
@@ -79,19 +79,19 @@ float ISB_getshadow(ShadeInput *shi, ShadBuf *shb);
/* buffer samples, allocated in camera buffer and pointed to in lampbuffer nodes */
typedef struct ISBSample {
- float zco[3]; /* coordinate in lampview projection */
- short *shadfac; /* initialized zero = full lighted */
- int obi; /* object for face lookup */
- int facenr; /* index in faces list */
+ float zco[3]; /* coordinate in lampview projection */
+ short *shadfac; /* initialized zero = full lighted */
+ int obi; /* object for face lookup */
+ int facenr; /* index in faces list */
} ISBSample;
/* transparent version of buffer sample */
typedef struct ISBSampleA {
- float zco[3]; /* coordinate in lampview projection */
- short *shadfac; /* NULL = full lighted */
- int obi; /* object for face lookup */
- int facenr; /* index in faces list */
- struct ISBSampleA *next; /* in end, we want the first items to align with ISBSample */
+ float zco[3]; /* coordinate in lampview projection */
+ short *shadfac; /* NULL = full lighted */
+ int obi; /* object for face lookup */
+ int facenr; /* index in faces list */
+ struct ISBSampleA *next; /* in end, we want the first items to align with ISBSample */
} ISBSampleA;
/* used for transparent storage only */
diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h
index 103c04a590f..47d3a892e84 100644
--- a/source/blender/render/intern/raytrace/bvh.h
+++ b/source/blender/render/intern/raytrace/bvh.h
@@ -91,7 +91,7 @@ static inline int rayobject_bb_intersect_test(const Isect *isec, const float *_b
if (t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return 0;
if (t2x < 0.0f || t2y < 0.0f || t2z < 0.0f) return 0;
if (t1x > isec->dist || t1y > isec->dist || t1z > isec->dist) return 0;
- RE_RC_COUNT(isec->raycounter->bb.hit);
+ RE_RC_COUNT(isec->raycounter->bb.hit);
return 1;
}
diff --git a/source/blender/render/intern/raytrace/rayobject_blibvh.cpp b/source/blender/render/intern/raytrace/rayobject_blibvh.cpp
index 2d642a0a0d8..198577f61c6 100644
--- a/source/blender/render/intern/raytrace/rayobject_blibvh.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_blibvh.cpp
@@ -79,7 +79,7 @@ typedef struct BVHObject {
RayObject *RE_rayobject_blibvh_create(int size)
{
BVHObject *obj = (BVHObject *)MEM_callocN(sizeof(BVHObject), "BVHObject");
- 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_api;
obj->bvh = BLI_bvhtree_new(size, 0.0, 4, 6);
@@ -137,7 +137,7 @@ static void RE_rayobject_blibvh_add(RayObject *o, RayObject *ob)
DO_MIN(min_max, obj->bb[0]);
DO_MAX(min_max + 3, obj->bb[1]);
- BLI_bvhtree_insert(obj->bvh, obj->next_leaf - obj->leafs, min_max, 2);
+ BLI_bvhtree_insert(obj->bvh, obj->next_leaf - obj->leafs, min_max, 2);
*(obj->next_leaf++) = ob;
}
diff --git a/source/blender/render/intern/raytrace/rayobject_instance.cpp b/source/blender/render/intern/raytrace/rayobject_instance.cpp
index c3e761ae069..f797f7a4311 100644
--- a/source/blender/render/intern/raytrace/rayobject_instance.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_instance.cpp
@@ -59,7 +59,7 @@ static RayObjectAPI instance_api =
RE_rayobject_instance_free,
RE_rayobject_instance_bb,
RE_rayobject_instance_cost,
- RE_rayobject_instance_hint_bb
+ RE_rayobject_instance_hint_bb
};
typedef struct InstanceRayObject {
diff --git a/source/blender/render/intern/raytrace/rayobject_internal.h b/source/blender/render/intern/raytrace/rayobject_internal.h
index 07672f7bfb2..92ac39909a8 100644
--- a/source/blender/render/intern/raytrace/rayobject_internal.h
+++ b/source/blender/render/intern/raytrace/rayobject_internal.h
@@ -50,7 +50,7 @@ typedef int (*RE_rayobjectcontrol_test_break_callback)(void *data);
typedef struct RayObjectControl {
void *data;
- RE_rayobjectcontrol_test_break_callback test_break;
+ RE_rayobjectcontrol_test_break_callback test_break;
} RayObjectControl;
/* Returns true if for some reason a heavy processing function should stop
diff --git a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
index 16d70297a34..33ce3bd33d5 100644
--- a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
@@ -68,7 +68,7 @@ void bvh_done<QBVHTree>(QBVHTree *obj)
//Build and optimize the tree
//TODO do this in 1 pass (half memory usage during building)
- VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1, &obj->rayobj.control).transform(obj->builder);
+ VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1, &obj->rayobj.control).transform(obj->builder);
if (RE_rayobjectcontrol_test_break(&obj->rayobj.control)) {
BLI_memarena_free(arena1);
diff --git a/source/blender/render/intern/raytrace/rayobject_raycounter.cpp b/source/blender/render/intern/raytrace/rayobject_raycounter.cpp
index 7d86b6cf8cb..5335bf50cbc 100644
--- a/source/blender/render/intern/raytrace/rayobject_raycounter.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_raycounter.cpp
@@ -43,10 +43,10 @@ void RE_RC_INFO(RayCounter *info)
printf("\n");
printf("BB tests: %llu\n", info->bb.test );
printf("BB hits: %llu\n", info->bb.hit );
- printf("\n");
+ printf("\n");
printf("SIMD BB tests: %llu\n", info->simd_bb.test );
printf("SIMD BB hits: %llu\n", info->simd_bb.hit );
- printf("\n");
+ printf("\n");
printf("Primitives tests: %llu\n", info->faces.test );
printf("Primitives hits: %llu\n", info->faces.hit );
printf("------------------------------------\n");
diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
index 678aa8e5634..3ca21e14e4e 100644
--- a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
@@ -77,7 +77,7 @@ RTBuilder *rtbuild_create(int size)
for (int i = 0; i < 3; i++) {
builder->sorted_begin[i] = (RTBuilder::Object **)MEM_mallocN(sizeof(RTBuilder::Object *) * size, "RTBuilder.sorted_objects");
builder->sorted_end[i] = builder->sorted_begin[i];
- }
+ }
return builder;
@@ -224,7 +224,7 @@ int rtbuild_mean_split(RTBuilder *b, int nchilds, int axis)
Mleafs_per_child = s / nchilds;
mleafs_per_child = Mleafs_per_child / nchilds;
- //split min leafs per child
+ //split min leafs per child
b->child_offset[0] = 0;
for (i = 1; i <= nchilds; i++)
b->child_offset[i] = mleafs_per_child;
@@ -295,7 +295,7 @@ int rtbuild_median_split(RTBuilder *b, float *separators, int nchilds, int axis)
return rtbuild_mean_split(b, nchilds, axis);
return nchilds;
- }
+ }
}
int rtbuild_median_split_largest_axis(RTBuilder *b, int nchilds)
@@ -324,7 +324,7 @@ struct SweepCost {
/* Object Surface Area Heuristic splitter */
int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds)
{
- int size = rtbuild_size(b);
+ int size = rtbuild_size(b);
assert(nchilds == 2);
assert(size > 1);
int baxis = -1, boffset = 0;
@@ -429,7 +429,7 @@ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds)
for (int i = 0; i < 3; i++)
std::stable_partition(b->sorted_begin[i], b->sorted_end[i], selected_node);
- return nchilds;
+ return nchilds;
}
/*
@@ -494,7 +494,7 @@ int bb_largest_axis(const float min[3], const float max[3])
return 1;
else
return 2;
- }
+ }
}
/* only returns 0 if merging inner and outerbox would create a box larger than outer box */
@@ -508,5 +508,5 @@ int bb_fits_inside(const float outer_min[3], const float outer_max[3],
for (i = 0; i < 3; i++)
if (outer_max[i] < inner_max[i]) return 0;
- return 1;
+ return 1;
}
diff --git a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
index 85c9d0d402f..d03bdb74407 100644
--- a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
@@ -112,7 +112,7 @@ void bvh_done<VBVHTree>(VBVHTree *obj)
//Finds the optimal packing of this tree using a given cost model
//TODO this uses quite a lot of memory, find ways to reduce memory usage during building
- OVBVHNode *root = BuildBinaryVBVH<OVBVHNode>(arena2).transform(obj->builder);
+ OVBVHNode *root = BuildBinaryVBVH<OVBVHNode>(arena2).transform(obj->builder);
VBVH_optimalPackSIMD<OVBVHNode, PackCost>(PackCost()).transform(root);
obj->root = Reorganize_VBVH<OVBVHNode>(arena1).transform(root);
@@ -125,7 +125,7 @@ void bvh_done<VBVHTree>(VBVHTree *obj)
obj->builder = NULL;
obj->node_arena = arena1;
- obj->cost = 1.0;
+ obj->cost = 1.0;
}
template<int StackSize>
diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h
index a9ed71a76bc..9d9711eee56 100644
--- a/source/blender/render/intern/raytrace/reorganize.h
+++ b/source/blender/render/intern/raytrace/reorganize.h
@@ -75,7 +75,7 @@ void reorganize_find_fittest_parent(Node *tree, Node *node, std::pair<float, Nod
float pcost = bb_area(parent->bb, parent->bb + 3);
cost = std::min(cost, std::make_pair(pcost, parent) );
for (Node *child = parent->child; child; child = child->sibling)
- q.push(child);
+ q.push(child);
}
}
}
@@ -140,7 +140,7 @@ void remove_useless(Node *node, Node **new_node)
(*prev)->sibling = next;
prev = &((*prev)->sibling);
}
- }
+ }
}
if (node->child) {
if (RE_rayobject_isAligned(node->child) && node->child->sibling == 0)
@@ -181,7 +181,7 @@ void pushup(Node *parent)
*prev = child;
prev = &(*prev)->sibling;
child = *prev;
- }
+ }
}
for (Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling)
@@ -205,13 +205,13 @@ void pushup_simd(Node *parent)
n += (cn - 1);
append_sibling(child, child->child);
child = child->sibling;
- *prev = child;
+ *prev = child;
}
else {
*prev = child;
prev = &(*prev)->sibling;
child = *prev;
- }
+ }
}
for (Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling)
@@ -320,7 +320,7 @@ struct OVBVHNode {
/*
* Reorganize the node based on calculated cut costs
- */
+ */
int best_cutsize;
void set_cut(int cutsize, OVBVHNode ***cut)
{
@@ -357,7 +357,7 @@ struct OVBVHNode {
//Optimize new childs
for (OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling)
child->optimize();
- }
+ }
}
};
@@ -431,7 +431,7 @@ struct VBVH_optimalPackSIMD {
current_size -= bt[j][current_size];
}
}
- }
+ }
}
};
@@ -493,6 +493,6 @@ struct VBVH_optimalPackSIMD {
if ((G.debug & G_DEBUG) && first) printf("expected cost = %f (%d)\n", node->cut_cost[0], node->best_cutsize);
node->optimize();
}
- return node;
- }
+ return node;
+ }
};
diff --git a/source/blender/render/intern/raytrace/svbvh.h b/source/blender/render/intern/raytrace/svbvh.h
index 4fdf3ac23e8..a515b986d77 100644
--- a/source/blender/render/intern/raytrace/svbvh.h
+++ b/source/blender/render/intern/raytrace/svbvh.h
@@ -96,7 +96,7 @@ static int svbvh_bb_intersect_test(const Isect *isec, const float *_bb)
if (t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return 0;
if (t1x > isec->dist || t1y > isec->dist || t1z > isec->dist) return 0;
- RE_RC_COUNT(isec->raycounter->bb.hit);
+ RE_RC_COUNT(isec->raycounter->bb.hit);
return 1;
}
@@ -307,7 +307,7 @@ struct Reorganize_SVBVH {
prepare_for_simd(node);
return node;
- }
+ }
};
#endif /* __SSE__ */
diff --git a/source/blender/render/intern/raytrace/vbvh.h b/source/blender/render/intern/raytrace/vbvh.h
index ec671f95c76..9755bf89668 100644
--- a/source/blender/render/intern/raytrace/vbvh.h
+++ b/source/blender/render/intern/raytrace/vbvh.h
@@ -233,6 +233,6 @@ struct Reorganize_VBVH {
*child_ptr = 0;
return node;
- }
+ }
};
#endif
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 50d2515169b..ea3673c28f8 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -227,7 +227,7 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void),
hlfrand = 2.0 * dblrand;
if (initfunc) {
- initfunc();
+ initfunc();
}
if (re) /* add render object for stars */
@@ -364,7 +364,7 @@ static void split_v_renderfaces(ObjectRen *obr, int startvlak, int UNUSED(startv
if (v==0) {
vlr->v1 = RE_vertren_copy(obr, vlr->v1);
- }
+ }
}
}
}
@@ -882,7 +882,7 @@ static void autosmooth(Render *UNUSED(re), ObjectRen *obr, float mat[][4], int d
else
normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co);
}
- }
+ }
}
/* ------------------------------------------------------------------------- */
@@ -1939,7 +1939,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
copy_v3_v3(state.vel, (cache+k)->vel);
}
else
- continue;
+ continue;
if (k > 0)
curlen += len_v3v3((cache+k-1)->co, (cache+k)->co);
@@ -2367,7 +2367,7 @@ static void displace_render_face(Render *re, ObjectRen *obr, VlakRen *vlr, float
/* Recalculate the face normal - if flipped before, flip now */
if (vlr->v4) {
normal_quad_v3(vlr->n, vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
- }
+ }
else {
normal_tri_v3(vlr->n, vlr->v3->co, vlr->v2->co, vlr->v1->co);
}
@@ -2536,7 +2536,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
copy_v3_v3(v1->co, data); data += 3;
if (orco) {
v1->orco= orco; orco+= 3; orcoret++;
- }
+ }
mul_m4_v3(mat, v1->co);
for (v = 1; v < sizev; v++) {
@@ -2544,7 +2544,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
copy_v3_v3(ver->co, data); data += 3;
if (orco) {
ver->orco= orco; orco+= 3; orcoret++;
- }
+ }
mul_m4_v3(mat, ver->co);
}
/* if V-cyclic, add extra vertices at end of the row */
@@ -2554,8 +2554,8 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
if (orco) {
ver->orco= orco; orco+=3; orcoret++; //orcobase + 3*(u*sizev + 0);
}
- }
- }
+ }
+ }
/* Done before next loop to get corner vert */
if (dl->flag & DL_CYCL_U) nsizev++;
@@ -2608,7 +2608,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
p1++; p2++; p3++; p4++;
}
- }
+ }
/* fix normals for U resp. V cyclic faces */
sizeu--; sizev--; /* dec size for face array */
if (dl->flag & DL_CYCL_V) {
@@ -3616,22 +3616,22 @@ static void area_lamp_vectors(LampRen *lar)
/* corner vectors */
lar->area[0][0]= lar->co[0] - xsize*lar->mat[0][0] - ysize*lar->mat[1][0];
lar->area[0][1]= lar->co[1] - xsize*lar->mat[0][1] - ysize*lar->mat[1][1];
- lar->area[0][2]= lar->co[2] - xsize*lar->mat[0][2] - ysize*lar->mat[1][2];
+ lar->area[0][2]= lar->co[2] - xsize*lar->mat[0][2] - ysize*lar->mat[1][2];
/* corner vectors */
lar->area[1][0]= lar->co[0] - xsize*lar->mat[0][0] + ysize*lar->mat[1][0];
lar->area[1][1]= lar->co[1] - xsize*lar->mat[0][1] + ysize*lar->mat[1][1];
- lar->area[1][2]= lar->co[2] - xsize*lar->mat[0][2] + ysize*lar->mat[1][2];
+ lar->area[1][2]= lar->co[2] - xsize*lar->mat[0][2] + ysize*lar->mat[1][2];
/* corner vectors */
lar->area[2][0]= lar->co[0] + xsize*lar->mat[0][0] + ysize*lar->mat[1][0];
lar->area[2][1]= lar->co[1] + xsize*lar->mat[0][1] + ysize*lar->mat[1][1];
- lar->area[2][2]= lar->co[2] + xsize*lar->mat[0][2] + ysize*lar->mat[1][2];
+ lar->area[2][2]= lar->co[2] + xsize*lar->mat[0][2] + ysize*lar->mat[1][2];
/* corner vectors */
lar->area[3][0]= lar->co[0] + xsize*lar->mat[0][0] - ysize*lar->mat[1][0];
lar->area[3][1]= lar->co[1] + xsize*lar->mat[0][1] - ysize*lar->mat[1][1];
- lar->area[3][2]= lar->co[2] + xsize*lar->mat[0][2] - ysize*lar->mat[1][2];
+ lar->area[3][2]= lar->co[2] + xsize*lar->mat[0][2] - ysize*lar->mat[1][2];
/* only for correction button size, matrix size works on energy */
lar->areasize= lar->dist*lar->dist/(4.0f*xsize*ysize);
}
@@ -5594,7 +5594,7 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned
re->i.infostr= "Calculating next frame vectors";
database_fromscene_vectors(re, sce, lay, +1);
- }
+ }
/* copy away vertex info */
copy_dbase_object_vectors(re, &newtable);
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index 910307f370b..f01f37019a0 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -76,7 +76,7 @@ static void envmap_split_ima(EnvMap *env, ImBuf *ibuf)
BLI_lock_thread(LOCK_IMAGE);
if (env->cube[1] == NULL) {
- BKE_free_envmapdata(env);
+ BKE_free_envmapdata(env);
dx = ibuf->y;
dx /= 2;
@@ -120,7 +120,7 @@ static void envmap_split_ima(EnvMap *env, ImBuf *ibuf)
IMB_float_from_rect(env->cube[1]);
}
}
- }
+ }
BLI_unlock_thread(LOCK_IMAGE);
}
@@ -576,7 +576,7 @@ void make_envmaps(Render *re)
re->display_init(re->dih, re->result);
re->display_clear(re->dch, re->result);
// re->flag |= R_REDRAW_PRV;
- }
+ }
/* restore */
re->r.mode |= trace;
diff --git a/source/blender/render/intern/source/gammaCorrectionTables.c b/source/blender/render/intern/source/gammaCorrectionTables.c
index 1c2613e8d18..8efdf472232 100644
--- a/source/blender/render/intern/source/gammaCorrectionTables.c
+++ b/source/blender/render/intern/source/gammaCorrectionTables.c
@@ -107,13 +107,13 @@ void makeGammaTables(float gamma)
color_step = 1.0 / RE_GAMMA_TABLE_SIZE;
inv_color_step = (float) RE_GAMMA_TABLE_SIZE;
- /* We could squeeze out the two range tables to gain some memory. */
+ /* We could squeeze out the two range tables to gain some memory. */
for (i = 0; i < RE_GAMMA_TABLE_SIZE; i++) {
- color_domain_table[i] = i * color_step;
+ color_domain_table[i] = i * color_step;
gamma_range_table[i] = pow(color_domain_table[i],
- valid_gamma);
+ valid_gamma);
inv_gamma_range_table[i] = pow(color_domain_table[i],
- valid_inv_gamma);
+ valid_inv_gamma);
}
/* The end of the table should match 1.0 carefully. In order to avoid */
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index e491b00ae85..64cd62ee98b 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -102,7 +102,7 @@ static void ibuf_get_color(float col[4], struct ImBuf *ibuf, int x, int y)
col[1] = ((float)rect[1])*(1.0f/255.0f);
col[2] = ((float)rect[2])*(1.0f/255.0f);
col[3] = ((float)rect[3])*(1.0f/255.0f);
- }
+ }
}
int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResult *texres)
@@ -209,7 +209,7 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResul
if (tex->imaflag & TEX_USEALPHA) {
if ((tex->imaflag & TEX_CALCALPHA) == 0) {
texres->talpha = TRUE;
- }
+ }
}
/* interpolate */
@@ -1011,7 +1011,7 @@ static void image_mipmap_test(Tex *tex, ImBuf *ibuf)
if (ibuf->userflags & IB_MIPMAP_INVALID) {
IMB_remakemipmap(ibuf, tex->imaflag & TEX_GAUSS_MIP);
ibuf->userflags &= ~IB_MIPMAP_INVALID;
- }
+ }
BLI_unlock_thread(LOCK_IMAGE);
}
if (ibuf->mipmap[0] == NULL) {
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c
index 895c5d6c8fb..ed0ae950aa3 100644
--- a/source/blender/render/intern/source/occlusion.c
+++ b/source/blender/render/intern/source/occlusion.c
@@ -1130,7 +1130,7 @@ static void normalizef(float *n)
n[0] *= d;
n[1] *= d;
n[2] *= d;
- }
+ }
}
/* TODO: exact duplicate of ff_quad_form_factor() in math_geom.c
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 869a9d59444..fdaf366b148 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -499,7 +499,7 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer *
}
/* always call, checks for gamma, gamma tables and jitter too */
- make_sample_tables(re);
+ make_sample_tables(re);
/* if preview render, we try to keep old result */
BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
@@ -984,7 +984,7 @@ static void addblur_rect_key(RenderResult *rr, float *rectf, float *rectf1, floa
rf[1] = mfac * rf[1] + blurfac * rf1[1];
rf[2] = mfac * rf[2] + blurfac * rf1[2];
rf[3] = mfac * rf[3] + blurfac * rf1[3];
- }
+ }
}
}
rectf += stride;
@@ -1076,7 +1076,7 @@ static void do_render_blur_3d(Render *re)
/* weak... the display callback wants an active renderlayer pointer... */
re->result->renlay = render_get_active_layer(re, re->result);
- re->display_draw(re->ddh, re->result, NULL);
+ re->display_draw(re->ddh, re->result, NULL);
}
@@ -1567,7 +1567,7 @@ static void do_render_composite_fields_blur_3d(Render *re)
ntreeFreeCache(ntree);
do_render_fields_blur_3d(re);
- }
+ }
else {
/* ensure new result gets added, like for regular renders */
BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
@@ -2140,7 +2140,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
IMB_freeImBuf(ibuf);
printf("Append frame %d", scene->r.cfra);
- }
+ }
else {
if (name_override)
BLI_strncpy(name, name_override, sizeof(name));
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index 8e6078b18e0..c4df041a5ae 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -614,7 +614,7 @@ void shadeSkyPixel(float collector[4], float fx, float fy, short thread)
copy_v3_v3(collector, &R.wrld.horr);
collector[3] = 0.0f;
- }
+ }
else {
/* 2. */
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index f8462dcd888..a540cdb85d5 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -171,7 +171,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
pd->point_data[i*3 + 0] = state.vel[0];
pd->point_data[i*3 + 1] = state.vel[1];
pd->point_data[i*3 + 2] = state.vel[2];
- }
+ }
if (data_used & POINT_DATA_LIFE) {
float pa_time;
@@ -419,7 +419,7 @@ int pointdensitytex(Tex *tex, const float texvec[3], TexResult *texres)
texres->tin = 0.0f;
- if ((!pd) || (!pd->point_tree))
+ if ((!pd) || (!pd->point_tree))
return 0;
init_pointdensityrangedata(pd, &pdr, &density, vec, &age,
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 260a80d70e9..042803c150e 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -239,7 +239,7 @@ RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi)
if (faces == 0)
return NULL;
- //Create Ray cast accelaration structure
+ //Create Ray cast accelaration structure
raytree = RE_rayobject_create( re, re->r.raytrace_structure, faces );
if ( (re->r.raytrace_options & R_RAYTRACE_USE_LOCAL_COORDS) )
vlakprimitive = obr->rayprimitives = (VlakPrimitive*)MEM_callocN(faces*sizeof(VlakPrimitive), "ObjectRen primitives");
@@ -549,7 +549,7 @@ void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr)
/* raytrace likes to separate the spec color */
sub_v3_v3v3(shr->diff, shr->combined, shr->spec);
- }
+ }
}
@@ -632,7 +632,7 @@ static float shade_by_transmission(Isect *is, ShadeInput *shi, ShadeResult *shr)
if (shi->mat->tx_limit <= 0.0f) {
d= 1.0f;
- }
+ }
else {
float p;
@@ -733,7 +733,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, con
if (depth>0) {
float fr, fg, fb, f, f1;
- if ((shi.mat->mode_l & MA_TRANSP) && shr.alpha < 1.0f && (shi.mat->mode_l & (MA_ZTRANSP | MA_RAYTRANSP))) {
+ if ((shi.mat->mode_l & MA_TRANSP) && shr.alpha < 1.0f && (shi.mat->mode_l & (MA_ZTRANSP | MA_RAYTRANSP))) {
float nf, f, refract[3], tracol[4];
tracol[0]= shi.r;
@@ -938,7 +938,7 @@ void init_jitter_plane(LampRen *lar)
DP_energy(lar->jitter, fp, tot, lar->area_size, lar->area_sizey);
}
}
- }
+ }
/* create the dithered tables (could just check lamp type!) */
jitter_plane_offset(lar->jitter, lar->jitter+2*tot, tot, lar->area_size, lar->area_sizey, 0.5f, 0.0f);
jitter_plane_offset(lar->jitter, lar->jitter+4*tot, tot, lar->area_size, lar->area_sizey, 0.5f, 0.5f);
@@ -1151,7 +1151,7 @@ static void QMC_sampleHemiCosine(float vec[3], QMCSampler *qsa, int thread, int
QMC_getSample(s, qsa, thread, num);
- phi = s[0]*2.f*M_PI;
+ phi = s[0]*2.f*M_PI;
sqr = s[1]*sqrt(2-s[1]*s[1]);
vec[0] = cos(phi)*sqr;
@@ -1295,7 +1295,7 @@ static void trace_refract(float col[4], ShadeInput *shi, ShadeResult *shr)
max_samples = 1;
- while (samples < max_samples) {
+ while (samples < max_samples) {
if (refraction(v_refract, shi->vn, shi->view, shi->ang)) {
traflag |= RAY_INSIDE;
}
@@ -1822,7 +1822,7 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys, in
}
return sphere;
- }
+ }
else {
float *sphere;
float *vec1;
@@ -1847,7 +1847,7 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys, in
for (a=0; a<tot; a++, vec+=3, vec1+=3) {
vec1[0]= cost*cosfi*vec[0] - sinfi*vec[1] + sint*cosfi*vec[2];
vec1[1]= cost*sinfi*vec[0] + cosfi*vec[1] + sint*sinfi*vec[2];
- vec1[2]= -sint*vec[0] + cost*vec[2];
+ vec1[2]= -sint*vec[0] + cost*vec[2];
}
}
return sphere;
@@ -1981,7 +1981,7 @@ static void ray_ao_qmc(ShadeInput *shi, float ao[3], float env[3])
samples++;
if (qsa && qsa->type == SAMP_TYPE_HALTON) {
- /* adaptive sampling - consider samples below threshold as in shadow (or vice versa) and exit early */
+ /* adaptive sampling - consider samples below threshold as in shadow (or vice versa) and exit early */
if (adapt_thresh > 0.0f && (samples > max_samples/2) ) {
if (adaptive_sample_contrast_val(samples, prev, fac, adapt_thresh)) {
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 167e91272e2..dc99ee02a19 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -303,7 +303,7 @@ static float tex_tri(float a)
/* computes basic wood intensity value at x,y,z */
static float wood_int(Tex *tex, float x, float y, float z)
{
- float wi=0;
+ float wi = 0;
short wf = tex->noisebasis2; /* wave form: TEX_SIN=0, TEX_SAW=1, TEX_TRI=2 */
short wt = tex->stype; /* wood type: TEX_BAND=0, TEX_RING=1, TEX_BANDNOISE=2, TEX_RINGNOISE=3 */
@@ -374,7 +374,7 @@ static float marble_int(Tex *tex, float x, float y, float z)
mi = waveform[wf](mi);
if (mt==TEX_SHARP) {
mi = sqrt(mi);
- }
+ }
else if (mt==TEX_SHARPER) {
mi = sqrt(sqrt(mi));
}
@@ -494,7 +494,7 @@ static int stucci(Tex *tex, const float texvec[3], TexResult *texres)
if (tex->stype) ofs*=(b2*b2);
nor[0] = BLI_gNoise(tex->noisesize, texvec[0]+ofs, texvec[1], texvec[2], (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis);
- nor[1] = BLI_gNoise(tex->noisesize, texvec[0], texvec[1]+ofs, texvec[2], (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis);
+ nor[1] = BLI_gNoise(tex->noisesize, texvec[0], texvec[1]+ofs, texvec[2], (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis);
nor[2] = BLI_gNoise(tex->noisesize, texvec[0], texvec[1], texvec[2]+ofs, (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis);
texres->tin= nor[2];
@@ -769,7 +769,7 @@ static int cubemap_glob(const float n[3], float x, float y, float z, float *adr1
else {
*adr1 = (y + 1.0f) / 2.0f;
*adr2 = (z + 1.0f) / 2.0f;
- ret= 2;
+ ret= 2;
}
return ret;
}
@@ -824,8 +824,8 @@ static int cubemap(MTex *mtex, VlakRen *vlr, const float n[3], float x, float y,
*adr1 = (y + 1.0f) / 2.0f;
*adr2 = (z + 1.0f) / 2.0f;
ret= 2;
- }
- }
+ }
+ }
else {
return cubemap_glob(n, x, y, z, adr1, adr2);
}
@@ -862,7 +862,7 @@ static int cubemap_ob(Object *ob, const float n[3], float x, float y, float z, f
else {
*adr1 = (y + 1.0f) / 2.0f;
*adr2 = (z + 1.0f) / 2.0f;
- ret= 2;
+ ret= 2;
}
return ret;
}
@@ -971,7 +971,7 @@ static void do_2d_mapping(MTex *mtex, float texvec[3], VlakRen *vlr, const float
map_to_tube(area + 2, area + 3, texvec[0] + dxt[0], texvec[1] + dxt[1], texvec[2] + dxt[2]);
map_to_tube(area + 4, area + 5, texvec[0] + dyt[0], texvec[1] + dyt[1], texvec[2] + dyt[2]);
}
- else {
+ else {
map_to_sphere(area, area+1, texvec[0], texvec[1], texvec[2]);
map_to_sphere(area + 2, area + 3, texvec[0] + dxt[0], texvec[1] + dxt[1], texvec[2] + dxt[2]);
map_to_sphere(area + 4, area + 5, texvec[0] + dyt[0], texvec[1] + dyt[1], texvec[2] + dyt[2]);
@@ -2664,8 +2664,8 @@ void do_volume_tex(ShadeInput *shi, const float *xyz, int mapto_flag, float col_
copy_v3_v3(co, xyz);
if (mtex->texflag & MTEX_OB_DUPLI_ORIG) {
if (shi->obi && shi->obi->duplitexmat)
- mul_m4_v3(shi->obi->duplitexmat, co);
- }
+ mul_m4_v3(shi->obi->duplitexmat, co);
+ }
mul_m4_v3(ob->imat_ren, co);
if (mtex->texflag & MTEX_MAPTO_BOUNDS && ob->bb) {
@@ -3078,7 +3078,7 @@ void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float h
break;
}
- /* placement */
+ /* placement */
if (mtex->projx) texvec[0]= mtex->size[0]*(co[mtex->projx-1]+mtex->ofs[0]);
else texvec[0]= mtex->size[0]*(mtex->ofs[0]);
@@ -3241,7 +3241,7 @@ void do_lamp_tex(LampRen *la, const float lavec[3], ShadeInput *shi, float col_r
}
co= tempvec;
- dx= dxt; dy= dyt;
+ dx= dxt; dy= dyt;
if (shi->osatex) {
copy_v3_v3(dxt, shi->dxlv);
copy_v3_v3(dyt, shi->dylv);
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 0bfbed8e58c..a83a76796b9 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -671,7 +671,7 @@ int get_sample_layers(RenderPart *pa, RenderLayer *rl, RenderLayer **rlpp)
RenderResult *rr= BLI_findlink(&pa->fullresult, sample);
rlpp[sample]= BLI_findlink(&rr->layers, nr);
- }
+ }
return R.osa;
}
else {
@@ -714,7 +714,7 @@ static void sky_tile(RenderPart *pa, RenderLayer *rl)
addAlphaUnderFloat(pass, col);
}
}
- }
+ }
}
if (y&1)
@@ -772,8 +772,8 @@ static void atm_tile(RenderPart *pa, RenderLayer *rl)
if (*zrect >= 9.9e10f || rgbrect[3]==0.0f) {
continue;
}
-
- if ((lar->sunsky->effect_type & LA_SUN_EFFECT_AP)) {
+
+ if ((lar->sunsky->effect_type & LA_SUN_EFFECT_AP)) {
float tmp_rgb[3];
/* skip if worldspace lamp vector is below horizon */
@@ -928,7 +928,7 @@ static void addps(ListBase *lb, intptr_t *rd, int obi, int facenr, int z, int ma
PixStrMain *psm;
PixStr *ps, *last= NULL;
- if (*rd) {
+ if (*rd) {
ps= (PixStr *)(*rd);
while (ps) {
@@ -2012,7 +2012,7 @@ void add_halo_flare(Render *re)
re->display_draw(re->ddh, rr, NULL);
}
- R.r.mode= mode;
+ R.r.mode= mode;
}
/* ************************* bake ************************ */
@@ -2474,7 +2474,7 @@ static int get_next_bake_face(BakeShade *bs)
return 0;
}
- BLI_lock_thread(LOCK_CUSTOM1);
+ BLI_lock_thread(LOCK_CUSTOM1);
for (; obi; obi=obi->next, v=0) {
obr= obi->obr;
@@ -2520,7 +2520,7 @@ static int get_next_bake_face(BakeShade *bs)
/* might be read by UI to set active image for display */
R.bakebuf= ima;
- }
+ }
bs->obi= obi;
bs->vlr= vlr;
@@ -2557,7 +2557,7 @@ static void shade_tface(BakeShade *bs)
/* note, these calls only free/fill contents of zspan struct, not zspan itself */
zbuf_free_span(bs->zspan);
zbuf_alloc_span(bs->zspan, bs->ibuf->x, bs->ibuf->y, R.clipcrop);
- }
+ }
bs->rectx= bs->ibuf->x;
bs->recty= bs->ibuf->y;
diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c
index 1721741d64d..886f266b22f 100644
--- a/source/blender/render/intern/source/renderdatabase.c
+++ b/source/blender/render/intern/source/renderdatabase.c
@@ -244,7 +244,7 @@ VertRen *RE_findOrAddVert(ObjectRen *obr, int nr)
memset(obr->vertnodes+obr->vertnodeslen, 0, TABLEINITSIZE*sizeof(VertTableNode));
obr->vertnodeslen+=TABLEINITSIZE;
- if (temp) MEM_freeN(temp);
+ if (temp) MEM_freeN(temp);
}
v= obr->vertnodes[a].vert;
@@ -487,7 +487,7 @@ VlakRen *RE_findOrAddVlak(ObjectRen *obr, int nr)
memset(obr->vlaknodes+obr->vlaknodeslen, 0, TABLEINITSIZE*sizeof(VlakTableNode));
obr->vlaknodeslen+=TABLEINITSIZE; /*Does this really need to be power of 2?*/
- if (temp) MEM_freeN(temp);
+ if (temp) MEM_freeN(temp);
}
v= obr->vlaknodes[a].vlak;
@@ -658,7 +658,7 @@ StrandRen *RE_findOrAddStrand(ObjectRen *obr, int nr)
memset(obr->strandnodes+obr->strandnodeslen, 0, TABLEINITSIZE*sizeof(StrandTableNode));
obr->strandnodeslen+=TABLEINITSIZE; /*Does this really need to be power of 2?*/
- if (temp) MEM_freeN(temp);
+ if (temp) MEM_freeN(temp);
}
v= obr->strandnodes[a].strand;
@@ -892,7 +892,7 @@ HaloRen *RE_findOrAddHalo(ObjectRen *obr, int nr)
if (temp) memcpy(obr->bloha, temp, obr->blohalen*sizeof(void*));
memset(&(obr->bloha[obr->blohalen]), 0, TABLEINITSIZE*sizeof(void*));
obr->blohalen+=TABLEINITSIZE; /*Does this really need to be power of 2?*/
- if (temp) MEM_freeN(temp);
+ if (temp) MEM_freeN(temp);
}
h= obr->bloha[a];
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index bed3fb5f754..ce89ebd4c34 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -89,7 +89,7 @@ extern struct Render R;
static void copy_to_ztile(int *rectz, int size, int x1, int y1, int tile, char *r1)
{
- int len4, *rz;
+ int len4, *rz;
int x2, y2;
x2= x1+tile;
@@ -528,21 +528,21 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
for (y=0; y<size; y+=16) {
if (y< size/2) miny= y+15-size/2;
- else miny= y-size/2;
+ else miny= y-size/2;
for (x=0; x<size; x+=16) {
/* is tile within spotbundle? */
a= size/2;
if (x< a) minx= x+15-a;
- else minx= x-a;
+ else minx= x-a;
dist= sqrt( (float)(minx*minx+miny*miny) );
if (square==0 && dist>(float)(a+12)) { /* 12, tested with a onlyshadow lamp */
a= 256; verg= 0; /* 0x80000000; */ /* 0x7FFFFFFF; */
rz1= (&verg)+1;
- }
+ }
else {
copy_to_ztile(rectz, size, x, y, 16, rcline);
rz1= (int *)rcline;
@@ -669,8 +669,8 @@ static void shadowbuf_autoclip(Render *re, LampRen *lar)
clipflag[vlr->v2->index]= 1;
clipflag[vlr->v3->index]= 1;
if (vlr->v4) clipflag[vlr->v4->index]= 1;
- }
- }
+ }
+ }
/* calculate min and max */
for (a=0; a< obr->totvert;a++) {
@@ -1867,7 +1867,7 @@ static void isb_bsp_recalc_box(ISBBranch *root)
init_box(&root->box);
for (a=root->totsamp-1; a>=0; a--)
bound_boxf(&root->box, root->samples[a]->zco);
- }
+ }
}
/* callback function for zbuf clip */
@@ -2040,7 +2040,7 @@ static void isb_bsp_fillfaces(Render *re, LampRen *lar, ISBBranch *root)
if (vlr->v4)
c4= testclip(hoco[3]);
- /* ***** NO WIRE YET */
+ /* ***** NO WIRE YET */
if (ma->material_type == MA_TYPE_WIRE) {
if (vlr->v4)
zbufclipwire(&zspan, i, a+1, vlr->ec, hoco[0], hoco[1], hoco[2], hoco[3], c1, c2, c3, c4);
@@ -2187,7 +2187,7 @@ static int isb_add_samples(RenderPart *pa, ISBBranch *root, MemArena *memarena,
}
if (bsp_err) break;
}
- }
+ }
MEM_freeN(xcos);
MEM_freeN(ycos);
@@ -2394,7 +2394,7 @@ static int isb_add_samples_transp(RenderPart *pa, ISBBranch *root, MemArena *mem
}
if (bsp_err) break;
}
- }
+ }
MEM_freeN(xcos);
MEM_freeN(ycos);
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 36e9f4cb785..db93a21de2d 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -236,7 +236,7 @@ void vlr_set_uv_indices(VlakRen *vlr, int *i1, int *i2, int *i3)
/* 1---2 1---2 0 = orig face, 1 = new face */
/* Update vert nums to point to correct verts of original face */
- if (vlr->flag & R_DIVIDE_24) {
+ if (vlr->flag & R_DIVIDE_24) {
if (vlr->flag & R_FACE_SPLIT) {
(*i1)++; (*i2)++; (*i3)++;
}
@@ -777,7 +777,7 @@ void shade_input_set_uv(ShadeInput *shi)
CLAMP(shi->u, -2.0f, 1.0f);
CLAMP(shi->v, -2.0f, 1.0f);
}
- }
+ }
}
void shade_input_set_normals(ShadeInput *shi)
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 51a1edf4de9..f1665a3a9cd 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -114,7 +114,7 @@ static void fogcolor(const float colf[3], float *rco, float *view)
addAlphaOverFloat(colf, hor);
sub_v3_v3(vec, dview);
- }
+ }
}
#endif
@@ -168,7 +168,7 @@ float mistfactor(float zcor, float const co[3])
}
}
- return (1.0f-fac)* (1.0f-R.wrld.misi);
+ return (1.0f-fac)* (1.0f-R.wrld.misi);
}
static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens)
@@ -228,7 +228,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens)
}
}
- /* scale z to make sure volume is normalized */
+ /* scale z to make sure volume is normalized */
nray[2] *= (double)lar->sh_zfac;
/* nray does not need normalization */
@@ -548,7 +548,7 @@ static float spec(float inp, int hard)
b1= inp*inp;
/* avoid FPE */
- if (b1<0.01f) b1= 0.01f;
+ if (b1<0.01f) b1= 0.01f;
if ((hard & 1)==0) inp= 1.0f;
if (hard & 2) inp*= b1;
@@ -561,7 +561,7 @@ static float spec(float inp, int hard)
b1*= b1;
/* avoid FPE */
- if (b1<0.001f) b1= 0.0f;
+ if (b1<0.001f) b1= 0.0f;
if (hard & 32) inp*= b1;
b1*= b1;
@@ -569,7 +569,7 @@ static float spec(float inp, int hard)
b1*= b1;
if (hard & 128) inp*=b1;
- if (b1<0.001f) b1= 0.0f;
+ if (b1<0.001f) b1= 0.0f;
if (hard & 256) {
b1*= b1;
@@ -1317,7 +1317,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
if (lar->mode & LA_TEXTURE) do_lamp_tex(lar, lv, shi, lacol, LA_TEXTURE);
if (lar->mode & LA_SHAD_TEX) do_lamp_tex(lar, lv, shi, lashdw, LA_SHAD_TEX);
- /* tangent case; calculate fake face normal, aligned with lampvector */
+ /* tangent case; calculate fake face normal, aligned with lampvector */
/* note, vnor==vn is used as tangent trigger for buffer shadow */
if (vlr->flag & R_TANGENT) {
float cross[3], nstrand[3], blend;
@@ -1637,7 +1637,7 @@ static void shade_lamp_loop_only_shadow(ShadeInput *shi, ShadeResult *shr)
}
}
- /* quite disputable this... also note it doesn't mirror-raytrace */
+ /* quite disputable this... also note it doesn't mirror-raytrace */
if ((R.wrld.mode & (WO_AMB_OCC|WO_ENV_LIGHT)) && shi->amb!=0.0f) {
float f;
@@ -1845,7 +1845,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
}
}
- if (shi->combinedflag & SCE_PASS_SHADOW)
+ if (shi->combinedflag & SCE_PASS_SHADOW)
copy_v3_v3(shr->combined, shr->shad); /* note, no ';' ! */
else
copy_v3_v3(shr->combined, shr->diff);
diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c
index dc3225b7f09..6e2e97b95de 100644
--- a/source/blender/render/intern/source/strand.c
+++ b/source/blender/render/intern/source/strand.c
@@ -545,7 +545,7 @@ static void do_strand_fillac(void *handle, int x, int y, float u, float v, float
bufferz= 0x7FFFFFFF;
if (spart->rectmask) maskz= 0x7FFFFFFF;
- if (*rd) {
+ if (*rd) {
for (ps= (PixStr *)(*rd); ps; ps= ps->next) {
if (mask & ps->mask) {
bufferz= ps->z;
diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c
index 1288b0305b1..4f57a046d68 100644
--- a/source/blender/render/intern/source/sunsky.c
+++ b/source/blender/render/intern/source/sunsky.c
@@ -330,8 +330,8 @@ static void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3])
int i;
float fLambda[3];
- fLambda[0] = 0.65f;
- fLambda[1] = 0.57f;
+ fLambda[0] = 0.65f;
+ fLambda[1] = 0.57f;
fLambda[2] = 0.475f;
fAlpha = 1.3f;
diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c
index fb7ea38ef68..8757be740f3 100644
--- a/source/blender/render/intern/source/volume_precache.c
+++ b/source/blender/render/intern/source/volume_precache.c
@@ -270,7 +270,7 @@ BLI_INLINE int ms_I(int x, int y, int z, int *n) /* has a pad of 1 voxel surroun
BLI_INLINE int v_I_pad(int x, int y, int z, int *n) /* has a pad of 1 voxel surrounding the core for boundary simulation */
{
/* same ordering to light cache, with padding */
- return z*(n[1]+2)*(n[0]+2) + y*(n[0]+2) + x;
+ return z*(n[1]+2)*(n[0]+2) + y*(n[0]+2) + x;
}
BLI_INLINE int lc_to_ms_I(int x, int y, int z, int *n)
@@ -389,7 +389,7 @@ static void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Materi
const int j = ms_I(x, y, z, n); //ms index
time= PIL_check_seconds_timer();
- c++;
+ c++;
if (vp->data_r[i] > 0.0f)
sr[j] += vp->data_r[i];
if (vp->data_g[i] > 0.0f)
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index 220fcd3e986..fe4cff76093 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -76,7 +76,7 @@ static float vol_get_shadow(ShadeInput *shi, LampRen *lar, const float co[3])
if (lar->shb) {
float dxco[3] = {0.f, 0.f, 0.f}, dyco[3] = {0.f, 0.f, 0.f};
- visibility = testshadowbuf(&R, lar->shb, co, dxco, dyco, 1.0, 0.0);
+ visibility = testshadowbuf(&R, lar->shb, co, dxco, dyco, 1.0, 0.0);
}
else if (lar->mode & LA_SHAD_RAY) {
/* trace shadow manually, no good lamp api atm */
@@ -205,7 +205,7 @@ static void vol_trace_behind(ShadeInput *shi, VlakRen *vlr, const float co[3], f
else {
shadeSkyView(col_r, co, shi->view, NULL, shi->thread);
shadeSunView(col_r, shi->view);
- }
+ }
}
@@ -221,7 +221,7 @@ static void vol_get_precached_scattering(Render *re, ShadeInput *shi, float scat
/* find sample point in global space bounding box 0.0-1.0 */
global_bounds_obi(re, shi->obi, bbmin, bbmax);
sub_v3_v3v3(dim, bbmax, bbmin);
- mul_v3_m4v3(world_co, re->viewinv, co);
+ mul_v3_m4v3(world_co, re->viewinv, co);
/* sample_co in 0.0-1.0 */
sample_co[0] = (world_co[0] - bbmin[0]) / dim[0];
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index 7eccacb816d..e73c0397c6b 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -414,7 +414,7 @@ void make_voxeldata(struct Render *re)
int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texres)
{
- VoxelData *vd = tex->vd;
+ VoxelData *vd = tex->vd;
float co[3], offset[3] = {0.5, 0.5, 0.5}, a;
int retval = (vd->data_type == TEX_VD_RGBA_PREMUL) ? TEX_RGB : TEX_INT;
int depth = (vd->data_type == TEX_VD_RGBA_PREMUL) ? 4 : 1;
@@ -482,7 +482,7 @@ int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texre
break;
case TEX_VD_LINEAR:
*result = BLI_voxel_sample_trilinear(dataset, vd->resol, co);
- break;
+ break;
case TEX_VD_QUADRATIC:
*result = BLI_voxel_sample_triquadratic(dataset, vd->resol, co);
break;
@@ -515,5 +515,5 @@ int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texre
texres->ta = texres->tin;
BRICONTRGB;
- return retval;
+ return retval;
}
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 87d710511a8..4d91a7d9d11 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -409,7 +409,7 @@ static void zbuffillAc4(ZSpan *zspan, int obi, int zvlnr,
if (apn->p[3]==zvlnr && apn->obi[3]==obi) {apn->mask[3]|= mask; break; }
if (apn->next==NULL) apn->next= addpsA(zspan);
apn= apn->next;
- }
+ }
}
}
zverg+= zxd;
@@ -501,7 +501,7 @@ static void zbuflineAc(ZSpan *zspan, int obi, int zvlnr, const float vec1[3], co
if (apn->p[3]==zvlnr && apn->obi[3]==obi) {apn->mask[3]|= mask; break; }
if (apn->next==0) apn->next= addpsA(zspan);
apn= apn->next;
- }
+ }
}
}
}
@@ -572,7 +572,7 @@ static void zbuflineAc(ZSpan *zspan, int obi, int zvlnr, const float vec1[3], co
if (apn->p[3]==zvlnr) {apn->mask[3]|= mask; break; }
if (apn->next==0) apn->next= addpsA(zspan);
apn= apn->next;
- }
+ }
}
}
}
@@ -1624,7 +1624,7 @@ static void clippyra(float *labda, float *v1, float *v2, int *b2, int *b3, int a
else {
dw= clipcrop*(v2[3]-v1[3]);
v13= clipcrop*v1[3];
- }
+ }
/* according the original article by Liang&Barsky, for clipping of
* homogeneous coordinates with viewplane, the value of "0" is used instead of "-w" .
* This differs from the other clipping cases (like left or top) and I considered
@@ -1682,7 +1682,7 @@ static void makevertpyra(float *vez, float *labda, float **trias, float *v1, flo
adr[1]= v1[1]+l1*(v2[1]-v1[1]);
adr[2]= v1[2]+l1*(v2[2]-v1[2]);
adr[3]= v1[3]+l1*(v2[3]-v1[3]);
- }
+ }
else trias[*b1]= v1;
(*b1)++;
@@ -2022,7 +2022,7 @@ static void zmask_rect(int *rectz, int *rectp, int xs, int ys, int neg)
EXTEND_PIXEL(row1 + 2);
EXTEND_PIXEL(row2 + 2);
EXTEND_PIXEL(row3 + 2);
- }
+ }
if (tot) {
len++;
curz[0]= (int)(z/(float)tot);
@@ -2047,7 +2047,7 @@ static void zmask_rect(int *rectz, int *rectp, int xs, int ys, int neg)
if (rectp[len]==0) {
rectz[len] = -0x7FFFFFFF;
rectp[len]= -1; /* env code */
- }
+ }
}
}
}
@@ -3233,7 +3233,7 @@ static void copyto_abufz(RenderPart *pa, int *arectz, int *rectmask, int sample)
*rza= 0x7FFFFFFF;
if (rectmask) *rma= 0x7FFFFFFF;
- if (*rd) {
+ if (*rd) {
/* when there's a sky pixstruct, fill in sky-Z, otherwise solid Z */
for (ps= (PixStr *)(*rd); ps; ps= ps->next) {
if (sample & ps->mask) {
@@ -4243,7 +4243,7 @@ unsigned short *zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pas
MEM_freeN(APixbufstrand);
if (sscache)
strand_shade_cache_free(sscache);
- freepsA(&apsmbase);
+ freepsA(&apsmbase);
if (R.r.mode & R_SHADOW)
ISB_free(pa);