Procedural textures

Started by iagofg, July 13, 2011, 08:57:55 PM

Previous topic - Next topic

iagofg

I'm trying to make procedural textures. Can I made it in jPCT-AE?

EgonOlsen

I'm not sure, what exactly you mean...you want to generate textures based on some formula?

iagofg

Yes, for example Plasmas, water, patches to textures, and so on.

I've seen after posting ITextureEffect. Maybe I can use that?? Is it the best choice?

The effect is applied every frame automatically? or Must I call to applyEffect every frame I want to redraw it?

Danke schön!

refs.
http://www.jpct.net/jpct-ae/doc/com/threed/jpct/ITextureEffect.html
http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Texture.html#applyEffect()

EgonOlsen

Yes, that's what it's meant for. If you want to change the texture every frame, you have to apply the effect every frame...but i don't recommend to do that, because it requires a new texture upload every frame, which is costly, especially with mip-mapping being enabled on that texture.