Hi,

yesterday i tried HLSL first time and i´am suprised that it is very easy and not so complicated it looks. Just make a try with "Introduction to HLSL shaders" at the top in "Shaders". However i´am makeing a SimpleHLSLShaderTutorial similar to my others.

But i have two questions i can´t find answer for:

1. How to calculate with two different formats, for example float4 and float2. Casting is not working.

2. Is using functions in HLSL slowing down the shader, or it is compiled inline? I ask why i want to make reusable code?