Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Simple Tex Env configuration

  1. #1
    Intern Contributor
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    93

    Simple Tex Env configuration

    Hi all;
    Im implementing a glow fx (like in Tron), and i have to multiply RGB*alpha to get the glow sources visible...how do i configure the tex env combiners to do that?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,982

    Re: Simple Tex Env configuration

    Look up the ARB_texture_env_combine extension. You want both GL_SOURCE(0|1)_RGB to be GL_TEXTURE, but one is taken from the color channels and one from the alpha channel, which is done via GL_OPERAND(0|1)_RGB.

    edit: Assuming, of course, that RGB and A is comming from the same texture.

  3. #3
    Intern Contributor
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    93

    Re: Simple Tex Env configuration

    Thanx! its working now....another question: how do i blur the texture, to blend with the final image? assume that im doing that by ARB, and to work with radeon 7500+ and geforce2+...

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,982

    Re: Simple Tex Env configuration

    How do you mean "blur the texture"? Setting mini-/magnification filter to GL_LINEAR (or GL_LINEAR_MIPMAP_LINEAR if using mipmaps) will blur the texture in some way, or do you want something else?

  5. #5
    Intern Contributor
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    93

    Re: Simple Tex Env configuration

    Im trying to do something like this:
    - create a pbuffer, enabling automatic mipmap generation and render to texture;
    - each frame, render the scene to pbuffer, modulating the color (RGB) by the alpha;
    - render the scene to the framebuffer, and draw a quad over the screen with the pbuffer, but or blurred (i dont know how to do that without FS) or with a mipmap level lower than the default, to get almost the same effect .
    The problem now is that i couldnt configure it in the right way, or by creating the pbuffer without the correct parameters, or im not using the tex lod as i should...im setting the min lod and the max lod as the same value, to force the api to use the level i want, but for each level i put in function, the image doesnt change a bit... if somebody already did it, please help me!

  6. #6
    Intern Contributor
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    93

    Re: Simple Tex Env configuration

    Its working now....but the quality of blur its not so good....did anyboy tried some configuration, like size of texture N->mipmap level M, that works fine?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •