Posted By: Rigoletto
Two HLSL questions - 09/05/05 11:03
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?
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?