mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-05 06:37:29 +08:00
12 lines
161 B
HLSL
12 lines
161 B
HLSL
|
|
||
|
|
||
|
|
||
|
|
||
|
float3 mulvq(float3 v, float4 q)
|
||
|
{
|
||
|
float3 u = q.xyz;
|
||
|
float s = q.w;
|
||
|
return (dot(u, v)*u*2.0f) + (s*s - dot(u, u)) * v + (cross(u, v)*s*2.0f);
|
||
|
}
|
||
|
|