# Non-uniform scaling of mesh particles

When generating normals witout ddx/ddy (in procedural way) to correct scales we need to use Parameters.Particle.WorldToParticle matrix then scale by 1/scale following by corresponding Parameters.Particle.ParticleToWorld call. But by unknown reason only 1/(scale^2) is working. My question is - why?
Also I’ve tried to normalize matrices rows, what gives me the same result as previous?

the code below is` float3x3 m = (float3x3)(Parameters.Particle.WorldToParticle); m = float3x3( normalize(m._m00_m10_m20), normalize(m._m01_m11_m21), normalize(m._m02_m12_m22) ); p = mul(p, m); p /= scale; p = normalize(p); m = (float3x3)(Parameters.Particle.ParticleToWorld); m = float3x3( normalize(m._m00_m10_m20), normalize(m._m01_m11_m21), normalize(m._m02_m12_m22) ); p = mul(p, m); return normalize(p);`

COuld someone explain me, why doesnt this work? Thanks in advance

So i’ve found an error, basis vector lengths of Parameters.Particle.WorldToParticle and Parameters.Particle.PsrticleToWorld are equal! thats because we need to divide it twice

so the code is now looks like
float3x3 m = (float3x3)(Parameters.Particle.ParticleToWorld);
m = float3x3( (m._m00_m10_m20),
(m._m01_m11_m21),
(m._m02_m12_m22) ); p = normalize(p);
p = mul(p, m);
p /= (scale * scale * scale * scale);
p = normalize(p);
m = (float3x3)(Parameters.Particle.WorldToParticle);
m = float3x3( (m._m00_m10_m20),
(m._m01_m11_m21),
(m._m02_m12_m22) );
p = mul(p, m);
return normalize(p);