interpolate between two textures
i want to interpolate between two textures to get a smooth animation effect
at the beginning the first texture should be totally opaque and the second texture should be fully transparent and at the end the first texture should be fully transparent and the second texture should be opaque.
i use glActiveTextureARB() and glMultiTexCoord2fARB() for multitexturing
how can i set this blending factor for each texture?
glActiveTextureARB(GL_TEXTURE1_ARB);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
/*
GL_MODULATE ==> Modulate de 2 textures
GL_REPLACE ==> Replace the first texture
*/
glBindTexture(GL_TEXTURE_2D, Texture_BMP[1]);
glEnable(GL_TEXTURE_2D);
// Draw your poly here ...
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
/*
GL_MODULATE ==> Modulate de 2 textures
GL_REPLACE ==> Replace the first texture
*/
glBindTexture(GL_TEXTURE_2D, Texture_BMP[1]);
glEnable(GL_TEXTURE_2D);
// Draw your poly here ...
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
Leyder Dylan : your code will blend textures together over whole triangle(mesh).
use ARB_texture_env_combine extension:
INTERPOLATE_ARB Arg0 * (Arg2) + Arg1 * (1-Arg2)
Where:
Arg0 = color component of texture on unit 0
Arg1 = color component of texture on unit 1
Arg2 = alpha component of primary color
You should never let your fears become the boundaries of your dreams.
use ARB_texture_env_combine extension:
INTERPOLATE_ARB Arg0 * (Arg2) + Arg1 * (1-Arg2)
Where:
Arg0 = color component of texture on unit 0
Arg1 = color component of texture on unit 1
Arg2 = alpha component of primary color
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
_DarkWIng_:
i searched for information about ARB_texture_env_combine on the net but i didn''t find much information. i don''t have a concrete idea how to implement it.
some sample code or a link to it would be nice
i searched for information about ARB_texture_env_combine on the net but i didn''t find much information. i don''t have a concrete idea how to implement it.
some sample code or a link to it would be nice
jp! That''s the one
You should never let your fears become the boundaries of your dreams.

You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement