diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index cc0ce57bb99..b950f54417e 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -699,8 +699,8 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *dxt, f maxy= MAX3(dxt[1],dyt[1],dxt[1]+dyt[1] ); /* tex_sharper has been removed */ - minx= tex->filtersize*(maxx-minx)/2.0f; - miny= tex->filtersize*(maxy-miny)/2.0f; + minx= (maxx-minx)/2.0f; + miny= (maxy-miny)/2.0f; if(tex->imaflag & TEX_FILTER_MIN) { /* make sure the filtersize is minimal in pixels (normal, ref map can have miniature pixel dx/dy) */ @@ -711,7 +711,10 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *dxt, f if(addval > miny) miny= addval; } - if(tex->filtersize!=1.0f) { + else if(tex->filtersize!=1.0f) { + minx*= tex->filtersize; + miny*= tex->filtersize; + dxt[0]*= tex->filtersize; dxt[1]*= tex->filtersize; dyt[0]*= tex->filtersize; diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index b502fb2b421..0c0fd6edbd2 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -98,7 +98,7 @@ void init_render_texture(Render *re, Tex *tex) } else if(tex->type==TEX_ENVMAP) { /* just in case */ - tex->imaflag= TEX_INTERPOL | TEX_MIPMAP; + tex->imaflag |= TEX_INTERPOL | TEX_MIPMAP; tex->extend= TEX_CLIP; if(tex->env) { diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index c82aee0155a..6d846e69308 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -1247,7 +1247,7 @@ static void texture_panel_image_map(Tex *tex, MTex *mtex) uiBlockBeginAlign(block); uiDefButBitS(block, TOG, TEX_FILTER_MIN, B_TEXPRV, "Min", 10, 120, 30, 20, &tex->imaflag, 0, 0, 0, 0, "Use Filtersize as a minimal filter value in pixels"); - uiDefButF(block, NUM, B_TEXPRV, "Filter: ", 40,120,120,20, &tex->filtersize, 0.1, 25.0, 10, 3, "Multiplies the filter size used by mipmap and interpol"); + uiDefButF(block, NUM, B_TEXPRV, "Filter: ", 40,120,120,20, &tex->filtersize, 0.1, 50.0, 10, 3, "Multiplies the filter size used by mipmap and interpol"); uiBlockBeginAlign(block); uiDefButBitS(block, TOG, TEX_NORMALMAP, B_NOP, "Normal Map", 160,120,(mtex)? 75: 150,20, &tex->imaflag, @@ -1369,7 +1369,8 @@ static void texture_panel_envmap(Tex *tex) uiDefButS(block, NUM, B_ENV_FREE, "CubeRes", 160,90,150,20, &env->cuberes, 50, 4096.0, 0, 0, "Sets the pixel resolution of the rendered environment map"); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_TEXPRV, "Filter :", 10,65,150,20, &tex->filtersize, 0.1, 25.0, 0, 3, "Adjusts sharpness or blurriness of the reflection"), + uiDefButBitS(block, TOG, TEX_FILTER_MIN, B_TEXPRV, "Min", 10, 65, 30, 20, &tex->imaflag, 0, 0, 0, 0, "Use Filtersize as a minimal filter value in pixels"); + uiDefButF(block, NUM, B_TEXPRV, "Filter :", 40,65,120,20, &tex->filtersize, 0.1, 25.0, 0, 3, "Adjusts sharpness or blurriness of the reflection"), uiDefButS(block, NUM, B_ENV_FREE, "Depth:", 160,65,150,20, &env->depth, 0, 5.0, 0, 0, "Sets the number of times a map will be rendered recursively mirror effects"), uiDefButF(block, NUM, REDRAWVIEW3D, "ClipSta", 10,40,150,20, &env->clipsta, 0.01, 50.0, 100, 0, "Sets start value for clipping: objects nearer than this are not visible to map"); uiDefButF(block, NUM, B_NOP, "ClipEnd", 160,40,150,20, &env->clipend, 0.1, 20000.0, 1000, 0, "Sets end value for clipping beyond which objects are not visible to map");