www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: iagofg on July 13, 2011, 08:57:55 pm

Title: Procedural textures
Post by: iagofg on July 13, 2011, 08:57:55 pm
I'm trying to make procedural textures. Can I made it in jPCT-AE?
Title: Re: Procedural textures
Post by: EgonOlsen on July 13, 2011, 09:08:06 pm
I'm not sure, what exactly you mean...you want to generate textures based on some formula?
Title: Re: Procedural textures
Post by: iagofg on July 14, 2011, 07:29:11 pm
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()
Title: Re: Procedural textures
Post by: EgonOlsen on July 14, 2011, 08:39:28 pm
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.