Martin K
Martin K

Reputation: 825

Flash Stage3D: Render/Update procedural textures?

I need to update the texture of a 3D object frequently. (it is a procedurally generated pattern, so it cannot be cached, it has to be dynamically generated each frame)

What is the fastest way of doing this?

First I thought of updating a bitmapData via copyPixels(), then reupload this bitmapdata via Texture.uploadFromBitmapData() each frame, but I've heard that this is very slow ( due to moving data from system RAM to GPU RAM)

Any way of directly manipulating a Texture on the GPU,so I could avoid this step?

Upvotes: 0

Views: 582

Answers (1)

nikitablack
nikitablack

Reputation: 4663

If it's a procedurally generated pattern then it can be done on the gpu. If it's impossible, then only way is the way you described - it's the fastest one. And yes, it's slow process.

Upvotes: 1

Related Questions