Jump to content

float4x4 Material parameters


photo

Recommended Posts

Hello,

 

Is it possible to pass a matrix (mat4) to a shader uniform via the material?

For example if i define a parameter in the material like so:

<parameter name="transformationMatrix"/>

and in the shader its defined as

UNIFORM float4x4 transformationMatrix;

How do you set that material parameter? I tried setParameterArray() but that doesn't seem to work. Is it possible to set a float4x4 uniform given a material?

Any help would be appreciated!

 

Link to comment
×
×
  • Create New...