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')
-rw-r--r--source/blender/render/intern/source/convertblender.c8
-rw-r--r--source/blender/render/intern/source/envmap.c4
-rw-r--r--source/blender/render/intern/source/imagetexture.c32
-rw-r--r--source/blender/render/intern/source/pipeline.c34
-rw-r--r--source/blender/render/intern/source/pointdensity.c2
-rw-r--r--source/blender/render/intern/source/rayobject_instance.c2
-rw-r--r--source/blender/render/intern/source/rayshade.c19
-rw-r--r--source/blender/render/intern/source/shadbuf.c2
-rw-r--r--source/blender/render/intern/source/shadeoutput.c5
-rw-r--r--source/blender/render/intern/source/sss.c4
-rw-r--r--source/blender/render/intern/source/texture.c2
-rw-r--r--source/blender/render/intern/source/volume_precache.c2
-rw-r--r--source/blender/render/intern/source/volumetric.c6
-rw-r--r--source/blender/render/intern/source/voxeldata.c4
14 files changed, 61 insertions, 65 deletions
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 01dafd2ce4a..e70287e522e 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -321,7 +321,7 @@ u | | F1 | F2 |
/* ------------------------------------------------------------------------- */
-static void split_v_renderfaces(ObjectRen *obr, int startvlak, int startvert, int usize, int vsize, int uIndex, int cyclu, int cyclv)
+static void split_v_renderfaces(ObjectRen *obr, int startvlak, int startvert, int usize, int vsize, int uIndex, int UNUSED(cyclu), int cyclv)
{
int vLen = vsize-1+(!!cyclv);
int v;
@@ -2341,7 +2341,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
VertRen *ver;
VlakRen *vlr, *vlr1;
Material *ma;
- float *data, *nors, *orco, mat[4][4], imat[3][3], xn, yn, zn;
+ float *data, *nors, *orco=NULL, mat[4][4], imat[3][3], xn, yn, zn;
int a, need_orco, vlakindex, *index;
ListBase dispbase= {NULL, NULL};
@@ -2375,7 +2375,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
}
}
- for(a=0; a<dl->nr; a++, data+=3, nors+=3, orco+=3) {
+ for(a=0; a<dl->nr; a++, data+=3, nors+=3) {
ver= RE_findOrAddVert(obr, obr->totvert++);
VECCOPY(ver->co, data);
@@ -2393,7 +2393,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
normalize_v3(ver->n);
//if(ob->transflag & OB_NEG_SCALE) negate_v3(ver->n);
- if(need_orco) ver->orco= orco;
+ if(need_orco) ver->orco= orco+=3;
}
index= dl->index;
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index 8977bc7f379..f7da13373d1 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -86,7 +86,7 @@ static void envmap_split_ima(EnvMap *env, ImBuf *ibuf)
if (env->type == ENV_CUBE) {
for(part=0; part<6; part++) {
- env->cube[part]= IMB_allocImBuf(dx, dx, 24, IB_rect|IB_rectfloat, 0);
+ env->cube[part]= IMB_allocImBuf(dx, dx, 24, IB_rect|IB_rectfloat);
}
IMB_float_from_rect(ibuf);
@@ -458,7 +458,7 @@ static void render_envmap(Render *re, EnvMap *env)
int y;
float *alpha;
- ibuf= IMB_allocImBuf(envre->rectx, envre->recty, 24, IB_rect|IB_rectfloat, 0);
+ ibuf= IMB_allocImBuf(envre->rectx, envre->recty, 24, IB_rect|IB_rectfloat);
memcpy(ibuf->rect_float, rl->rectf, ibuf->channels * ibuf->x * ibuf->y * sizeof(float));
if (re->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index f78031c9030..9376c798c39 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -157,8 +157,8 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, TexResult *texre
}
}
- x = (int)(fx*ibuf->x);
- y = (int)(fy*ibuf->y);
+ x = (int)floorf(fx*ibuf->x);
+ y = (int)floorf(fy*ibuf->y);
if(tex->extend == TEX_CLIPCUBE) {
if(x<0 || y<0 || x>=ibuf->x || y>=ibuf->y || texvec[2]<-1.0 || texvec[2]>1.0) {
@@ -500,7 +500,7 @@ static void boxsampleclip(struct ImBuf *ibuf, rctf *rf, TexResult *texres)
}
}
-static void boxsample(ImBuf *ibuf, float minx, float miny, float maxx, float maxy, TexResult *texres, int imaprepeat, int imapextend, int intpol)
+static void boxsample(ImBuf *ibuf, float minx, float miny, float maxx, float maxy, TexResult *texres, int imaprepeat, int imapextend)
{
/* Sample box, performs clip. minx etc are in range 0.0 - 1.0 .
* Enlarge with antialiased edges of pixels.
@@ -1606,11 +1606,11 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, f
//minx*= 1.35f;
//miny*= 1.35f;
- boxsample(curibuf, fx-minx, fy-miny, fx+minx, fy+miny, texres, imaprepeat, imapextend, 0);
+ boxsample(curibuf, fx-minx, fy-miny, fx+minx, fy+miny, texres, imaprepeat, imapextend);
val1= texres->tr+texres->tg+texres->tb;
- boxsample(curibuf, fx-minx+dxt[0], fy-miny+dxt[1], fx+minx+dxt[0], fy+miny+dxt[1], &texr, imaprepeat, imapextend, 0);
+ boxsample(curibuf, fx-minx+dxt[0], fy-miny+dxt[1], fx+minx+dxt[0], fy+miny+dxt[1], &texr, imaprepeat, imapextend);
val2= texr.tr + texr.tg + texr.tb;
- boxsample(curibuf, fx-minx+dyt[0], fy-miny+dyt[1], fx+minx+dyt[0], fy+miny+dyt[1], &texr, imaprepeat, imapextend, 0);
+ boxsample(curibuf, fx-minx+dyt[0], fy-miny+dyt[1], fx+minx+dyt[0], fy+miny+dyt[1], &texr, imaprepeat, imapextend);
val3= texr.tr + texr.tg + texr.tb;
/* don't switch x or y! */
@@ -1619,7 +1619,7 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, f
if(previbuf!=curibuf) { /* interpolate */
- boxsample(previbuf, fx-minx, fy-miny, fx+minx, fy+miny, &texr, imaprepeat, imapextend, 0);
+ boxsample(previbuf, fx-minx, fy-miny, fx+minx, fy+miny, &texr, imaprepeat, imapextend);
/* calc rgb */
dx= 2.0f*(pixsize-maxd)/pixsize;
@@ -1636,9 +1636,9 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, f
}
val1= dy*val1+ dx*(texr.tr + texr.tg + texr.tb);
- boxsample(previbuf, fx-minx+dxt[0], fy-miny+dxt[1], fx+minx+dxt[0], fy+miny+dxt[1], &texr, imaprepeat, imapextend, 0);
+ boxsample(previbuf, fx-minx+dxt[0], fy-miny+dxt[1], fx+minx+dxt[0], fy+miny+dxt[1], &texr, imaprepeat, imapextend);
val2= dy*val2+ dx*(texr.tr + texr.tg + texr.tb);
- boxsample(previbuf, fx-minx+dyt[0], fy-miny+dyt[1], fx+minx+dyt[0], fy+miny+dyt[1], &texr, imaprepeat, imapextend, 0);
+ boxsample(previbuf, fx-minx+dyt[0], fy-miny+dyt[1], fx+minx+dyt[0], fy+miny+dyt[1], &texr, imaprepeat, imapextend);
val3= dy*val3+ dx*(texr.tr + texr.tg + texr.tb);
texres->nor[0]= (val1-val2); /* vals have been interpolated above! */
@@ -1661,10 +1661,10 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, f
maxy= fy+miny;
miny= fy-miny;
- boxsample(curibuf, minx, miny, maxx, maxy, texres, imaprepeat, imapextend, 0);
+ boxsample(curibuf, minx, miny, maxx, maxy, texres, imaprepeat, imapextend);
if(previbuf!=curibuf) { /* interpolate */
- boxsample(previbuf, minx, miny, maxx, maxy, &texr, imaprepeat, imapextend, 0);
+ boxsample(previbuf, minx, miny, maxx, maxy, &texr, imaprepeat, imapextend);
fx= 2.0f*(pixsize-maxd)/pixsize;
@@ -1690,11 +1690,11 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, f
}
if(texres->nor && (tex->imaflag & TEX_NORMALMAP)==0) {
- boxsample(ibuf, fx-minx, fy-miny, fx+minx, fy+miny, texres, imaprepeat, imapextend, 0);
+ boxsample(ibuf, fx-minx, fy-miny, fx+minx, fy+miny, texres, imaprepeat, imapextend);
val1= texres->tr+texres->tg+texres->tb;
- boxsample(ibuf, fx-minx+dxt[0], fy-miny+dxt[1], fx+minx+dxt[0], fy+miny+dxt[1], &texr, imaprepeat, imapextend, 0);
+ boxsample(ibuf, fx-minx+dxt[0], fy-miny+dxt[1], fx+minx+dxt[0], fy+miny+dxt[1], &texr, imaprepeat, imapextend);
val2= texr.tr + texr.tg + texr.tb;
- boxsample(ibuf, fx-minx+dyt[0], fy-miny+dyt[1], fx+minx+dyt[0], fy+miny+dyt[1], &texr, imaprepeat, imapextend, 0);
+ boxsample(ibuf, fx-minx+dyt[0], fy-miny+dyt[1], fx+minx+dyt[0], fy+miny+dyt[1], &texr, imaprepeat, imapextend);
val3= texr.tr + texr.tg + texr.tb;
/* don't switch x or y! */
@@ -1702,7 +1702,7 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, f
texres->nor[1]= (val1-val3);
}
else
- boxsample(ibuf, fx-minx, fy-miny, fx+minx, fy+miny, texres, imaprepeat, imapextend, 0);
+ boxsample(ibuf, fx-minx, fy-miny, fx+minx, fy+miny, texres, imaprepeat, imapextend);
}
if(tex->imaflag & TEX_CALCALPHA) {
@@ -1749,7 +1749,7 @@ void image_sample(Image *ima, float fx, float fy, float dx, float dy, float *res
if( (R.flag & R_SEC_FIELD) && (ibuf->flags & IB_fields) )
ibuf->rect+= (ibuf->x*ibuf->y);
- boxsample(ibuf, fx, fy, fx+dx, fy+dy, &texres, 0, 1, 0);
+ boxsample(ibuf, fx, fy, fx+dx, fy+dy, &texres, 0, 1);
result[0]= texres.tr;
result[1]= texres.tg;
result[2]= texres.tb;
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 44c6a6f008f..7230e0b3909 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -122,20 +122,20 @@ Render R;
static volatile int g_break= 0;
-static int thread_break(void *unused)
+static int thread_break(void *UNUSED(arg))
{
return g_break;
}
/* default callbacks, set in each new render */
-static void result_nothing(void *unused, RenderResult *rr) {}
-static void result_rcti_nothing(void *unused, RenderResult *rr, volatile struct rcti *rect) {}
-static void stats_nothing(void *unused, RenderStats *rs) {}
-static void float_nothing(void *unused, float val) {}
-static void print_error(void *unused, char *str) {printf("ERROR: %s\n", str);}
-static int default_break(void *unused) {return G.afbreek == 1;}
+static void result_nothing(void *UNUSED(arg), RenderResult *UNUSED(rr)) {}
+static void result_rcti_nothing(void *UNUSED(arg), RenderResult *UNUSED(rr), volatile struct rcti *UNUSED(rect)) {}
+static void stats_nothing(void *UNUSED(arg), RenderStats *UNUSED(rs)) {}
+static void float_nothing(void *UNUSED(arg), float UNUSED(val)) {}
+static void print_error(void *UNUSED(arg), char *str) {printf("ERROR: %s\n", str);}
+static int default_break(void *UNUSED(arg)) {return G.afbreek == 1;}
-static void stats_background(void *unused, RenderStats *rs)
+static void stats_background(void *UNUSED(arg), RenderStats *rs)
{
char str[400], *spos= str;
uintptr_t mem_in_use, mmap_in_use, peak_memory;
@@ -452,7 +452,7 @@ static void render_unique_exr_name(Render *re, char *str, int sample)
{
char di[FILE_MAX], name[FILE_MAXFILE+MAX_ID_NAME+100], fi[FILE_MAXFILE];
- BLI_strncpy(di, G.sce, FILE_MAX);
+ BLI_strncpy(di, G.main->name, FILE_MAX);
BLI_splitdirstring(di, fi);
if(sample==0)
@@ -861,7 +861,7 @@ static void *ml_addlayer_cb(void *base, char *str)
BLI_strncpy(rl->name, str, EXR_LAY_MAXNAME);
return rl;
}
-static void ml_addpass_cb(void *base, void *lay, char *str, float *rect, int totchan, char *chan_id)
+static void ml_addpass_cb(void *UNUSED(base), void *lay, char *str, float *rect, int totchan, char *chan_id)
{
RenderLayer *rl= lay;
RenderPass *rpass= MEM_callocN(sizeof(RenderPass), "loaded pass");
@@ -1398,7 +1398,7 @@ void RE_error_cb(Render *re, void *handle, void (*f)(void *handle, char *str))
/* object is considered fully prepared on correct time etc */
/* includes lights */
-void RE_AddObject(Render *re, Object *ob)
+void RE_AddObject(Render *UNUSED(re), Object *UNUSED(ob))
{
}
@@ -2032,7 +2032,7 @@ static void load_backbuffer(Render *re)
char name[256];
strcpy(name, re->r.backbuf);
- BLI_path_abs(name, G.sce);
+ BLI_path_abs(name, G.main->name);
BLI_path_frame(name, re->r.cfra, 0);
if(re->backbuf) {
@@ -2041,7 +2041,7 @@ static void load_backbuffer(Render *re)
BKE_image_signal(re->backbuf, NULL, IMA_SIGNAL_RELOAD);
}
- re->backbuf= BKE_add_image_file(name, re->r.cfra);
+ re->backbuf= BKE_add_image_file(name);
ibuf= BKE_image_get_ibuf(re->backbuf, NULL);
if(ibuf==NULL) {
// error() doesnt work with render window open
@@ -2226,7 +2226,7 @@ static int composite_needs_render(Scene *sce)
}
/* bad call... need to think over proper method still */
-static void render_composit_stats(void *unused, char *str)
+static void render_composit_stats(void *UNUSED(arg), char *str)
{
R.i.infostr= str;
R.stats_draw(R.sdh, &R.i);
@@ -2677,7 +2677,7 @@ static int is_rendering_allowed(Render *re)
return 1;
}
-static void update_physics_cache(Render *re, Scene *scene, int anim_init)
+static void update_physics_cache(Render *re, Scene *scene, int UNUSED(anim_init))
{
PTCacheBaker baker;
@@ -2813,7 +2813,7 @@ static int do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh, R
}
}
else {
- ImBuf *ibuf= IMB_allocImBuf(rres.rectx, rres.recty, scene->r.planes, 0, 0);
+ ImBuf *ibuf= IMB_allocImBuf(rres.rectx, rres.recty, scene->r.planes, 0);
/* if not exists, BKE_write_ibuf makes one */
ibuf->rect= (unsigned int *)rres.rect32;
@@ -3170,7 +3170,7 @@ void RE_layer_load_from_file(RenderLayer *layer, ReportList *reports, char *file
if(ibuf->rect_float==NULL)
IMB_float_from_rect(ibuf);
- ibuf_clip = IMB_allocImBuf(layer->rectx, layer->recty, 32, IB_rectfloat, 0);
+ ibuf_clip = IMB_allocImBuf(layer->rectx, layer->recty, 32, IB_rectfloat);
if(ibuf_clip) {
IMB_rectcpy(ibuf_clip, ibuf, 0,0, 0,0, layer->rectx, layer->recty);
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index 1ca1ea10273..d8156594085 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -253,7 +253,7 @@ static void cache_pointdensity(Render *re, Tex *tex)
}
}
-static void free_pointdensity(Render *re, Tex *tex)
+static void free_pointdensity(Render *UNUSED(re), Tex *tex)
{
PointDensity *pd = tex->pd;
diff --git a/source/blender/render/intern/source/rayobject_instance.c b/source/blender/render/intern/source/rayobject_instance.c
index 25765c4763a..a8098d2e8ef 100644
--- a/source/blender/render/intern/source/rayobject_instance.c
+++ b/source/blender/render/intern/source/rayobject_instance.c
@@ -41,7 +41,7 @@ static void RE_rayobject_instance_free(RayObject *o);
static void RE_rayobject_instance_bb(RayObject *o, float *min, float *max);
static float RE_rayobject_instance_cost(RayObject *o);
-static void RE_rayobject_instance_hint_bb(RayObject *o, RayHint *hint, float *min, float *max)
+static void RE_rayobject_instance_hint_bb(RayObject *UNUSED(o), RayHint *UNUSED(hint), float *UNUSED(min), float *UNUSED(max))
{}
static RayObjectAPI instance_api =
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 724fd9a3110..1172bee7d67 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -697,17 +697,9 @@ static void ray_fadeout(Isect *is, ShadeInput *shi, float *col, float *blendcol,
* note: 'col' must be initialized */
static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, float *start, float *vec, float *col, ObjectInstanceRen *obi, VlakRen *vlr, int traflag)
{
- ShadeInput shi;
- ShadeResult shr;
+ ShadeInput shi= {0};
Isect isec;
- float f, f1, fr, fg, fb;
- float ref[3];
float dist_mir = origshi->mat->dist_mir;
-
- /* Warning, This is not that nice, and possibly a bit slow for every ray,
- however some variables were not initialized properly in, unless using shade_input_initialize(...), we need to do a memset */
- memset(&shi, 0, sizeof(ShadeInput));
- /* end warning! - Campbell */
VECCOPY(isec.start, start);
VECCOPY(isec.vec, vec );
@@ -721,8 +713,9 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, flo
RE_RC_INIT(isec, shi);
if(RE_rayobject_raycast(R.raytree, &isec)) {
+ ShadeResult shr= {{0}};
float d= 1.0f;
-
+
shi.mask= origshi->mask;
shi.osatex= origshi->osatex;
shi.depth= 1; /* only used to indicate tracing */
@@ -737,16 +730,15 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, flo
shi.light_override= origshi->light_override;
shi.mat_override= origshi->mat_override;
- memset(&shr, 0, sizeof(ShadeResult));
-
shade_ray(&isec, &shi, &shr);
if (traflag & RAY_TRA)
d= shade_by_transmission(&isec, &shi, &shr);
if(depth>0) {
+ float fr, fg, fb, f, f1;
if((shi.mat->mode_l & MA_TRANSP) && shr.alpha < 1.0f) {
- float nf, f, f1, refract[3], tracol[4];
+ float nf, f, refract[3], tracol[4];
tracol[0]= shi.r;
tracol[1]= shi.g;
@@ -799,6 +791,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, flo
if(f!=0.0f) {
float mircol[4];
+ float ref[3];
reflection(ref, shi.vn, shi.view, NULL);
traceray(origshi, origshr, depth-1, shi.co, ref, mircol, shi.obi, shi.vlr, 0);
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index 7101ce5daaf..e589bb3a840 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -820,7 +820,7 @@ static void *do_shadow_thread(void *re_v)
}
static volatile int g_break= 0;
-static int thread_break(void *unused)
+static int thread_break(void *UNUSED(arg))
{
return g_break;
}
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 81de553b209..4142522e003 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1141,6 +1141,11 @@ float lamp_get_visibility(LampRen *lar, float *co, float *lv, float *dist)
visifac = lar->dist/(lar->dist + dist[0]);
break;
case LA_FALLOFF_INVSQUARE:
+ /* NOTE: This seems to be a hack since commit r12045 says this
+ * option is similar to old Quad, but with slight changes.
+ * Correct inv square would be (which would be old Quad):
+ * visifac = lar->distkw / (lar->distkw + dist[0]*dist[0]);
+ */
visifac = lar->dist / (lar->dist + dist[0]*dist[0]);
break;
case LA_FALLOFF_SLIDERS:
diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c
index e8c95a34ac4..1e8709d09f7 100644
--- a/source/blender/render/intern/source/sss.c
+++ b/source/blender/render/intern/source/sss.c
@@ -466,7 +466,7 @@ static void compute_radiance(ScatterTree *tree, float *co, float *rad)
/* building */
-static void sum_leaf_radiance(ScatterTree *tree, ScatterNode *node)
+static void sum_leaf_radiance(ScatterTree *UNUSED(tree), ScatterNode *node)
{
ScatterPoint *p;
float rad, totrad= 0.0f, inv;
@@ -540,7 +540,7 @@ static void sum_leaf_radiance(ScatterTree *tree, ScatterNode *node)
}
}
-static void sum_branch_radiance(ScatterTree *tree, ScatterNode *node)
+static void sum_branch_radiance(ScatterTree *UNUSED(tree), ScatterNode *node)
{
ScatterNode *subnode;
float rad, totrad= 0.0f, inv;
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index be2c83a7edf..cdac27f352a 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -771,7 +771,7 @@ static int plugintex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex
if (pit->version < 6) {
texres->tin = pit->result[0];
} else {
- texres->tin = result[0];
+ texres->tin = result[0]; /* XXX, assigning garbage value, fixme! */
}
if(rgbnor & TEX_NOR) {
diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c
index d3e8f4058c5..39e8315e7cf 100644
--- a/source/blender/render/intern/source/volume_precache.c
+++ b/source/blender/render/intern/source/volume_precache.c
@@ -89,7 +89,7 @@ int intersect_outside_volume(RayObject *tree, Isect *isect, float *offset, int l
}
/* Uses ray tracing to check if a point is inside or outside an ObjectInstanceRen */
-int point_inside_obi(RayObject *tree, ObjectInstanceRen *obi, float *co)
+int point_inside_obi(RayObject *tree, ObjectInstanceRen *UNUSED(obi), float *co)
{
Isect isect;
float vec[3] = {0.0f,0.0f,1.0f};
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index a58d96736d5..f3f31bf6b43 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -358,7 +358,7 @@ void vol_get_sigma_t(ShadeInput *shi, float *sigma_t, float *co)
/* phase function - determines in which directions the light
* is scattered in the volume relative to incoming direction
* and view direction */
-float vol_get_phasefunc(ShadeInput *shi, float g, float *w, float *wp)
+float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, float *w, float *wp)
{
const float normalize = 0.25f; // = 1.f/4.f = M_PI/(4.f*M_PI)
@@ -743,7 +743,6 @@ void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct
float tr[3] = {1.0,1.0,1.0};
Isect is;
float *startco, *endco;
- float density=0.f;
memset(shr, 0, sizeof(ShadeResult));
@@ -764,8 +763,7 @@ void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct
shr->alpha = shr->combined[3] = 1.f;
return;
}
-
- density = vol_get_density(shi, startco);
+
vol_get_transmittance(shi, tr, startco, endco);
copy_v3_v3(shr->combined, tr);
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index 076d6355585..0a2ea54c5b0 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -178,7 +178,7 @@ static int read_voxeldata_header(FILE *fp, struct VoxelData *vd)
return 1;
}
-static void init_frame_smoke(VoxelData *vd, Tex *tex)
+static void init_frame_smoke(VoxelData *vd)
{
Object *ob;
ModifierData *md;
@@ -282,7 +282,7 @@ static void cache_voxeldata(struct Render *re,Tex *tex)
load_frame_image_sequence(vd, tex);
return;
case TEX_VD_SMOKE:
- init_frame_smoke(vd, tex);
+ init_frame_smoke(vd);
return;
case TEX_VD_BLENDERVOXEL:
if (!BLI_exists(vd->source_path)) return;