Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/multires_bake.c
| Show First 20 Lines • Show All 1,313 Lines • ▼ Show 20 Lines | static void bake_ibuf_filter(ImBuf *ibuf, char *mask, const int filter) | ||||
| else { | else { | ||||
| if (filter && ibuf->planes != R_IMF_PLANES_RGBA) { | if (filter && ibuf->planes != R_IMF_PLANES_RGBA) { | ||||
| /* clear alpha added by filtering */ | /* clear alpha added by filtering */ | ||||
| IMB_rectfill_alpha(ibuf, 1.0f); | IMB_rectfill_alpha(ibuf, 1.0f); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static void bake_ibuf_normalize_displacement( | static void bake_ibuf_normalize_displacement(ImBuf *ibuf, | ||||
| ImBuf *ibuf, float *displacement, char *mask, float displacement_min, float displacement_max) | const float *displacement, | ||||
| const char *mask, | |||||
| float displacement_min, | |||||
| float displacement_max) | |||||
| { | { | ||||
| int i; | int i; | ||||
| const float *current_displacement = displacement; | const float *current_displacement = displacement; | ||||
| const char *current_mask = mask; | const char *current_mask = mask; | ||||
| float max_distance; | float max_distance; | ||||
| max_distance = max_ff(fabsf(displacement_min), fabsf(displacement_max)); | max_distance = max_ff(fabsf(displacement_min), fabsf(displacement_max)); | ||||
| ▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines | |||||