mul,vector,matrix

    技术2022-05-20  62

    matrix定义:

    float(row)x(column) matrix。

    比如float 3x4 matrix就是3行4列的matrix。

     

    在汇编级表现是一个column一个register。

    mul(vector, matrix)要求matrix的row num和vector的dimention对应,如果是:

    mul(float4, float4x4)那么就是四个dp操作,每个dp取一个register也就是float4x4的一个column。

     

    cpp端设置matrix的时候就很直接,就是按照一个一个register的顺序填下去。


    最新回复(0)