Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2018-07-22 15:54:37 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2018-07-22 15:54:37 +0300
commitb60dcd85f9182117d097a54b667264f9acb8ccf2 (patch)
tree867e5059415db7981796657809f709a51748887c
parent58979947bcd3c88c517580c9888dea74e16451e9 (diff)
Fix the hairStrandsRes uniform for particle hair.
-rw-r--r--source/blender/draw/intern/draw_hair.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_hair.c b/source/blender/draw/intern/draw_hair.c
index 8914481bb27..e291aabe5a3 100644
--- a/source/blender/draw/intern/draw_hair.c
+++ b/source/blender/draw/intern/draw_hair.c
@@ -158,7 +158,9 @@ static DRWShadingGroup *drw_shgroup_create_particle_hair_procedural_ex(
}
}
- const int strands_res = 1 << (part->draw_step + subdiv);
+ // XXX HACK! soon to be removed in favor of per-strand res values (need the static for setting a uniform)
+ static int strands_res;
+ strands_res = (1 << (part->draw_step + subdiv)) + 1;
DRW_shgroup_uniform_texture(shgrp, "hairPointBuffer", hair_cache->final[subdiv].proc_tex);
DRW_shgroup_uniform_int(shgrp, "hairStrandsRes", &strands_res, 1);
DRW_shgroup_uniform_int_copy(shgrp, "hairThicknessRes", thickness_res);