At the moment, doing a math multiplication is done by using the tick operator ' and a component-wise multiplication is done using the normal star * operator. This should be the way around. I think it is more intuitive to use the normal * as the default multiplication.
The difference is required because the hlsl mul function does not do a component-wise multiplication on tow vectors for example. It would perform a dot product. In glsl, there is no such a thing. The * operator can be used for matrix multiplication as well as component-wise multiplication.
m = ma * mb ;
vec = va * vb ;
will transform to
// hlsl
m = mul( ma, mb ) ;
vec = mul( va, vb ) ;
// glsl
m = ma * mb ;
vec = va * vb ; // does not transform into a dot!
At the moment, doing a math multiplication is done by using the tick operator
'
and a component-wise multiplication is done using the normal star*
operator. This should be the way around. I think it is more intuitive to use the normal*
as the default multiplication. The difference is required because the hlslmul
function does not do a component-wise multiplication on tow vectors for example. It would perform a dot product. In glsl, there is no such a thing. The*
operator can be used for matrix multiplication as well as component-wise multiplication.will transform to
vec = va ' vb
will transform to