I've been creating cellular automata using AGAL and having some issues. My code basically does the following:
- Kicks off with a bitmap used to create a texture.
- Invokes setTextureAt() to pass the texture to context3D
- Applies that texture to a simple plane
- Does some cellular automata magic
- Renders to back buffer
- Also renders back to the same texture
- Repeats
I sample neighbouring pixels by adding the 1 / (width or height). I thought that mpimapping might help - but I can't see a way to mipmap generated textures.
You can see the application here and the source code is here. The AGAL code lives in classes.WillamowskyRosslerRenderer
The code works, but I get these odd artefacts when I zoom in:
Many thanks in advance,
simon
Update! I've been playing around and the artefacts and flickering have both vanished by:
- *Setting the texture size to 2048 * 2048*
- configureBackBuffer(1024,1024,16)
It's a workaround rather than a fix, so I'm still investigating