Back to SIMD
Bwain| No Comments »I’m at the point where I need some simple operators to do things mask and composite the resulting elements. Operators that are made up of very basic expressions, with no control flow. So this would be perfect to get the simd operator in the imgNode library to handle.
The first design element I left out is a way to handle an arbitrary number of inputs. For this case, I only need two, but it would be best to handle as many as needed. Since the colors are packed seperately in memory, not as tuples, I’m thinking that we could define (r,g,b) for the first input, (r2,g2,b2) for the 2nd input, etc.
When the shading language matures, we’ll have to find a way to have the shading language define a function to specify the number of inputs, number of colors per input, etc.
HMMM… unary operators haven’t been FULLY implemented. There is a bug where the parser gets confused between the binary operator ‘-’ and the unary operator ‘-’. I don’t think the SIMD commands were ever fully implemented.
I can’t divert too much time for fixing the shading language and the unary/binary operator discrepancy. I’ll be hand-coding the .asm files to do the masking/invert operators. For now, its enough to generalize the Smd operator to handle multiple inputs. The Smd operator was hardcoded to only operate as a source, not as a filter. Got that working.



