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:
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/include/rayobject.h2
-rw-r--r--source/blender/render/intern/include/render_types.h20
-rw-r--r--source/blender/render/intern/include/sunsky.h56
-rw-r--r--source/blender/render/intern/include/zbuf.h16
-rw-r--r--source/blender/render/intern/source/convertblender.c12
-rw-r--r--source/blender/render/intern/source/gammaCorrectionTables.c4
-rw-r--r--source/blender/render/intern/source/imagetexture.c6
-rw-r--r--source/blender/render/intern/source/initrender.c24
-rw-r--r--source/blender/render/intern/source/occlusion.c6
-rw-r--r--source/blender/render/intern/source/pipeline.c2
-rw-r--r--source/blender/render/intern/source/pixelblending.c44
-rw-r--r--source/blender/render/intern/source/pixelshading.c16
-rw-r--r--source/blender/render/intern/source/pointdensity.c8
-rw-r--r--source/blender/render/intern/source/rendercore.c14
-rw-r--r--source/blender/render/intern/source/shadbuf.c14
-rw-r--r--source/blender/render/intern/source/sss.c8
-rw-r--r--source/blender/render/intern/source/strand.c4
-rw-r--r--source/blender/render/intern/source/sunsky.c112
-rw-r--r--source/blender/render/intern/source/texture.c44
-rw-r--r--source/blender/render/intern/source/volumetric.c2
-rw-r--r--source/blender/render/intern/source/voxeldata.c4
-rw-r--r--source/blender/render/intern/source/zbuf.c6
22 files changed, 212 insertions, 212 deletions
diff --git a/source/blender/render/intern/include/rayobject.h b/source/blender/render/intern/include/rayobject.h
index 615d41b9b0a..e16ec83fb61 100644
--- a/source/blender/render/intern/include/rayobject.h
+++ b/source/blender/render/intern/include/rayobject.h
@@ -64,7 +64,7 @@ extern "C" {
This leads to 4 possible types of RayObject:
addr&3 - type of object
- 0 Self (reserved for each structure)
+ 0 Self (reserved for each structure)
1 RayFace (tri/quad primitive)
2 RayObject (generic with API callbacks)
3 VlakPrimitive
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 0b0ea075d79..127fbce20eb 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -376,18 +376,18 @@ typedef struct VlakRen {
typedef struct HaloRen
{
- short miny, maxy;
- float alfa, xs, ys, rad, radsq, sin, cos, co[3], no[3];
+ short miny, maxy;
+ float alfa, xs, ys, rad, radsq, sin, cos, co[3], no[3];
float hard, b, g, r;
- int zs, zd;
- int zBufDist; /* depth in the z-buffer coordinate system */
- char starpoints, type, add, tex;
- char linec, ringc, seed;
+ int zs, zd;
+ int zBufDist; /* depth in the z-buffer coordinate system */
+ char starpoints, type, add, tex;
+ char linec, ringc, seed;
short flarec; /* used to be a char. why ?*/
- float hasize;
- int pixels;
- unsigned int lay;
- struct Material *mat;
+ float hasize;
+ int pixels;
+ unsigned int lay;
+ struct Material *mat;
} HaloRen;
/* ------------------------------------------------------------------------- */
diff --git a/source/blender/render/intern/include/sunsky.h b/source/blender/render/intern/include/sunsky.h
index 7f1defc2dd4..111d1df2694 100644
--- a/source/blender/render/intern/include/sunsky.h
+++ b/source/blender/render/intern/include/sunsky.h
@@ -33,43 +33,43 @@
typedef struct SunSky
{
- short effect_type, skyblendtype, sky_colorspace;
- float turbidity;
- float theta, phi;
+ short effect_type, skyblendtype, sky_colorspace;
+ float turbidity;
+ float theta, phi;
- float toSun[3];
+ float toSun[3];
- /*float sunSpectralRaddata[SPECTRUM_MAX_COMPONENTS];*/
- float sunSolidAngle;
+ /*float sunSpectralRaddata[SPECTRUM_MAX_COMPONENTS];*/
+ float sunSolidAngle;
- float zenith_Y, zenith_x, zenith_y;
+ float zenith_Y, zenith_x, zenith_y;
- float perez_Y[5], perez_x[5], perez_y[5];
+ float perez_Y[5], perez_x[5], perez_y[5];
- /* suggested by glome in
- * http://projects.blender.org/tracker/?func=detail&atid=127&aid=8063&group_id=9*/
- float horizon_brightness;
- float spread;
- float sun_brightness;
- float sun_size;
- float backscattered_light;
- float skyblendfac;
+ /* suggested by glome in
+ * http://projects.blender.org/tracker/?func=detail&atid=127&aid=8063&group_id=9*/
+ float horizon_brightness;
+ float spread;
+ float sun_brightness;
+ float sun_size;
+ float backscattered_light;
+ float skyblendfac;
float sky_exposure;
- float atm_HGg;
+ float atm_HGg;
- float atm_SunIntensity;
- float atm_InscatteringMultiplier;
- float atm_ExtinctionMultiplier;
- float atm_BetaRayMultiplier;
- float atm_BetaMieMultiplier;
- float atm_DistanceMultiplier;
+ float atm_SunIntensity;
+ float atm_InscatteringMultiplier;
+ float atm_ExtinctionMultiplier;
+ float atm_BetaRayMultiplier;
+ float atm_BetaMieMultiplier;
+ float atm_DistanceMultiplier;
- float atm_BetaRay[3];
- float atm_BetaDashRay[3];
- float atm_BetaMie[3];
- float atm_BetaDashMie[3];
- float atm_BetaRM[3];
+ float atm_BetaRay[3];
+ float atm_BetaDashRay[3];
+ float atm_BetaMie[3];
+ float atm_BetaDashMie[3];
+ float atm_BetaRM[3];
}SunSky;
/**
diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h
index fb6760c28d3..dcaaca7d718 100644
--- a/source/blender/render/intern/include/zbuf.h
+++ b/source/blender/render/intern/include/zbuf.h
@@ -59,22 +59,22 @@ void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(vo
int zbuffer_strands_abuf(struct Render *re, struct RenderPart *pa, struct APixstrand *apixbuf, struct ListBase *apsmbase, unsigned int lay, int negzmask, float winmat[][4], int winx, int winy, int sample, float (*jit)[2], float clipcrop, int shadow, struct StrandShadeCache *cache);
typedef struct APixstr {
- unsigned short mask[4]; /* jitter mask */
- int z[4]; /* distance */
- int p[4]; /* index */
+ unsigned short mask[4]; /* jitter mask */
+ int z[4]; /* distance */
+ int p[4]; /* index */
int obi[4]; /* object instance */
short shadfac[4]; /* optimize storage for irregular shadow */
- struct APixstr *next;
+ struct APixstr *next;
} APixstr;
typedef struct APixstrand {
- unsigned short mask[4]; /* jitter mask */
- int z[4]; /* distance */
- int p[4]; /* index */
+ unsigned short mask[4]; /* jitter mask */
+ int z[4]; /* distance */
+ int p[4]; /* index */
int obi[4]; /* object instance */
int seg[4]; /* for strands, segment number */
float u[4], v[4]; /* for strands, u,v coordinate in segment */
- struct APixstrand *next;
+ struct APixstrand *next;
} APixstrand;
typedef struct APixstrMain
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index c756a135048..727f490e31f 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -316,7 +316,7 @@ NOTE THAT U/V COORDINATES ARE SOMETIMES SWAPPED !!
u | | F1 | F2 |
| | | |
()----p1----p2----()
- v ->
+ v ->
*/
/* ------------------------------------------------------------------------- */
@@ -1006,8 +1006,8 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
/* use actual Blender units for strand width and fall back to minimum width */
if(ma->mode & MA_STR_B_UNITS){
- crosslen= len_v3(cross);
- w= 2.0f*crosslen*ma->strand_min/w;
+ crosslen= len_v3(cross);
+ w= 2.0f*crosslen*ma->strand_min/w;
if(width < w)
width= w;
@@ -3713,7 +3713,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
lar->sunsky->effect_type = la->sun_effect_type;
VECCOPY(vec,ob->obmat[2]);
- normalize_v3(vec);
+ normalize_v3(vec);
InitSunSky(lar->sunsky, la->atm_turbidity, vec, la->horizon_brightness,
la->spread, la->sun_brightness, la->sun_size, la->backscattered_light,
@@ -4674,7 +4674,7 @@ static int allow_render_dupli_instance(Render *re, DupliObject *dob, Object *obd
/* don't allow lamp, animated duplis, or radio render */
return (render_object_type(obd->type) &&
- (!(dob->type == OB_DUPLIGROUP) || !dob->animated));
+ (!(dob->type == OB_DUPLIGROUP) || !dob->animated));
}
static void dupli_render_particle_set(Render *re, Object *ob, int timeoffset, int level, int enable)
@@ -4723,7 +4723,7 @@ static int get_vector_renderlayers(Scene *sce)
SceneRenderLayer *srl;
unsigned int lay= 0;
- for(srl= sce->r.layers.first; srl; srl= srl->next)
+ for(srl= sce->r.layers.first; srl; srl= srl->next)
if(srl->passflag & SCE_PASS_VECTOR)
lay |= srl->lay;
diff --git a/source/blender/render/intern/source/gammaCorrectionTables.c b/source/blender/render/intern/source/gammaCorrectionTables.c
index 02410d28048..afb7fbb74dc 100644
--- a/source/blender/render/intern/source/gammaCorrectionTables.c
+++ b/source/blender/render/intern/source/gammaCorrectionTables.c
@@ -75,7 +75,7 @@ float gammaCorrect(float c)
if (i < 0) res = -pow(abs(c), valid_gamma);
else if (i >= RE_GAMMA_TABLE_SIZE ) res = pow(c, valid_gamma);
else res = gamma_range_table[i] +
- ( (c - color_domain_table[i]) * gamfactor_table[i]);
+ ( (c - color_domain_table[i]) * gamfactor_table[i]);
return res;
} /* end of float gammaCorrect(float col) */
@@ -92,7 +92,7 @@ float invGammaCorrect(float col)
if (i < 0) res = -pow(abs(col), valid_inv_gamma);
else if (i >= RE_GAMMA_TABLE_SIZE) res = pow(col, valid_inv_gamma);
else res = inv_gamma_range_table[i] +
- ( (col - color_domain_table[i]) * inv_gamfactor_table[i]);
+ ( (col - color_domain_table[i]) * inv_gamfactor_table[i]);
return res;
} /* end of float invGammaCorrect(float col) */
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index 4f0e21a9fbb..21077c289c3 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -420,7 +420,7 @@ static float clipy_rctf(rctf *rf, float y1, float y2)
static void boxsampleclip(struct ImBuf *ibuf, rctf *rf, TexResult *texres)
{
/* sample box, is clipped already, and minx etc. have been set at ibuf size.
- Enlarge with antialiased edges of the pixels */
+ Enlarge with antialiased edges of the pixels */
float muly, mulx, div, col[4];
int x, y, startx, endx, starty, endy;
@@ -1080,7 +1080,7 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec,
if (tex->imaflag & TEX_FILTER_MIN) {
// make sure the filtersize is minimal in pixels (normal, ref map can have miniature pixel dx/dy)
- const float addval = (0.5f * tex->filtersize) / (float)MIN2(ibuf->x, ibuf->y);
+ const float addval = (0.5f * tex->filtersize) / (float)MIN2(ibuf->x, ibuf->y);
if (addval > minx) minx = addval;
if (addval > miny) miny = addval;
}
@@ -1481,7 +1481,7 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, f
if(tex->imaflag & TEX_FILTER_MIN) {
/* make sure the filtersize is minimal in pixels (normal, ref map can have miniature pixel dx/dy) */
- float addval= (0.5f * tex->filtersize) / (float) MIN2(ibuf->x, ibuf->y);
+ float addval= (0.5f * tex->filtersize) / (float) MIN2(ibuf->x, ibuf->y);
if(addval > minx)
minx= addval;
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index 5542a036d9a..26c68d0a167 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -109,10 +109,10 @@ static void init_render_jit(Render *re)
static float filt_quadratic(float x)
{
- if (x < 0.0f) x = -x;
- if (x < 0.5f) return 0.75f-(x*x);
- if (x < 1.5f) return 0.50f*(x-1.5f)*(x-1.5f);
- return 0.0f;
+ if (x < 0.0f) x = -x;
+ if (x < 0.5f) return 0.75f-(x*x);
+ if (x < 1.5f) return 0.50f*(x-1.5f)*(x-1.5f);
+ return 0.0f;
}
@@ -120,11 +120,11 @@ static float filt_cubic(float x)
{
float x2= x*x;
- if (x < 0.0f) x = -x;
+ if (x < 0.0f) x = -x;
- if (x < 1.0f) return 0.5*x*x2 - x2 + 2.0f/3.0f;
- if (x < 2.0f) return (2.0-x)*(2.0-x)*(2.0-x)/6.0f;
- return 0.0f;
+ if (x < 1.0f) return 0.5*x*x2 - x2 + 2.0f/3.0f;
+ if (x < 2.0f) return (2.0-x)*(2.0-x)*(2.0-x)/6.0f;
+ return 0.0f;
}
@@ -132,10 +132,10 @@ static float filt_catrom(float x)
{
float x2= x*x;
- if (x < 0.0f) x = -x;
- if (x < 1.0f) return 1.5f*x2*x - 2.5f*x2 + 1.0f;
- if (x < 2.0f) return -0.5f*x2*x + 2.5*x2 - 4.0f*x + 2.0f;
- return 0.0f;
+ if (x < 0.0f) x = -x;
+ if (x < 1.0f) return 1.5f*x2*x - 2.5f*x2 + 1.0f;
+ if (x < 2.0f) return -0.5f*x2*x + 2.5*x2 - 4.0f*x + 2.0f;
+ return 0.0f;
}
static float filt_mitchell(float x) /* Mitchell & Netravali's two-param cubic */
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c
index 39faf22fb31..ab656ad1c3b 100644
--- a/source/blender/render/intern/source/occlusion.c
+++ b/source/blender/render/intern/source/occlusion.c
@@ -1025,8 +1025,8 @@ static float occ_quad_form_factor(float *p, float *n, float *q0, float *q1, floa
/* dot */
vresult.v = (vec_splat_float(n[0])*gx +
- vec_splat_float(n[1])*gy +
- vec_splat_float(n[2])*gz)*vangle;
+ vec_splat_float(n[1])*gy +
+ vec_splat_float(n[2])*gz)*vangle;
result= (vresult.f[0] + vresult.f[1] + vresult.f[2] + vresult.f[3])*(0.5f/(float)M_PI);
result= MAX2(result, 0.0f);
@@ -1096,7 +1096,7 @@ static float occ_quad_form_factor(float *p, float *n, float *q0, float *q1, floa
aresult = (_mm_set_ps1(n[0])*gx + _mm_set_ps1(n[1])*gy + _mm_set_ps1(n[2])*gz)*angle;
/* sum together */
- result= (fresult[0] + fresult[1] + fresult[2] + fresult[3])*(0.5f/(float)M_PI);
+ result= (fresult[0] + fresult[1] + fresult[2] + fresult[3])*(0.5f/(float)M_PI);
result= MAX2(result, 0.0f);
return result;
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 75c8d806b9e..d7e8a05d128 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2675,7 +2675,7 @@ static int is_rendering_allowed(Render *re)
}
}
- /* check valid camera, without camera render is OK (compo, seq) */
+ /* check valid camera, without camera render is OK (compo, seq) */
if(re->scene->camera==NULL)
re->scene->camera= scene_find_camera(re->scene);
diff --git a/source/blender/render/intern/source/pixelblending.c b/source/blender/render/intern/source/pixelblending.c
index 683c6323fb2..8ff35bc9bae 100644
--- a/source/blender/render/intern/source/pixelblending.c
+++ b/source/blender/render/intern/source/pixelblending.c
@@ -74,8 +74,8 @@ extern struct Render R;
void addAlphaOverFloat(float *dest, float *source)
{
- /* d = s + (1-alpha_s)d*/
- float mul;
+ /* d = s + (1-alpha_s)d*/
+ float mul;
mul= 1.0 - source[3];
@@ -91,7 +91,7 @@ void addAlphaOverFloat(float *dest, float *source)
void addAlphaUnderFloat(float *dest, float *source)
{
- float mul;
+ float mul;
mul= 1.0 - dest[3];
@@ -105,41 +105,41 @@ void addAlphaUnderFloat(float *dest, float *source)
/* ------------------------------------------------------------------------- */
void addalphaAddfacFloat(float *dest, float *source, char addfac)
{
- float m; /* weiging factor of destination */
- float c; /* intermediate color */
+ float m; /* weiging factor of destination */
+ float c; /* intermediate color */
- /* Addfac is a number between 0 and 1: rescale */
- /* final target is to diminish the influence of dest when addfac rises */
- m = 1.0 - ( source[3] * ((255.0 - addfac) / 255.0));
+ /* Addfac is a number between 0 and 1: rescale */
+ /* final target is to diminish the influence of dest when addfac rises */
+ m = 1.0 - ( source[3] * ((255.0 - addfac) / 255.0));
- /* blend colors*/
- c= (m * dest[0]) + source[0];
+ /* blend colors*/
+ c= (m * dest[0]) + source[0];
#ifdef RE_FLOAT_COLOR_CLIPPING
- if(c >= RE_FULL_COLOR_FLOAT) dest[0] = RE_FULL_COLOR_FLOAT;
- else
+ if(c >= RE_FULL_COLOR_FLOAT) dest[0] = RE_FULL_COLOR_FLOAT;
+ else
#endif
- dest[0]= c;
+ dest[0]= c;
- c= (m * dest[1]) + source[1];
+ c= (m * dest[1]) + source[1];
#ifdef RE_FLOAT_COLOR_CLIPPING
- if(c >= RE_FULL_COLOR_FLOAT) dest[1] = RE_FULL_COLOR_FLOAT;
- else
+ if(c >= RE_FULL_COLOR_FLOAT) dest[1] = RE_FULL_COLOR_FLOAT;
+ else
#endif
- dest[1]= c;
+ dest[1]= c;
- c= (m * dest[2]) + source[2];
+ c= (m * dest[2]) + source[2];
#ifdef RE_FLOAT_COLOR_CLIPPING
- if(c >= RE_FULL_COLOR_FLOAT) dest[2] = RE_FULL_COLOR_FLOAT;
- else
+ if(c >= RE_FULL_COLOR_FLOAT) dest[2] = RE_FULL_COLOR_FLOAT;
+ else
#endif
- dest[2]= c;
+ dest[2]= c;
c= (m * dest[3]) + source[3];
#ifdef RE_ALPHA_CLIPPING
if(c >= RE_FULL_COLOR_FLOAT) dest[3] = RE_FULL_COLOR_FLOAT;
else
#endif
- dest[3]= c;
+ dest[3]= c;
}
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index 69e1f1103e2..768fc4ecacb 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -285,14 +285,14 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz,
int a;
if(R.wrld.mode & WO_MIST) {
- if(har->type & HA_ONLYSKY) {
- /* stars but no mist */
- alpha= har->alfa;
- }
- else {
- /* a bit patchy... */
- alpha= mistfactor(-har->co[2], har->co)*har->alfa;
- }
+ if(har->type & HA_ONLYSKY) {
+ /* stars but no mist */
+ alpha= har->alfa;
+ }
+ else {
+ /* a bit patchy... */
+ alpha= mistfactor(-har->co[2], har->co)*har->alfa;
+ }
}
else alpha= har->alfa;
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index 6bc3c6c54a7..d22b24bf544 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -306,12 +306,12 @@ void free_pointdensities(Render *re)
typedef struct PointDensityRangeData
{
- float *density;
- float squared_radius;
- float *point_data;
+ float *density;
+ float squared_radius;
+ float *point_data;
float *vec;
float softness;
- short falloff_type;
+ short falloff_type;
short noise_influence;
float *age;
int point_data_used;
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index d0a334f039e..cf1f339591d 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -1028,7 +1028,7 @@ void edge_enhance_tile(RenderPart *pa, float *rectf, int *rectz)
static void reset_sky_speed(RenderPart *pa, RenderLayer *rl)
{
/* for all pixels with max speed, set to zero */
- RenderLayer *rlpp[RE_MAX_OSA];
+ RenderLayer *rlpp[RE_MAX_OSA];
float *fp;
int a, sample, totsample;
@@ -1045,9 +1045,9 @@ static void reset_sky_speed(RenderPart *pa, RenderLayer *rl)
static unsigned short *make_solid_mask(RenderPart *pa)
{
- intptr_t *rd= pa->rectdaps;
- unsigned short *solidmask, *sp;
- int x;
+ intptr_t *rd= pa->rectdaps;
+ unsigned short *solidmask, *sp;
+ int x;
if(rd==NULL) return NULL;
@@ -1092,7 +1092,7 @@ static void addAlphaOverFloatMask(float *dest, float *source, unsigned short dma
dest[3]+= source[3];
return;
- }
+ }
dest[0]= (mul*dest[0]) + source[0];
dest[1]= (mul*dest[1]) + source[1];
@@ -2725,12 +2725,12 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob, short *do_up
}
/* calculate return value */
- for(a=0; a<re->r.threads; a++) {
+ for(a=0; a<re->r.threads; a++) {
vdone+= handles[a].vdone;
zbuf_free_span(handles[a].zspan);
MEM_freeN(handles[a].zspan);
- }
+ }
MEM_freeN(handles);
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index 954ff373c89..35d969f9f21 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -945,13 +945,13 @@ static int firstreadshadbuf(ShadBuf *shb, ShadSampleBuf *shsample, int **rz, int
ofs= (ys>>4)*(shb->size>>4) + (xs>>4);
ct= shsample->cbuf+ofs;
if(*ct==0) {
- if(nr==0) {
+ if(nr==0) {
*rz= *( (int **)(shsample->zbuf+ofs) );
return 1;
- }
+ }
else if(*rz!= *( (int **)(shsample->zbuf+ofs) )) return 0;
- return 1;
+ return 1;
}
return 0;
@@ -1071,7 +1071,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf *shsample, int bias, int
else {
/* got warning on this for 64 bits.... */
/* but it's working code! in this case rz is not a pointer but zvalue (ton) */
- zsamp= GET_INT_FROM_POINTER(rz);
+ zsamp= GET_INT_FROM_POINTER(rz);
}
/* tricky stuff here; we use ints which can overflow easily with bias values */
@@ -1174,7 +1174,7 @@ float testshadowbuf(Render *re, ShadBuf *shb, float *co, float *dxco, float *dyc
/* in case we have a constant value in a tile, we can do quicker lookup */
if(xres<16.0f && yres<16.0f) {
shsample= shb->buffers.first;
- if(firstreadshadbuf(shb, shsample, &rz, (int)xs1, (int)ys1, 0)) {
+ if(firstreadshadbuf(shb, shsample, &rz, (int)xs1, (int)ys1, 0)) {
if(firstreadshadbuf(shb, shsample, &rz, (int)(xs1+xres), (int)ys1, 1)) {
if(firstreadshadbuf(shb, shsample, &rz, (int)xs1, (int)(ys1+yres), 1)) {
if(firstreadshadbuf(shb, shsample, &rz, (int)(xs1+xres), (int)(ys1+yres), 1)) {
@@ -1182,7 +1182,7 @@ float testshadowbuf(Render *re, ShadBuf *shb, float *co, float *dxco, float *dyc
}
}
}
- }
+ }
}
/* full jittered shadow buffer lookup */
@@ -1255,7 +1255,7 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSampleBuf *shsample, int xs, i
else {
/* same as before */
/* still working code! (ton) */
- zsamp= GET_INT_FROM_POINTER(rz);
+ zsamp= GET_INT_FROM_POINTER(rz);
}
/* NO schadow when sampled at 'eternal' distance */
diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c
index bed75266767..6bc1153f8b3 100644
--- a/source/blender/render/intern/source/sss.c
+++ b/source/blender/render/intern/source/sss.c
@@ -31,11 +31,11 @@
- add fresnel terms
- adapt Rd table to scale, now with small scale there are a lot of misses?
- possible interesting method: perform sss on all samples in the tree,
- and then use those values interpolated somehow later. can also do this
+ and then use those values interpolated somehow later. can also do this
filtering on demand for speed. since we are doing things in screen
space now there is an exact correspondence
- avoid duplicate shading (filtering points in advance, irradiance cache
- like lookup?)
+ like lookup?)
- lower resolution samples
*/
@@ -196,13 +196,13 @@ static float compute_reduced_albedo(ScatterSettings *ss)
if(xn_1 > 1.0f) xn_1= 1.0f;
fxn= f_Rd(xn, ss->A, ss->ro);
- }
+ }
/* avoid division by zero later */
if(xn <= 0.0f)
xn= 0.00001f;
- return xn;
+ return xn;
}
/* Exponential falloff functions */
diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c
index c754ed1eab9..1bf1f1fe582 100644
--- a/source/blender/render/intern/source/strand.c
+++ b/source/blender/render/intern/source/strand.c
@@ -658,8 +658,8 @@ static void strand_render(Render *re, StrandSegment *sseg, float winmat[][4], St
obi= sseg->obi - re->objectinstance;
index= sseg->strand->index;
- projectvert(p1->co, winmat, hoco1);
- projectvert(p2->co, winmat, hoco2);
+ projectvert(p1->co, winmat, hoco1);
+ projectvert(p2->co, winmat, hoco2);
for(a=0; a<totzspan; a++) {
#if 0
diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c
index 66b352a9ba6..193fd2aa46f 100644
--- a/source/blender/render/intern/source/sunsky.c
+++ b/source/blender/render/intern/source/sunsky.c
@@ -63,12 +63,12 @@
* */
void ClipColor(float c[3])
{
- if (c[0] > 1.0) c[0] = 1.0;
- if (c[0] < 0.0) c[0] = 0.0;
- if (c[1] > 1.0) c[1] = 1.0;
- if (c[1] < 0.0) c[1] = 0.0;
- if (c[2] > 1.0) c[2] = 1.0;
- if (c[2] < 0.0) c[2] = 0.0;
+ if (c[0] > 1.0) c[0] = 1.0;
+ if (c[0] < 0.0) c[0] = 0.0;
+ if (c[1] > 1.0) c[1] = 1.0;
+ if (c[1] < 0.0) c[1] = 0.0;
+ if (c[2] > 1.0) c[2] = 1.0;
+ if (c[2] < 0.0) c[2] = 0.0;
}
/**
@@ -97,11 +97,11 @@ static float AngleBetween(float thetav, float phiv, float theta, float phi)
* */
static void DirectionToThetaPhi(float *toSun, float *theta, float *phi)
{
- *theta = acos(toSun[2]);
- if (fabs(*theta) < 1e-5)
- *phi = 0;
- else
- *phi = atan2(toSun[1], toSun[0]);
+ *theta = acos(toSun[2]);
+ if (fabs(*theta) < 1e-5)
+ *phi = 0;
+ else
+ *phi = atan2(toSun[1], toSun[0]);
}
/**
@@ -110,15 +110,15 @@ static void DirectionToThetaPhi(float *toSun, float *theta, float *phi)
* */
float PerezFunction(struct SunSky *sunsky, const float *lam, float theta, float gamma, float lvz)
{
- float den, num;
+ float den, num;
- den = ((1 + lam[0] * exp(lam[1])) *
+ den = ((1 + lam[0] * exp(lam[1])) *
(1 + lam[2] * exp(lam[3] * sunsky->theta) + lam[4] * cos(sunsky->theta) * cos(sunsky->theta)));
- num = ((1 + lam[0] * exp(lam[1] / cos(theta))) *
+ num = ((1 + lam[0] * exp(lam[1] / cos(theta))) *
(1 + lam[2] * exp(lam[3] * gamma) + lam[4] * cos(gamma) * cos(gamma)));
- return(lvz * num / den);}
+ return(lvz * num / den);}
/**
* InitSunSky:
@@ -138,7 +138,7 @@ void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_b
float skyblendfac, short skyblendtype, float sky_exposure, float sky_colorspace)
{
- float theta2;
+ float theta2;
float theta3;
float T;
float T2;
@@ -157,10 +157,10 @@ void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_b
sunsky->sky_colorspace= sky_colorspace;
sunsky->toSun[0] = toSun[0];
- sunsky->toSun[1] = toSun[1];
- sunsky->toSun[2] = toSun[2];
+ sunsky->toSun[1] = toSun[1];
+ sunsky->toSun[2] = toSun[2];
- DirectionToThetaPhi(sunsky->toSun, &sunsky->theta, &sunsky->phi);
+ DirectionToThetaPhi(sunsky->toSun, &sunsky->theta, &sunsky->phi);
sunsky->sunSolidAngle = 0.25 * M_PI * 1.39 * 1.39 / (150 * 150); // = 6.7443e-05
@@ -177,14 +177,14 @@ void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_b
sunsky->zenith_Y = 1e-6;
sunsky->zenith_x =
- ( + 0.00165 * theta3 - 0.00374 * theta2 + 0.00208 * sunsky->theta + 0) * T2 +
- ( -0.02902 * theta3 + 0.06377 * theta2 - 0.03202 * sunsky->theta + 0.00394) * T +
- ( + 0.11693 * theta3 - 0.21196 * theta2 + 0.06052 * sunsky->theta + 0.25885);
+ ( + 0.00165 * theta3 - 0.00374 * theta2 + 0.00208 * sunsky->theta + 0) * T2 +
+ ( -0.02902 * theta3 + 0.06377 * theta2 - 0.03202 * sunsky->theta + 0.00394) * T +
+ ( + 0.11693 * theta3 - 0.21196 * theta2 + 0.06052 * sunsky->theta + 0.25885);
sunsky->zenith_y =
- ( + 0.00275 * theta3 - 0.00610 * theta2 + 0.00316 * sunsky->theta + 0) * T2 +
- ( -0.04214 * theta3 + 0.08970 * theta2 - 0.04153 * sunsky->theta + 0.00515) * T +
- ( + 0.15346 * theta3 - 0.26756 * theta2 + 0.06669 * sunsky->theta + 0.26688);
+ ( + 0.00275 * theta3 - 0.00610 * theta2 + 0.00316 * sunsky->theta + 0) * T2 +
+ ( -0.04214 * theta3 + 0.08970 * theta2 - 0.04153 * sunsky->theta + 0.00515) * T +
+ ( + 0.15346 * theta3 - 0.26756 * theta2 + 0.06669 * sunsky->theta + 0.26688);
sunsky->perez_Y[0] = 0.17872 * T - 1.46303;
@@ -205,8 +205,8 @@ void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_b
sunsky->perez_y[3] = -0.04405 * T - 1.65369;
sunsky->perez_y[4] = -0.01092 * T + 0.05291;
- /* suggested by glome in
- * http://projects.blender.org/tracker/?func=detail&atid=127&aid=8063&group_id=9*/
+ /* suggested by glome in
+ * http://projects.blender.org/tracker/?func=detail&atid=127&aid=8063&group_id=9*/
sunsky->perez_Y[0] *= sunsky->horizon_brightness;
sunsky->perez_x[0] *= sunsky->horizon_brightness;
sunsky->perez_y[0] *= sunsky->horizon_brightness;
@@ -239,12 +239,12 @@ void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_b
* */
void GetSkyXYZRadiance(struct SunSky* sunsky, float theta, float phi, float color_out[3])
{
- float gamma;
- float x,y,Y,X,Z;
- float hfade=1, nfade=1;
+ float gamma;
+ float x,y,Y,X,Z;
+ float hfade=1, nfade=1;
- if (theta>(0.5*M_PI)) {
+ if (theta>(0.5*M_PI)) {
hfade = 1.0-(theta*M_1_PI-0.5)*2.0;
hfade = hfade*hfade*(3.0-2.0*hfade);
theta = 0.5*M_PI;
@@ -260,20 +260,20 @@ void GetSkyXYZRadiance(struct SunSky* sunsky, float theta, float phi, float colo
gamma = AngleBetween(theta, phi, sunsky->theta, sunsky->phi);
- // Compute xyY values
- x = PerezFunction(sunsky, sunsky->perez_x, theta, gamma, sunsky->zenith_x);
- y = PerezFunction(sunsky, sunsky->perez_y, theta, gamma, sunsky->zenith_y);
- Y = 6.666666667e-5 * nfade * hfade * PerezFunction(sunsky, sunsky->perez_Y, theta, gamma, sunsky->zenith_Y);
+ // Compute xyY values
+ x = PerezFunction(sunsky, sunsky->perez_x, theta, gamma, sunsky->zenith_x);
+ y = PerezFunction(sunsky, sunsky->perez_y, theta, gamma, sunsky->zenith_y);
+ Y = 6.666666667e-5 * nfade * hfade * PerezFunction(sunsky, sunsky->perez_Y, theta, gamma, sunsky->zenith_Y);
if(sunsky->sky_exposure!=0.0f)
Y = 1.0 - exp(Y*sunsky->sky_exposure);
- X = (x / y) * Y;
- Z = ((1 - x - y) / y) * Y;
+ X = (x / y) * Y;
+ Z = ((1 - x - y) / y) * Y;
- color_out[0] = X;
- color_out[1] = Y;
- color_out[2] = Z;
+ color_out[0] = X;
+ color_out[1] = Y;
+ color_out[2] = Z;
}
/**
@@ -286,19 +286,19 @@ void GetSkyXYZRadiance(struct SunSky* sunsky, float theta, float phi, float colo
* */
void GetSkyXYZRadiancef(struct SunSky* sunsky, const float varg[3], float color_out[3])
{
- float theta, phi;
- float v[3];
+ float theta, phi;
+ float v[3];
copy_v3_v3(v, (float*)varg);
normalize_v3(v);
- if (v[2] < 0.001){
- v[2] = 0.001;
- normalize_v3(v);
- }
+ if (v[2] < 0.001){
+ v[2] = 0.001;
+ normalize_v3(v);
+ }
- DirectionToThetaPhi(v, &theta, &phi);
- GetSkyXYZRadiance(sunsky, theta, phi, color_out);
+ DirectionToThetaPhi(v, &theta, &phi);
+ GetSkyXYZRadiance(sunsky, theta, phi, color_out);
}
/**
@@ -311,13 +311,13 @@ void GetSkyXYZRadiancef(struct SunSky* sunsky, const float varg[3], float color_
* */
void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3])
{
- float fBeta ;
- float fTauR, fTauA;
- float m ;
- float fAlpha;
+ float fBeta ;
+ float fTauR, fTauA;
+ float m ;
+ float fAlpha;
- int i;
- float fLambda[3];
+ int i;
+ float fLambda[3];
fLambda[0] = 0.65f;
fLambda[1] = 0.57f;
fLambda[2] = 0.475f;
@@ -327,7 +327,7 @@ void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3])
m = 1.0/(cos(theta) + 0.15f*pow(93.885f-theta/M_PI*180.0f,-1.253f));
- for(i = 0; i < 3; i++)
+ for(i = 0; i < 3; i++)
{
// Rayleigh Scattering
fTauR = exp( -m * 0.008735f * pow(fLambda[i], (float)(-4.08f)));
@@ -336,7 +336,7 @@ void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3])
fTauA = exp(-m * fBeta * pow(fLambda[i], -fAlpha));
fTau[i] = fTauR * fTauA;
- }
+ }
}
/**
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index 9e89d101215..8b33753c2b1 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -1479,16 +1479,16 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg
VECCOPY(in, out);
ramp_blend(MA_RAMP_COLOR, in, in+1, in+2, fact, tex);
break;
- case MTEX_SOFT_LIGHT:
- fact*= facg;
- VECCOPY(in, out);
- ramp_blend(MA_RAMP_SOFT, in, in+1, in+2, fact, tex);
- break;
- case MTEX_LIN_LIGHT:
- fact*= facg;
- VECCOPY(in, out);
- ramp_blend(MA_RAMP_LINEAR, in, in+1, in+2, fact, tex);
- break;
+ case MTEX_SOFT_LIGHT:
+ fact*= facg;
+ VECCOPY(in, out);
+ ramp_blend(MA_RAMP_SOFT, in, in+1, in+2, fact, tex);
+ break;
+ case MTEX_LIN_LIGHT:
+ fact*= facg;
+ VECCOPY(in, out);
+ ramp_blend(MA_RAMP_LINEAR, in, in+1, in+2, fact, tex);
+ break;
}
}
@@ -1551,18 +1551,18 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen
if(col > out) in= col; else in= out;
break;
- case MTEX_SOFT_LIGHT:
- col= fact*tex;
- scf=1.0 - (1.0 - tex) * (1.0 - out);
- in= facm*out + fact * ((1.0 - out) * tex * out) + (out * scf);
- break;
-
- case MTEX_LIN_LIGHT:
- if (tex > 0.5)
- in = out + fact*(2*(tex - 0.5));
- else
- in = out + fact*(2*tex - 1);
- break;
+ case MTEX_SOFT_LIGHT:
+ col= fact*tex;
+ scf=1.0 - (1.0 - tex) * (1.0 - out);
+ in= facm*out + fact * ((1.0 - out) * tex * out) + (out * scf);
+ break;
+
+ case MTEX_LIN_LIGHT:
+ if (tex > 0.5)
+ in = out + fact*(2*(tex - 0.5));
+ else
+ in = out + fact*(2*tex - 1);
+ break;
}
return in;
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index 70e0fd41b7d..99c27aaf81e 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -296,7 +296,7 @@ float vol_get_density(struct ShadeInput *shi, float *co)
if (shi->obi->obr->ob->type == OB_MBALL) {
const float md = metadensity(shi->obi->obr->ob, co);
if (md < 1.f) density *= md;
- }
+ }
return density * density_scale;
}
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index 1e665b2a809..762848c402a 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -283,7 +283,7 @@ static void cache_voxeldata(struct Render *re,Tex *tex)
void make_voxeldata(struct Render *re)
{
- Tex *tex;
+ Tex *tex;
re->i.infostr= "Loading voxel datasets";
re->stats_draw(re->sdh, &re->i);
@@ -325,7 +325,7 @@ void free_voxeldata(Render *re)
int voxeldatatex(struct Tex *tex, float *texvec, struct TexResult *texres)
{
- int retval = TEX_INT;
+ int retval = TEX_INT;
VoxelData *vd = tex->vd;
float co[3], offset[3] = {0.5, 0.5, 0.5};
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 1a4b469cc6f..2e6892cbc1c 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -1910,10 +1910,10 @@ void zbufclip(ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3,
}
}
- /* warning, this should never happen! */
+ /* warning, this should never happen! */
if(clve>38 || clvl>31) printf("clip overflow: clve clvl %d %d\n",clve,clvl);
- /* perspective division */
+ /* perspective division */
f1=vez;
for(c1=0;c1<clve;c1++) {
hoco_to_zco(zspan, f1, f1);
@@ -3846,7 +3846,7 @@ static int addtosamp_shr(ShadeResult *samp_shr, ShadeSample *ssamp, int addpassf
ShadeInput *shi= ssamp->shi;
ShadeResult *shr= ssamp->shr;
- for(sample=0; sample<ssamp->tot; sample++, shi++, shr++) {
+ for(sample=0; sample<ssamp->tot; sample++, shi++, shr++) {
if(shi->mask & (1<<a)) {
float fac= (1.0f - samp_shr->combined[3])*shr->combined[3];