* Fix for crash using texture nodes in displace modifier
Modifier code was asking for filtered textures without sending derivatives. Disabled this and also checks for filtered/non-filtered. Brecht, I assumed this was ok due to the existence of the p->osatex variable - if this isn't what you had in mind, please change or let me know :)
This commit is contained in:
@@ -3508,8 +3508,7 @@ static void get_texture_value(Tex *texture, float *tex_co, TexResult *texres)
|
||||
{
|
||||
int result_type;
|
||||
|
||||
result_type = multitex_ext(texture, tex_co, NULL,
|
||||
NULL, 1, texres);
|
||||
result_type = multitex_ext(texture, tex_co, NULL, NULL, 0, texres);
|
||||
|
||||
/* if the texture gave an RGB value, we assume it didn't give a valid
|
||||
* intensity, so calculate one (formula from do_material_tex).
|
||||
|
||||
@@ -72,8 +72,10 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
|
||||
tex_input_vec(ax, in[2], p, thread);
|
||||
|
||||
rotate(new_co, a, ax, p->co);
|
||||
rotate(new_dxt, a, ax, p->dxt);
|
||||
rotate(new_dyt, a, ax, p->dyt);
|
||||
if (p->osatex) {
|
||||
rotate(new_dxt, a, ax, p->dxt);
|
||||
rotate(new_dyt, a, ax, p->dyt);
|
||||
}
|
||||
|
||||
{
|
||||
TexParams np = *p;
|
||||
|
||||
@@ -52,8 +52,10 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
|
||||
tex_input_vec(scale, in[1], p, thread);
|
||||
|
||||
mul_v3_v3v3(new_co, p->co, scale);
|
||||
mul_v3_v3v3(new_dxt, p->dxt, scale);
|
||||
mul_v3_v3v3(new_dyt, p->dyt, scale);
|
||||
if (p->osatex) {
|
||||
mul_v3_v3v3(new_dxt, p->dxt, scale);
|
||||
mul_v3_v3v3(new_dyt, p->dyt, scale);
|
||||
}
|
||||
|
||||
tex_input_rgba(out, in[0], &np, thread);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user