diff --git a/intern/cycles/kernel/kernel_bvh.h b/intern/cycles/kernel/kernel_bvh.h index e98bb158f6e..04150b7ea90 100644 --- a/intern/cycles/kernel/kernel_bvh.h +++ b/intern/cycles/kernel/kernel_bvh.h @@ -94,11 +94,11 @@ __device_inline void bvh_node_intersect(KernelGlobals *kg, float c0hiy = n0xy.w * idir.y - ood.y; float c0loz = nz.x * idir.z - ood.z; float c0hiz = nz.y * idir.z - ood.z; - float c1loz = nz.z * idir.z - ood.z; - float c1hiz = nz.w * idir.z - ood.z; - float c0min = max4(min(c0lox, c0hix), min(c0loy, c0hiy), min(c0loz, c0hiz), 0.0f); float c0max = min4(max(c0lox, c0hix), max(c0loy, c0hiy), max(c0loz, c0hiz), t); + + float c1loz = nz.z * idir.z - ood.z; + float c1hiz = nz.w * idir.z - ood.z; float c1lox = n1xy.x * idir.x - ood.x; float c1hix = n1xy.y * idir.x - ood.x; float c1loy = n1xy.z * idir.y - ood.y; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 13205326dd2..93404dc25fb 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -709,11 +709,7 @@ void default_mtex(MTex *mtex) mtex->size[1]= 1.0; mtex->size[2]= 1.0; mtex->tex= NULL; - - /* MTEX_BUMP_FLIPPED is temporary before 2.61 release to prevent flipping normals - when creating file in 2.60, opening it in 2.59, saving and opening in 2.60 again */ - mtex->texflag= MTEX_3TAP_BUMP | MTEX_BUMP_OBJECTSPACE | MTEX_BUMP_FLIPPED; - + mtex->texflag= MTEX_3TAP_BUMP | MTEX_BUMP_OBJECTSPACE; mtex->colormodel= 0; mtex->r= 1.0; mtex->g= 0.0; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index cd07bb30d3a..090e32ce5fe 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -12509,34 +12509,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) sce->gm.recastData.detailsamplemaxerror = 1.0f; } } - - { - /* flip normals */ - Material *ma= main->mat.first; - while(ma) { - int a; - for(a= 0; amtex[a]; - - if(mtex) { - if((mtex->texflag&MTEX_BUMP_FLIPPED)==0) { - if((mtex->mapto&MAP_DISPLACE)==0) { - if((mtex->mapto&MAP_NORM) && mtex->texflag&(MTEX_COMPAT_BUMP|MTEX_3TAP_BUMP|MTEX_5TAP_BUMP)) { - Tex *tex= newlibadr(fd, lib, mtex->tex); - - if(!tex || (tex->imaflag&TEX_NORMALMAP)==0) { - mtex->norfac= -mtex->norfac; - mtex->texflag|= MTEX_BUMP_FLIPPED; - } - } - } - } - } - } - - ma= ma->id.next; - } - } } if (main->versionfile < 260){ diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 6b40ba83b0d..6de4fa5476c 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -1083,6 +1083,8 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op) ob= base->object; + multires_force_update(ob); + /* copy data stored in job descriptor */ bkr.bake_filter= scene->r.bake_filter; bkr.mode= scene->r.bake_mode; @@ -1120,6 +1122,8 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj) MultiresBakerJobData *data; ob= base->object; + multires_force_update(ob); + data= MEM_callocN(sizeof(MultiresBakerJobData), "multiresBaker derivedMesh_data"); data->lores_dm = multiresbake_create_loresdm(scene, ob, &data->lvl); data->hires_dm = multiresbake_create_hiresdm(scene, ob, &data->tot_lvl, &data->simple); diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 2465d42bbf1..637c8fcdbcf 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1689,6 +1689,9 @@ void draw_text_main(SpaceText *st, ARegion *ar) int i, x, y, winx, linecount= 0, lineno= 0; int wraplinecount= 0, wrap_skip= 0; + if(st->lheight) st->viewlines= (int)ar->winy/st->lheight; + else st->viewlines= 0; + /* if no text, nothing to do */ if(!text) return; @@ -1699,9 +1702,6 @@ void draw_text_main(SpaceText *st, ARegion *ar) if(!text->curl || !text->sell || !text->lines.first || !text->lines.last) txt_clean_text(text); - if(st->lheight) st->viewlines= (int)ar->winy/st->lheight; - else st->viewlines= 0; - /* update rects for scroll */ calc_text_rcts(st, ar, &scroll, &back); /* scroll will hold the entire bar size */ diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index 619df428f7c..6a4a9970b40 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -492,7 +492,7 @@ typedef struct ColorMapping { #define MTEX_5TAP_BUMP 512 #define MTEX_BUMP_OBJECTSPACE 1024 #define MTEX_BUMP_TEXTURESPACE 2048 -#define MTEX_BUMP_FLIPPED 4096 /* temp flag for 2.59/2.60 */ +/* #define MTEX_BUMP_FLIPPED 4096 */ /* UNUSED */ /* blendtype */ #define MTEX_BLEND 0