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/intern/source/rayshade.c')
-rw-r--r--source/blender/render/intern/source/rayshade.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index aa35d73f3b5..127e0bc07b9 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);
- }
+ }
}
@@ -564,12 +564,12 @@ static int refraction(float refract[3], const float n[3], const float view[3], f
if (dot>0.0f) {
index = 1.0f/index;
fac= 1.0f - (1.0f - dot*dot)*index*index;
- if (fac<= 0.0f) return 0;
+ if (fac <= 0.0f) return 0;
fac= -dot*index + sqrtf(fac);
}
else {
fac= 1.0f - (1.0f - dot*dot)*index*index;
- if (fac<= 0.0f) return 0;
+ if (fac <= 0.0f) return 0;
fac= -dot*index - sqrtf(fac);
}
@@ -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;
}
@@ -1515,7 +1515,7 @@ void ray_trace(ShadeInput *shi, ShadeResult *shr)
if (!(shi->combinedflag & SCE_PASS_REFRACT))
sub_v3_v3v3(diff, diff, shr->refr);
- shr->alpha = minf(1.0f, tracol[3]);
+ shr->alpha = min_ff(1.0f, tracol[3]);
}
if (do_mir) {
@@ -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)) {
@@ -2532,7 +2532,7 @@ void ray_shadow(ShadeInput *shi, LampRen *lar, float shadfac[4])
#if 0
/* only when face points away from lamp, in direction of lamp, trace ray and find first exit point */
-static void ray_translucent(ShadeInput *shi, LampRen *lar, float *distfac, float *co)
+static void ray_translucent(ShadeInput *shi, LampRen *lar, float *distfac, float co[3])
{
Isect isec;
float lampco[3];