diff options
author | Ton Roosendaal <ton@blender.org> | 2010-12-26 20:47:17 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-12-26 20:47:17 +0300 |
commit | c4a56fda6d64faa3de7d99b29843c8affb6d5156 (patch) | |
tree | 7f24b0c8a702a0eb7b897b287b9f1762f274711a /source/blender/render/intern/include | |
parent | 31eadb358d0f186c5e9912dd1ac0bbeaf5786cf3 (diff) |
Bugfix #24966
Hair render: using strand "Blender Unit" size didn't correctly
clip for larger/wider strands. Now code clips strands based
on the maximum width.
Also found bad code for using clipping flags, which was mixed up,
and probably caused hair strands to be missing in cases.
Diffstat (limited to 'source/blender/render/intern/include')
-rw-r--r-- | source/blender/render/intern/include/render_types.h | 4 | ||||
-rw-r--r-- | source/blender/render/intern/include/strand.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index e6c2a99446f..84fa7e931b2 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -433,7 +433,9 @@ typedef struct StrandBuffer { int overrideuv; int flag, maxdepth; float adaptcos, minwidth, widthfade; - + + float maxwidth; /* for cliptest of strands in blender unit */ + float winmat[4][4]; int winx, winy; } StrandBuffer; diff --git a/source/blender/render/intern/include/strand.h b/source/blender/render/intern/include/strand.h index 66a5a7d1a0f..ffb2b8aa809 100644 --- a/source/blender/render/intern/include/strand.h +++ b/source/blender/render/intern/include/strand.h @@ -90,7 +90,7 @@ typedef struct StrandShadeCache StrandShadeCache; void strand_eval_point(StrandSegment *sseg, StrandPoint *spoint); void render_strand_segment(struct Render *re, float winmat[][4], struct StrandPart *spart, struct ZSpan *zspan, int totzspan, StrandSegment *sseg); -void strand_minmax(struct StrandRen *strand, float *min, float *max); +void strand_minmax(struct StrandRen *strand, float *min, float *max, float width); struct StrandSurface *cache_strand_surface(struct Render *re, struct ObjectRen *obr, struct DerivedMesh *dm, float mat[][4], int timeoffset); void free_strand_surface(struct Render *re); |