Jump to content
  • Advertisement
Sign in to follow this  
Eitsch

Texture Combiners

This topic is 4808 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i am working on a terrain texture engine. first texture layer should be the grass texture the second should be a texture of snow on the mountains, which should be blended with an alpha texture (a usal texture with an alpha channel) texture combiner functions: the grass layer glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE); the alpha layer glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_BLEND); the detail texture which should be blended. glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE,GL_MODULATE); the result: also the grass texture is blended. how do i seperate this operation? thanks eitsch

Share this post


Link to post
Share on other sites
Advertisement
write out the equation of what u wanna do eg (i have no idea)
grass grassalpha snow
tex0.rgb * tex0.a * tex1.rgb = what u want

and then say what hardware u are targeting (glsl/register combiners)

Share this post


Link to post
Share on other sites
i am using standard opengl multitexturing.
the target is such a terrain:


the grass pattern should be the first layer. mapped over everything
the second (snow) should be visible on all pixels where the alpha texture says but the alpha texture should not effect the grass layer.

i hope you understand me. if not you could give me examples of terrain texturees like the pic above. only opengl multitexturing (no shading....)

hope you can help me fast. thanks

[Edited by - Eitsch on June 18, 2005 3:45:42 PM]

Share this post


Link to post
Share on other sites
perhaps this is what u want -> tex0 * A + tex1 * (1-A)
see the combine extension specifically the interpolate function

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!