# Multiplying matrices in HLSL

I have code that calculates a position like this in HLSL:

output.ShadowPos = input.VertexPos;


This works fine, but I would like to multiply the matrix together first

matrix m = gWorld * lightArray.lightView * lightArray.lightProject * T;

matrix m = mul(gWorld,mul(lightArray.lightView,mul(lightArray.lightProject,T)));