|
Blender
V2.59
|
#include <stdio.h>#include <string.h>#include <fcntl.h>#include <math.h>#include <float.h>#include <unistd.h>#include "MEM_guardedalloc.h"#include "IMB_imbuf_types.h"#include "IMB_imbuf.h"#include "DNA_image_types.h"#include "DNA_scene_types.h"#include "DNA_texture_types.h"#include "BLI_math.h"#include "BLI_blenlib.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "BKE_global.h"#include "BKE_main.h"#include "BKE_image.h"#include "BKE_texture.h"#include "BKE_library.h"#include "RE_render_ext.h"#include "renderpipeline.h"#include "render_types.h"#include "texture.h"Go to the source code of this file.
Classes | |
| struct | afdata_t |
Defines | |
| #define | EWA_MAXIDX 255 |
| #define | ISNAN(x) ((x) != (x)) |
Typedefs | |
| typedef struct afdata_t | afdata_t |
Enumerations | |
| enum | { TXC_XMIR = 1, TXC_YMIR, TXC_REPT, TXC_EXTD } |
Functions | |
| static void | boxsample (ImBuf *ibuf, float minx, float miny, float maxx, float maxy, TexResult *texres, const short imaprepeat, const short imapextend) |
| static void | ibuf_get_color (float *col, struct ImBuf *ibuf, int x, int y) |
| int | imagewrap (Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, TexResult *texres) |
| static void | clipx_rctf_swap (rctf *stack, short *count, float x1, float x2) |
| static void | clipy_rctf_swap (rctf *stack, short *count, float y1, float y2) |
| static float | square_rctf (rctf *rf) |
| static float | clipx_rctf (rctf *rf, float x1, float x2) |
| static float | clipy_rctf (rctf *rf, float y1, float y2) |
| static void | boxsampleclip (struct ImBuf *ibuf, rctf *rf, TexResult *texres) |
| static int | ibuf_get_color_clip (float *col, ImBuf *ibuf, int x, int y, int extflag) |
| static int | ibuf_get_color_clip_bilerp (float *col, ImBuf *ibuf, float u, float v, int intpol, int extflag) |
| static void | area_sample (TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata_t *AFD) |
| static void | radangle2imp (float a2, float b2, float th, float *A, float *B, float *C, float *F) |
| static void | imp2radangle (float A, float B, float C, float F, float *a, float *b, float *th, float *ecc) |
| static void | ewa_eval (TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata_t *AFD) |
| static void | feline_eval (TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata_t *AFD) |
| static void | alpha_clip_aniso (ImBuf *ibuf, float minx, float miny, float maxx, float maxy, int extflag, TexResult *texres) |
| static void | image_mipmap_test (Tex *tex, ImBuf *ibuf) |
| static int | imagewraposa_aniso (Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *dxt, float *dyt, TexResult *texres) |
| int | imagewraposa (Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, float *DYT, TexResult *texres) |
| void | image_sample (Image *ima, float fx, float fy, float dx, float dy, float *result) |
| void | ibuf_sample (ImBuf *ibuf, float fx, float fy, float dx, float dy, float *result) |
Variables | |
| struct Render | R |
| static float | EWA_WTS [EWA_MAXIDX+1] |
Definition in file imagetexture.c.
| #define EWA_MAXIDX 255 |
Definition at line 760 of file imagetexture.c.
Referenced by ewa_eval(), and feline_eval().
| #define ISNAN | ( | x | ) | ((x) != (x)) |
Definition at line 800 of file imagetexture.c.
Referenced by imagewraposa_aniso().
| anonymous enum |
Definition at line 638 of file imagetexture.c.
| static void alpha_clip_aniso | ( | ImBuf * | ibuf, |
| float | minx, | ||
| float | miny, | ||
| float | maxx, | ||
| float | maxy, | ||
| int | extflag, | ||
| TexResult * | texres | ||
| ) | [static] |
Definition at line 970 of file imagetexture.c.
References clipx_rctf(), clipy_rctf(), MAX2, TexResult::ta, TexResult::tb, TexResult::tg, TexResult::tr, TXC_EXTD, TXC_REPT, ImBuf::x, rctf::xmax, rctf::xmin, ImBuf::y, rctf::ymax, and rctf::ymin.
Referenced by imagewraposa_aniso().
| static void area_sample | ( | TexResult * | texr, |
| ImBuf * | ibuf, | ||
| float | fx, | ||
| float | fy, | ||
| afdata_t * | AFD | ||
| ) | [static] |
Definition at line 721 of file imagetexture.c.
References CLAMPIS, afdata_t::dxt, afdata_t::dyt, afdata_t::extflag, ibuf_get_color_clip_bilerp(), afdata_t::intpol, sqrtf, TexResult::ta, TexResult::talpha, TexResult::tb, TexResult::tg, TexResult::tr, ImBuf::x, and ImBuf::y.
Referenced by imagewraposa_aniso().
| static void boxsample | ( | ImBuf * | ibuf, |
| float | minx, | ||
| float | miny, | ||
| float | maxx, | ||
| float | maxy, | ||
| TexResult * | texres, | ||
| const short | imaprepeat, | ||
| const short | imapextend | ||
| ) | [static] |
Definition at line 535 of file imagetexture.c.
References boxsampleclip(), CLAMP(), clipx_rctf(), clipx_rctf_swap(), clipy_rctf(), clipy_rctf_swap(), square_rctf(), stack, TexResult::ta, TexResult::talpha, TexResult::tb, TexResult::tg, TexResult::tr, ImBuf::x, rctf::xmax, rctf::xmin, ImBuf::y, rctf::ymax, and rctf::ymin.
Referenced by image_sample(), imagewrap(), and imagewraposa().
Definition at line 452 of file imagetexture.c.
References div, ibuf_get_color(), TexResult::ta, TexResult::tb, TexResult::tg, TexResult::tr, ImBuf::x, rctf::xmax, rctf::xmin, ImBuf::y, rctf::ymax, and rctf::ymin.
Referenced by boxsample().
| static float clipx_rctf | ( | rctf * | rf, |
| float | x1, | ||
| float | x2 | ||
| ) | [static] |
Definition at line 406 of file imagetexture.c.
References size(), rctf::xmax, and rctf::xmin.
Referenced by alpha_clip_aniso(), and boxsample().
| static void clipx_rctf_swap | ( | rctf * | stack, |
| short * | count, | ||
| float | x1, | ||
| float | x2 | ||
| ) | [static] |
Definition at line 292 of file imagetexture.c.
References stack, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by boxsample().
| static float clipy_rctf | ( | rctf * | rf, |
| float | y1, | ||
| float | y2 | ||
| ) | [static] |
Definition at line 428 of file imagetexture.c.
References size(), rctf::ymax, and rctf::ymin.
Referenced by alpha_clip_aniso(), and boxsample().
| static void clipy_rctf_swap | ( | rctf * | stack, |
| short * | count, | ||
| float | y1, | ||
| float | y2 | ||
| ) | [static] |
Definition at line 345 of file imagetexture.c.
References stack, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by boxsample().
| static void ewa_eval | ( | TexResult * | texr, |
| ImBuf * | ibuf, | ||
| float | fx, | ||
| float | fy, | ||
| afdata_t * | AFD | ||
| ) | [static] |
Definition at line 843 of file imagetexture.c.
References A, B, C, ceilf, simple_enum_gen::d, afdata_t::dxt, afdata_t::dyt, EWA_MAXIDX, EWA_WTS, afdata_t::extflag, F, floorf, ibuf_get_color_clip(), imp2radangle(), afdata_t::intpol, radangle2imp(), sqrtf, TexResult::ta, TexResult::talpha, TexResult::tb, TexResult::tg, TexResult::tr, ImBuf::x, and ImBuf::y.
Referenced by ibuf_sample(), and imagewraposa_aniso().
| static void feline_eval | ( | TexResult * | texr, |
| ImBuf * | ibuf, | ||
| float | fx, | ||
| float | fy, | ||
| afdata_t * | AFD | ||
| ) | [static] |
Definition at line 930 of file imagetexture.c.
References cosf, D(), simple_enum_gen::d, afdata_t::dusc, afdata_t::dvsc, EWA_MAXIDX, EWA_WTS, afdata_t::extflag, ibuf_get_color_clip_bilerp(), afdata_t::intpol, afdata_t::iProbes, afdata_t::majrad, afdata_t::minrad, sinf, TexResult::ta, TexResult::talpha, TexResult::tb, TexResult::tg, afdata_t::theta, TexResult::tr, ImBuf::x, and ImBuf::y.
Referenced by imagewraposa_aniso().
| static void ibuf_get_color | ( | float * | col, |
| struct ImBuf * | ibuf, | ||
| int | x, | ||
| int | y | ||
| ) | [static] |
Definition at line 85 of file imagetexture.c.
References ImBuf::channels, QUATCOPY, ImBuf::rect, ImBuf::rect_float, VECCOPY, and ImBuf::x.
Referenced by boxsampleclip(), and imagewrap().
| static int ibuf_get_color_clip | ( | float * | col, |
| ImBuf * | ibuf, | ||
| int | x, | ||
| int | y, | ||
| int | extflag | ||
| ) | [static] |
Definition at line 642 of file imagetexture.c.
References ImBuf::channels, if(), ImBuf::rect, ImBuf::rect_float, TXC_EXTD, TXC_REPT, TXC_XMIR, TXC_YMIR, ImBuf::x, and ImBuf::y.
Referenced by ewa_eval(), and ibuf_get_color_clip_bilerp().
| static int ibuf_get_color_clip_bilerp | ( | float * | col, |
| ImBuf * | ibuf, | ||
| float | u, | ||
| float | v, | ||
| int | intpol, | ||
| int | extflag | ||
| ) | [static] |
Definition at line 700 of file imagetexture.c.
References floorf, and ibuf_get_color_clip().
Referenced by area_sample(), and feline_eval().
| void ibuf_sample | ( | ImBuf * | ibuf, |
| float | fx, | ||
| float | fy, | ||
| float | dx, | ||
| float | dy, | ||
| float * | result | ||
| ) |
Definition at line 1816 of file imagetexture.c.
References afdata_t::dxt, afdata_t::dyt, ewa_eval(), afdata_t::extflag, afdata_t::intpol, NULL, TexResult::ta, TexResult::tb, TexResult::tg, TexResult::tr, and TXC_EXTD.
Referenced by do_displace(), and do_mapuv().
Definition at line 998 of file imagetexture.c.
References BLI_lock_thread(), BLI_unlock_thread(), ImBuf::flags, IB_fields, IB_MIPMAP_INVALID, Tex::imaflag, IMB_makemipmap(), IMB_remakemipmap(), LOCK_IMAGE, ImBuf::mipmap, NULL, TEX_GAUSS_MIP, TEX_MIPMAP, and ImBuf::userflags.
Referenced by imagewraposa(), and imagewraposa_aniso().
| void image_sample | ( | Image * | ima, |
| float | fx, | ||
| float | fy, | ||
| float | dx, | ||
| float | dy, | ||
| float * | result | ||
| ) |
Definition at line 1792 of file imagetexture.c.
References BKE_image_get_ibuf(), boxsample(), ImBuf::flags, IB_fields, NULL, R, R_SEC_FIELD, ImBuf::rect, TexResult::ta, TexResult::talpha, TexResult::tb, TexResult::tg, TexResult::tr, ImBuf::x, and ImBuf::y.
Definition at line 114 of file imagetexture.c.
References BKE_image_get_ibuf(), boxsample(), BRICONTRGB, Tex::checkerdist, Tex::extend, Tex::filtersize, ListBase::first, Tex::flag, ImBuf::flags, floorf, IB_fields, ibuf_get_color(), Image::ibufs, Tex::imaflag, Tex::iuser, MAX3(), TexResult::nor, NULL, R, R_NO_IMAGE_LOAD, R_SEC_FIELD, ImBuf::rect, ImBuf::rect_float, TexResult::ta, TexResult::talpha, TexResult::tb, TEX_CALCALPHA, TEX_CHECKER, TEX_CHECKER_EVEN, TEX_CHECKER_ODD, TEX_CLIP, TEX_CLIPCUBE, TEX_EXTEND, TEX_IMAROT, TEX_INTERPOL, TEX_NEGALPHA, TEX_NORMALMAP, TEX_REPEAT, TEX_USEALPHA, TexResult::tg, TexResult::tin, TexResult::tr, ImBuf::x, and ImBuf::y.
Referenced by envmaptex(), multitex(), and render_realtime_texture().
| int imagewraposa | ( | Tex * | tex, |
| Image * | ima, | ||
| ImBuf * | ibuf, | ||
| float * | texvec, | ||
| float * | DXT, | ||
| float * | DYT, | ||
| TexResult * | texres | ||
| ) |
Definition at line 1412 of file imagetexture.c.
References BKE_image_get_ibuf(), boxsample(), BRICONTRGB, Tex::checkerdist, Tex::extend, Tex::filtersize, ListBase::first, Tex::flag, ImBuf::flags, IB_fields, Image::ibufs, Tex::imaflag, image_mipmap_test(), imagewraposa_aniso(), Tex::iuser, MAX2, MAX3(), MIN2, MIN3, ImBuf::mipmap, TexResult::nor, NULL, R, R_FIELDS, R_NO_IMAGE_LOAD, R_SEC_FIELD, ImBuf::rect, ImBuf::rect_float, SWAP, TexResult::ta, TexResult::talpha, TexResult::tb, TEX_CALCALPHA, TEX_CHECKER, TEX_CHECKER_EVEN, TEX_CHECKER_ODD, TEX_CLIP, TEX_CLIPCUBE, TEX_EXTEND, TEX_FILTER_MIN, TEX_IMAROT, TEX_INTERPOL, TEX_MIPMAP, TEX_NEGALPHA, TEX_NORMALMAP, TEX_REPEAT, TEX_REPEAT_XMIR, TEX_REPEAT_YMIR, TEX_USEALPHA, Tex::texfilter, TexResult::tg, TexResult::tin, TexResult::tr, TXF_BOX, VECCOPY, ImBuf::x, and ImBuf::y.
Referenced by envmaptex(), multitex(), and render_realtime_texture().
| static int imagewraposa_aniso | ( | Tex * | tex, |
| Image * | ima, | ||
| ImBuf * | ibuf, | ||
| float * | texvec, | ||
| float * | dxt, | ||
| float * | dyt, | ||
| TexResult * | texres | ||
| ) | [static] |
Definition at line 1022 of file imagetexture.c.
References A, Tex::afmax, alpha_clip_aniso(), area_sample(), B, BKE_image_get_ibuf(), BRICONTRGB, C, Tex::checkerdist, copy_v2_v2(), afdata_t::dusc, afdata_t::dvsc, afdata_t::dxt, afdata_t::dyt, ewa_eval(), Tex::extend, afdata_t::extflag, F, feline_eval(), Tex::filtersize, ListBase::first, Tex::flag, ImBuf::flags, floorf, IB_fields, IB_MIPMAP_LEVELS, Image::ibufs, Tex::imaflag, image_mipmap_test(), imp2radangle(), afdata_t::intpol, afdata_t::iProbes, ISNAN, Tex::iuser, len_v2(), logf, M_LOG2E, afdata_t::majrad, MAX2, MAX3(), MIN2, MIN3, afdata_t::minrad, ImBuf::mipmap, mul_v2_fl(), TexResult::nor, NULL, R, R_FIELDS, R_NO_IMAGE_LOAD, R_SEC_FIELD, ImBuf::rect, ImBuf::rect_float, sqrtf, SWAP, TexResult::ta, TexResult::talpha, TexResult::tb, TEX_CALCALPHA, TEX_CHECKER, TEX_CHECKER_EVEN, TEX_CHECKER_ODD, TEX_CLIP, TEX_CLIPCUBE, TEX_EXTEND, TEX_FILTER_MIN, TEX_IMAROT, TEX_INTERPOL, TEX_MIPMAP, TEX_NEGALPHA, TEX_NORMALMAP, TEX_REPEAT, TEX_REPEAT_XMIR, TEX_REPEAT_YMIR, TEX_USEALPHA, Tex::texfilter, TexResult::tg, afdata_t::theta, TexResult::tin, TexResult::tr, TXC_EXTD, TXC_REPT, TXC_XMIR, TXC_YMIR, TXF_AREA, TXF_EWA, TXF_FELINE, ImBuf::x, and ImBuf::y.
Referenced by imagewraposa().
| static void imp2radangle | ( | float | A, |
| float | B, | ||
| float | C, | ||
| float | F, | ||
| float * | a, | ||
| float * | b, | ||
| float * | th, | ||
| float * | ecc | ||
| ) | [static] |
Definition at line 816 of file imagetexture.c.
References atan2f, C, simple_enum_gen::d, M_PI, and sqrtf.
Referenced by ewa_eval(), and imagewraposa_aniso().
| static void radangle2imp | ( | float | a2, |
| float | b2, | ||
| float | th, | ||
| float * | A, | ||
| float * | B, | ||
| float * | C, | ||
| float * | F | ||
| ) | [static] |
| static float square_rctf | ( | rctf * | rf | ) | [static] |
Definition at line 397 of file imagetexture.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by boxsample().
float EWA_WTS[EWA_MAXIDX+1] [static] |
Definition at line 761 of file imagetexture.c.
Referenced by ewa_eval(), and feline_eval().
Definition at line 127 of file pipeline.c.