diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_texture_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_texture.c | 6 | ||||
-rw-r--r-- | source/blender/render/intern/source/imagetexture.c | 4 | ||||
-rw-r--r-- | source/blender/render/intern/source/texture.c | 8 |
5 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 1c7dab15d5c..eeffbfe5ef6 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -442,7 +442,7 @@ void default_tex(Tex *tex) tex->extend= TEX_REPEAT; tex->cropxmin= tex->cropymin= 0.0; tex->cropxmax= tex->cropymax= 1.0; - tex->texfilter = TXF_DEFAULT; + tex->texfilter = TXF_EWA; tex->afmax = 8; tex->xrepeat= tex->yrepeat= 1; tex->fie_ima= 2; diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index 0760825670d..7325181ee14 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -256,8 +256,8 @@ typedef struct TexMapping { #define TEX_FILTER_MIN 8192 /* texfilter */ -// TXF_DEFAULT -> blender's old texture filtering method -#define TXF_DEFAULT 0 +// TXF_BOX -> blender's old texture filtering method +#define TXF_BOX 0 #define TXF_EWA 1 #define TXF_FELINE 2 #define TXF_AREA 3 diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 330d38502ce..224e6643944 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -40,7 +40,7 @@ #include "WM_types.h" static EnumPropertyItem texture_filter_items[] = { - {TXF_DEFAULT, "DEFAULT", 0, "Default", ""}, + {TXF_BOX, "BOX", 0, "Box", ""}, {TXF_EWA, "EWA", 0, "EWA", ""}, {TXF_FELINE, "FELINE", 0, "FELINE", ""}, {TXF_AREA, "AREA", 0, "Area", ""}, @@ -126,7 +126,7 @@ static void rna_ImageTexture_mipmap_set(PointerRNA *ptr, int value) else tex->imaflag &= ~TEX_MIPMAP; if((tex->imaflag & TEX_MIPMAP) && tex->texfilter == TXF_SAT) - tex->texfilter = TXF_DEFAULT; + tex->texfilter = TXF_EWA; } static EnumPropertyItem *rna_ImageTexture_filter_itemf(bContext *C, PointerRNA *ptr, int *free) @@ -135,7 +135,7 @@ static EnumPropertyItem *rna_ImageTexture_filter_itemf(bContext *C, PointerRNA * EnumPropertyItem *item= NULL; int totitem= 0; - RNA_enum_items_add_value(&item, &totitem, texture_filter_items, TXF_DEFAULT); + RNA_enum_items_add_value(&item, &totitem, texture_filter_items, TXF_BOX); RNA_enum_items_add_value(&item, &totitem, texture_filter_items, TXF_EWA); RNA_enum_items_add_value(&item, &totitem, texture_filter_items, TXF_FELINE); RNA_enum_items_add_value(&item, &totitem, texture_filter_items, TXF_AREA); diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index 603241038da..01131f09b96 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -1342,7 +1342,7 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, b *= ff; } maxd = MAX2(b, 1e-8f); - levf = logf(maxd)*(float)M_LOG2E; + levf = ((float)M_LOG2E)*logf(maxd); curmap = 0; maxlev = 1; @@ -1503,7 +1503,7 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, f VECCOPY(dyt, DYT); // anisotropic filtering - if (!SAT && (tex->texfilter != TXF_DEFAULT)) + if (!SAT && (tex->texfilter != TXF_BOX)) return imagewraposa_aniso(tex, ima, ibuf, texvec, dxt, dyt, texres); texres->tin= texres->ta= texres->tr= texres->tg= texres->tb= 0.0f; diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index 3f7ffc5b9bb..66175194048 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -1107,7 +1107,7 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d float origf= fx *= tex->xrepeat; // TXF: omit mirror here, see comments in do_material_tex() after do_2d_mapping() call - if (tex->texfilter == TXF_DEFAULT) { + if (tex->texfilter == TXF_BOX) { if(fx>1.0f) fx -= (int)(fx); else if(fx<0.0f) fx+= 1-(int)(fx); @@ -1127,7 +1127,7 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d float origf= fy *= tex->yrepeat; // TXF: omit mirror here, see comments in do_material_tex() after do_2d_mapping() call - if (tex->texfilter == TXF_DEFAULT) { + if (tex->texfilter == TXF_BOX) { if(fy>1.0f) fy -= (int)(fy); else if(fy<0.0f) fy+= 1-(int)(fy); @@ -1545,7 +1545,7 @@ static void texco_mapping(ShadeInput* shi, Tex* tex, MTex* mtex, float* co, floa // textures are scaled (sizeXYZ) as well as repeated. See also modification in do_2d_mapping(). // (since currently only done in osa mode, results will look incorrect without osa TODO) if (tex->extend == TEX_REPEAT && (tex->flag & TEX_REPEAT_XMIR)) { - if (tex->texfilter == TXF_DEFAULT) + if (tex->texfilter == TXF_BOX) texvec[0] -= floorf(texvec[0]); // this line equivalent to old code, same below else if (texvec[0] < 0.f || texvec[0] > 1.f) { const float tx = 0.5f*texvec[0]; @@ -1554,7 +1554,7 @@ static void texco_mapping(ShadeInput* shi, Tex* tex, MTex* mtex, float* co, floa } } if (tex->extend == TEX_REPEAT && (tex->flag & TEX_REPEAT_YMIR)) { - if (tex->texfilter == TXF_DEFAULT) + if (tex->texfilter == TXF_BOX) texvec[1] -= floorf(texvec[1]); else if (texvec[1] < 0.f || texvec[1] > 1.f) { const float ty = 0.5f*texvec[1]; |