Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/particle.c
| Show First 20 Lines • Show All 4,412 Lines • ▼ Show 20 Lines | if (mtex && mtex->tex && mtex->mapto) { | ||||
| texvec[2] = 0.0f; | texvec[2] = 0.0f; | ||||
| break; | break; | ||||
| } | } | ||||
| RE_texture_evaluate(mtex, texvec, 0, NULL, false, false, &value, rgba); | RE_texture_evaluate(mtex, texvec, 0, NULL, false, false, &value, rgba); | ||||
| if ((event & mtex->mapto) & PAMAP_TIME) { | if ((event & mtex->mapto) & PAMAP_TIME) { | ||||
| /* the first time has to set the base value for time regardless of blend mode */ | /* the first time has to set the base value for time regardless of blend mode */ | ||||
| if ((setvars & MAP_PA_TIME) == 0) { | if ((setvars & PAMAP_TIME) == 0) { | ||||
| int flip = (mtex->timefac < 0.0f); | int flip = (mtex->timefac < 0.0f); | ||||
| float timefac = fabsf(mtex->timefac); | float timefac = fabsf(mtex->timefac); | ||||
| ptex->time *= 1.0f - timefac; | ptex->time *= 1.0f - timefac; | ||||
| ptex->time += timefac * ((flip) ? 1.0f - value : value); | ptex->time += timefac * ((flip) ? 1.0f - value : value); | ||||
| setvars |= MAP_PA_TIME; | setvars |= PAMAP_TIME; | ||||
| } | } | ||||
| else { | else { | ||||
| ptex->time = texture_value_blend(def, ptex->time, value, mtex->timefac, blend); | ptex->time = texture_value_blend(def, ptex->time, value, mtex->timefac, blend); | ||||
| } | } | ||||
| } | } | ||||
| SET_PARTICLE_TEXTURE(PAMAP_LIFE, ptex->life, mtex->lifefac); | SET_PARTICLE_TEXTURE(PAMAP_LIFE, ptex->life, mtex->lifefac); | ||||
| SET_PARTICLE_TEXTURE(PAMAP_DENS, ptex->exist, mtex->padensfac); | SET_PARTICLE_TEXTURE(PAMAP_DENS, ptex->exist, mtex->padensfac); | ||||
| SET_PARTICLE_TEXTURE(PAMAP_SIZE, ptex->size, mtex->sizefac); | SET_PARTICLE_TEXTURE(PAMAP_SIZE, ptex->size, mtex->sizefac); | ||||
| ▲ Show 20 Lines • Show All 987 Lines • Show Last 20 Lines | |||||