Trying this when having an matrix3 @xform in the input:
#bind point &xform mat3
I am getting the "Unknown token 'mat3'" warning. What would be the correct way of doing so?
#bind point &xform mat3
@transform.x, @transform.y, @transform.z
@transform.[0], @transform.[1], @transform.[2]
transform[0,0] [0,1] and [0, 2]
// Bind writable position: #bind point &P float3 #bind point &xform float16 @KERNEL { float3 pos = @P; float4 pos4 = pos.x * @xform.lo.lo + pos.y * @xform.lo.hi + pos.z * @xform.hi.lo + 1 * @xform.hi.hi; float3 new_pos = (float3)(pos4.x, pos4.y, pos4.z); @P.set(new_pos); }
[0], [1] and [2]
tuple[0]
.x
bind point &P float3whatever
and it still worksfloat3[3]
and mat4 is float16
which can be confusing. mat3 is basically an array and mat4 is builtin vector typefloat[9]
for example float9
token on binding (which is illegal type as stated in docs so it became float[9]
- an array)float[9]
use mat3load