[Bf-blender-cvs] [b60dcd85f91] tmp_hair_curves: Fix the hairStrandsRes uniform for particle hair.

Lukas Tönne noreply at git.blender.org
Sun Jul 22 14:55:19 CEST 2018


Commit: b60dcd85f9182117d097a54b667264f9acb8ccf2
Author: Lukas Tönne
Date:   Sun Jul 22 13:54:37 2018 +0100
Branches: tmp_hair_curves
https://developer.blender.org/rBb60dcd85f9182117d097a54b667264f9acb8ccf2

Fix the hairStrandsRes uniform for particle hair.

===================================================================

M	source/blender/draw/intern/draw_hair.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list