5 Replies Latest reply on Jun 18, 2008 7:05 PM by nmatsuo

    Little feature request

      I think that such a feature could increase the performance of the filters. I could be wrong because I don't exactly know how they work, but suppose someone wants to create a shader which is rendered at 20 fps, 400*400 px and declares 10 floats in the evaluatePixel function. This would mean that the application should allocate and deallocate the memory for 32,000,000 floats (20*400*400*10) each second, while it could be possible to keep the 10 floats stored as long as they are needed. I tried to create a similar situation in actionscript (enterFrame calls 400*400 times the evaluatePixel function, evaluatePixel declares 10 Numbers and does some arithmetic operation with them) and declaring the variables outside the enterFrame function tripled the speed of execution.

      Tell me if my reasoning makes sense.