From a05eee33dcf7df0e369fee322f7149dcd25a4f90 Mon Sep 17 00:00:00 2001 From: turanszkij Date: Sun, 16 Sep 2018 20:46:13 +0100 Subject: [PATCH] hairparticle fix --- WickedEngine/hairparticle_simulateCS.hlsl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WickedEngine/hairparticle_simulateCS.hlsl b/WickedEngine/hairparticle_simulateCS.hlsl index 7afa0e12f..2c3086439 100644 --- a/WickedEngine/hairparticle_simulateCS.hlsl +++ b/WickedEngine/hairparticle_simulateCS.hlsl @@ -136,8 +136,7 @@ void main(uint3 DTid : SV_DispatchThreadID, uint3 Gid : SV_GroupID, uint groupIn normal = normalize(mul((float3x3)xWorld, normal)); target = normalize(mul((float3x3)xWorld, target)); - float3 tip = position + normal * len; - tip = mul(xWorld, float4(tip.xyz, 1)).xyz; + float3 tip = mul(xWorld, float4(position.xyz, 1)).xyz + normal * len; // Accumulate forces: GroupMemoryBarrierWithGroupSync();