Unused operands of an instruction should have their use flag at 0. Unless mentioned otherwise, instructions do the same for all four components of the vector-valued operands. Operands src0,src1 and src2 can come from a temporary register or an uniform. dst := src0 + src2 src0 is added to src1 and the result is put into temporary register dst. dst := src0 * src1 + src2 src0 is multipied with src1, then src2 is added. The result is put into temporary register dst. dst := src0 * src1 src0 is multipied with src1 and the result is put into temporary register dst. dst.x := 1 dst.y := src0.y * src1.y dst.z := src0.z dst.w := src1.w http://msdn.microsoft.com/en-us/library/windows/desktop/bb219790%28v=vs.85%29.aspx dst := src0.x * src1.x + src0.y * src1.y + src0.z * src1.z Computes the component-wise dot product of the first three components between src0 and src1 and broadcasts the results to all destination components in temporary register dst. dst := src0.x * src1.x + src0.y * src1.y + src0.z * src1.z + src0.w * src1.w Computes the component-wise dot product between src0 and src1 and broadcasts the results to all destination components in temporary register dst. dst := src2 Copies the value of operand src2 to temporary register dst. dst := src2 Copies the floating point value of operand src2 to address register dst. XXX does this round or floor? dst := 1.0 / src2 Computes the reciprocal of src2, and puts the result into temporary register dst. dst := 1.0 / sqrt(src2) Computes the reciprocal of the square root of src2, and puts the result into temporary register dst. dst.x := 1 dst.y := src1.y IF (src1.z > 0 AND src0.y > 0) else 0 dst.z := exp(src2.x) IF (src1.z > 0 AND src0.z > 0) else 0 dst.w := 1 Partial http://msdn.microsoft.com/en-us/library/windows/desktop/bb174703%28v=vs.85%29.aspx Note: If src0 is disabled, src0.y > 0 and src0.z > 0 evaluate as true. dst := src1 COND src0 ? src2 : src1 (binary condition) dst := COND(src0) ? src1 : src2 (unary condition) Sets temporary register dst to src2 if (src1 COND src0) holds, otherwise to src1. This operation is performed per-component. It is used to implement MIN(a,b) and MAX(a,b) in the following way: - MIN(a,b): SELECT.GT dst, a, b, a (b > a ? a : b) - MAX(a,b): SELECT.LT dst, a, b, a (b < a ? a : b) dst := src0 COND src1 Sets temporary register dst to 1.0 if (src0 COND src1), otherwise to 0.0. dst := exp2(src2.x) Sets temporary register dst to the 2-exponent of the x component of src2). This is a scalar operation, the result is broadcasted over all active destination components. dst := log2(src2.x) Sets temporary register dst to the 2-log of the x component of src2). This is a scalar operation, the result is broadcasted over all active destination components. dst := frc(src2) Sets temporary register dst to the fractional portion of src2 for positive values. For negative values, the returned value will be 1.0 - the fractional portion. For example, 1.5 will become 0.5, and -0.1 will be turned into 0.9. pc := src2_imm *if src0 COND src1* Changes the current value of the instruction pointer if (src0 COND src1) evaluates to true. Discards (kills) the current fragment. Can only be used in PS. Kill fragment if src0 *COND* src1. dst := textureND(tex, src0) Samples texture coordinate src0 with sampler tex, and returns the sampled color in temporary register dst. dst := sqrt(src2) Computes the square root of src2 and puts the result in temporary register dst. dst := sin(src2 * (PI/2)) Computes the sine of src2 and puts the result in temporary register dst. The period of the sine is 4 and not 2 PI, thus to get normal behavior the instruction should be prefixed by a division by PI/2. dst := cos(src2 * (PI/2)) Computes the cosine of src2 and puts the result in temporary register dst. The period of the cosine is 4 and not 2 PI, thus to get normal behavior the instruction should be prefixed by a division by PI/2. dst := floor(src2) Computes the largest integral value not greater than the argument, and puts the result in temporary register dst. dst := ceil(src2) Computes the smallest integral value not less than the argument, and puts the result in temporary register dst. dst := sign(src2) Return 1.0 if the sign is positive or zero, -1.0 if negative. dst := float(src0) Convert source operand to a float and put the result in temporary register dst. Only one register in this range is known: - 0.x: gl_FrontFacing (PS) This swizzle is applied to the components of the value fetched from the texture.