I study shader tutorial, and i can't understand how to manage with registers, when I want to use Assembler language.
In the example:
Code: Select all
//Shader Tutorial
if (UseHighLevelShaders)
services->setVertexShaderConstant("mInvWorld", invWorld.pointer(), 16);
else
services->setVertexShaderConstant(invWorld.pointer(), 0, 4);
I have read documentation and I understand, that in case Assembler language, if is written (0,4) it means range, use first register on position 0 to register number 3 (use all 4) . Text from documentation "constantAmount,: Amount of registers to be set. One register consists of 4 floats." did it means, that in one register I can store four vaules (for matrix4 do I need have 4 registers, not 16) ?
But how much registers can I use ? I tried change the numbers, but sometimes shaders are not drawn or have different colour (green or red mixed with yellow I think).
I don't get idea about these registers.
Best regards.