diff options
author | Miika Hamalainen <blender@miikah.org> | 2011-09-05 20:04:15 +0400 |
---|---|---|
committer | Miika Hamalainen <blender@miikah.org> | 2011-09-05 20:04:15 +0400 |
commit | 79ef35889f850aa7173800bcf67918c14f3b1291 (patch) | |
tree | 198618ec4a98e50a1123ea94c093788413ca18dc /source/blender/render | |
parent | 39b66f9ad4239865f25853eea3cbf48e4853a266 (diff) |
Dynamic Paint:
* Added "Initial Color" setting for surfaces. You can for example set color from UV mapped texture or from vertex colors.
* Added clamping option for "wave" brushes.
* Merged smudge and drip adjacency search code. This fixes some issues with drip effect and makes code easier to maintain.
* Some adjustments to the bounding box generation code.
* OpenMP is now completely disabled if no compile flag is set.
* Wetness values are now properly clamped on vertex surfaces. No more black dots on >1.0 wetness.
* Textured brushes now use same function calls as internal renderer, instead of modified duplicates.
* Moved operator code to editors/physics/.
* Re-enabled some particle brush optimizations.
* Fixed sometimes incorrect volume brush influence.
* Fixed possible crash when using a brush that uses "Voxel Data" texture simultaneously with material preview or render.
* Fixed texture mapping issues for "Object Center" brush.
* Fixed possible crash/corruption when duplicating brush object that uses color ramps.
* Other tweaking and code cleanup.
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/include/texture.h | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/render_texture.c | 6 | ||||
-rw-r--r-- | source/blender/render/intern/source/volumetric.c | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h index a63c4f7f253..1da144a099f 100644 --- a/source/blender/render/intern/include/texture.h +++ b/source/blender/render/intern/include/texture.h @@ -68,7 +68,7 @@ void do_halo_tex(struct HaloRen *har, float xn, float yn, float *colf); void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, float *blend, int skyflag, short thread); void do_material_tex(struct ShadeInput *shi); void do_lamp_tex(LampRen *la, float *lavec, struct ShadeInput *shi, float *colf, int effect); -void do_volume_tex(struct ShadeInput *shi, float *xyz, int mapto_flag, float *col, float *val); +void do_volume_tex(struct ShadeInput *shi, float *xyz, int mapto_flag, float *col, float *val, struct Render *re); void init_render_textures(Render *re); void end_render_textures(Render *re); diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index 138eca2dd9b..9a5de4ae937 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -2673,7 +2673,7 @@ void do_material_tex(ShadeInput *shi) } -void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, float *val) +void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, float *val, Render *re) { MTex *mtex; Tex *tex; @@ -2682,7 +2682,7 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa float co[3], texvec[3]; float fact, stencilTin=1.0; - if (R.r.scemode & R_NO_TEX) return; + if (re->r.scemode & R_NO_TEX) return; /* here: test flag if there's a tex (todo) */ for(tex_nr=0; tex_nr<MAX_MTEX; tex_nr++) { @@ -2724,7 +2724,7 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa } else if(mtex->texco==TEXCO_GLOB) { VECCOPY(co, xyz); - mul_m4_v3(R.viewinv, co); + mul_m4_v3(re->viewinv, co); } else continue; // can happen when texco defines disappear and it renders old files diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index 19bbb11e143..dcb3c9d5749 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -290,7 +290,7 @@ float vol_get_density(struct ShadeInput *shi, float *co) float density_scale = shi->mat->vol.density_scale; if (shi->mat->mapto_textured & MAP_DENSITY) - do_volume_tex(shi, co, MAP_DENSITY, NULL, &density); + do_volume_tex(shi, co, MAP_DENSITY, NULL, &density, &R); // if meta-object, modulate by metadensity without increasing it if (shi->obi->obr->ob->type == OB_MBALL) { @@ -312,11 +312,11 @@ static void vol_get_reflection_color(ShadeInput *shi, float *ref_col, float *co) VECCOPY(ref_col, shi->mat->vol.reflection_col); if (shi->mat->mapto_textured & (MAP_SCATTERING+MAP_REFLECTION_COL)) - do_volume_tex(shi, co, MAP_SCATTERING+MAP_REFLECTION_COL, ref_col, &scatter); + do_volume_tex(shi, co, MAP_SCATTERING+MAP_REFLECTION_COL, ref_col, &scatter, &R); /* only one single float parameter at a time... :s */ if (shi->mat->mapto_textured & (MAP_REFLECTION)) - do_volume_tex(shi, co, MAP_REFLECTION, NULL, &reflection); + do_volume_tex(shi, co, MAP_REFLECTION, NULL, &reflection, &R); ref_col[0] = reflection * ref_col[0] * scatter; ref_col[1] = reflection * ref_col[1] * scatter; @@ -331,7 +331,7 @@ static void vol_get_emission(ShadeInput *shi, float *emission_col, float *co) VECCOPY(emission_col, shi->mat->vol.emission_col); if (shi->mat->mapto_textured & (MAP_EMISSION+MAP_EMISSION_COL)) - do_volume_tex(shi, co, MAP_EMISSION+MAP_EMISSION_COL, emission_col, &emission); + do_volume_tex(shi, co, MAP_EMISSION+MAP_EMISSION_COL, emission_col, &emission, &R); emission_col[0] = emission_col[0] * emission; emission_col[1] = emission_col[1] * emission; @@ -351,7 +351,7 @@ static void vol_get_sigma_t(ShadeInput *shi, float *sigma_t, float *co) float scattering = shi->mat->vol.scattering; if (shi->mat->mapto_textured & (MAP_SCATTERING+MAP_TRANSMISSION_COL)) - do_volume_tex(shi, co, MAP_SCATTERING+MAP_TRANSMISSION_COL, transmission_col, &scattering); + do_volume_tex(shi, co, MAP_SCATTERING+MAP_TRANSMISSION_COL, transmission_col, &scattering, &R); sigma_t[0] = (1.0f - transmission_col[0]) + scattering; sigma_t[1] = (1.0f - transmission_col[1]) + scattering; |