0 Replies Latest reply on Jan 30, 2013 8:30 AM by pbholmen

    Moving only one component value into a register AGAL

    pbholmen

      Hi

       

      Do any of you know if there is any way in AGAL of moving a component value from one register to the other without touching the other components in the register? I notice that the following line...

       

      mov ft1.a, ft0.a

       

      ...will also overwrite the rgb components in ft1 with the rgb components from ft0. At least it does on my machine. In other words, specifying components may reorder (swizzle) the components, but doesn't mask them to preserve the value of other components in the destination register. Probably because each register is 128 bits wide, so it's easier for the GPU to just do the operation on all four components anyway. I'm trying to implement the technique described here:

       

      http://http.developer.nvidia.com/GPUGems/gpugems_ch22.html

       

      Under "22.2.2 Curves". It requires me to process each color component independently.