From de9e03f99ee43c36de93b85ead4a99d949ee6fca Mon Sep 17 00:00:00 2001 From: newemka Date: Fri, 13 Jun 2025 11:27:03 +0200 Subject: [PATCH] AttributeFromImageChannels Rotation factors fix --- .../points/modify/AttributesFromImageChannels.hlsl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Operators/Lib/Resources/points/modify/AttributesFromImageChannels.hlsl b/Operators/Lib/Resources/points/modify/AttributesFromImageChannels.hlsl index 0f35a437ff..ba5e67235f 100644 --- a/Operators/Lib/Resources/points/modify/AttributesFromImageChannels.hlsl +++ b/Operators/Lib/Resources/points/modify/AttributesFromImageChannels.hlsl @@ -149,12 +149,11 @@ sampler texSampler : register(s0); p.FX2 += factors[Attribute_F2] * strength; float4 deltaRot = float4(0, 0, 0, 1); - deltaRot = qMul(deltaRot, qFromAngleAxis(factors[Attribute_Rotate_X] * TAU, float3(1, 0, 0))); - deltaRot = qMul(deltaRot, qFromAngleAxis(factors[Attribute_Rotate_X] * TAU, float3(0, 1, 0))); - deltaRot = qMul(deltaRot, qFromAngleAxis(factors[Attribute_Rotate_X] * TAU, float3(0, 0, 1))); + deltaRot = qMul(deltaRot, qFromAngleAxis(radians(-factors[Attribute_Rotate_X]), float3(1, 0, 0))); + deltaRot = qMul(deltaRot, qFromAngleAxis(radians(-factors[Attribute_Rotate_Y]), float3(0, 1, 0))); + deltaRot = qMul(deltaRot, qFromAngleAxis(radians(-factors[Attribute_Rotate_Z]), float3(0, 0, 1))); - deltaRot = normalize(deltaRot); - p.Rotation = qMul(deltaRot, deltaRot); + p.Rotation = normalize(deltaRot); // // Rotation // // ResultPoints[index].Rotation = p.Rotation;