http://www.eecg.toronto.edu/~jzhu/csc467/readings/csc467_finalVersion.pdf
Hi Peter, if you look at slide 27, I don't understand:
(1) why was ExprTemp3, ExprTemp4 and ExprTemp5 even declared?
(2) for the IF statement, why was there a SUB instruction at every step? (Shouldn't there be only one since CondTemp1 would've kept the value?
(3) is the first operator always the destination register?
(4) does the destination register always have to be declared first?
(5) does an ARB program always begin with !!ARBfp*? if yes, can we assume its !!ARBfp1.0? Also does it always end with END?
(6) is it okay to do something like MOV some_register, 1; instead of MOV some_register 1.0? Does the number of zero decimals affect operation? What happens if I put an int literal or int variable into a register?
(7) do PARAM have to be declared at the top or can be interweaved anywhere in the assembly code?
(8) what are the bindings of the attribute, uniform and result registers, is this documented somewhere?
(i) gl_FragColor -> result.color?
(ii) gl_FragDepth -> result.depth?
(iii) gl_FragCoord -> fragment.position?
(iv) gl_TexCoord -> fragment.texcoord[n]? which unit is it?
(v) gl_Color -> fragment.color?
(vi) gl_Secondary -> fragment.color.secondary?
(vii) gl_FogFragCoord ->fragment.fogcoord?
(viii) gl_Light_Half -> state.light[n].half? again which n?
(ix) gl_Light_Ambient -> state.light[n].ambient? again which n?
(x) gl_Material_Shininess -> state.material.shininess?
(xi) env1 -> program.env[1]?
(xii) env2 -> program.env[2]?
(xiii) env3 -> program.env[3]?
That is all for today.