34 this->m_texture =
nullptr;
35 this->m_inputSize =
nullptr;
36 this->m_inputOffset =
nullptr;
38 this->m_pool =
nullptr;
39 this->m_sceneColorManage =
false;
56 if (this->m_texture !=
nullptr && this->m_texture->
nodetree !=
nullptr &&
57 this->m_texture->use_nodes) {
64 this->m_inputSize =
nullptr;
65 this->m_inputOffset =
nullptr;
67 this->m_pool =
nullptr;
68 if (this->m_texture !=
nullptr && this->m_texture->
use_nodes &&
69 this->m_texture->nodetree !=
nullptr && this->m_texture->nodetree->execdata !=
nullptr) {
76 unsigned int preferredResolution[2])
78 if (preferredResolution[0] == 0 || preferredResolution[1] == 0) {
81 resolution[0] =
width;
85 resolution[0] = preferredResolution[0];
86 resolution[1] = preferredResolution[1];
105 TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0,
nullptr};
106 float textureSize[4];
107 float textureOffset[4];
110 const float cx = this->
getWidth() / 2;
112 float u = (
x - cx) / this->
getWidth() * 2;
126 this->m_inputOffset->
readSampled(textureOffset,
x,
y, sampler);
128 vec[0] = textureSize[0] * (u + textureOffset[0]);
129 vec[1] = textureSize[1] * (
v + textureOffset[1]);
130 vec[2] = textureSize[2] * textureOffset[2];
struct ImagePool * BKE_image_pool_new(void)
void BKE_image_pool_free(struct ImagePool *pool)
void ntreeTexEndExecTree(struct bNodeTreeExec *exec)
struct bNodeTreeExec * ntreeTexBeginExecTree(struct bNodeTree *ntree)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
ATTR_WARN_UNUSED_RESULT const BMVert * v
virtual void initExecution()
void readSampled(float result[4], float x, float y, PixelSampler sampler)
unsigned int getHeight() const
void addInputSocket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
virtual void deinitExecution()
void addOutputSocket(DataType datatype)
unsigned int getWidth() const
SocketReader * getInputSocketReader(unsigned int inputSocketindex)
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) override
void initExecution() override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void deinitExecution() override
@ Vector
Vector data type.
struct bNodeTree * nodetree
struct bNodeTreeExec * execdata
static int current_thread_id()
int multitex_ext(Tex *tex, float texvec[3], float dxt[3], float dyt[3], int osatex, TexResult *texres, const short thread, struct ImagePool *pool, bool scene_color_manage, const bool skip_load_image)