* 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:
2010-03-09 00:35:05 +00:00
parent d1bf196de1
commit f03a17d0f9
3 changed files with 9 additions and 6 deletions

View File

@@ -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).

View File

@@ -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;

View File

@@ -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);
}