Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6569697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:39:51+00:00 2026-05-25T14:39:51+00:00

How to render a texture with alpha? I have a texture, and need to

  • 0

How to render a texture with alpha?

I have a texture, and need to render it with different alpha values at different locations. Any way to do so? (My texture is GL_RGBA)

If not possible to change alpha value on the fly, I have to create different textures for different alpha levels?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:39:52+00:00Added an answer on May 25, 2026 at 2:39 pm

    Your texture is GL_RGBA so it has a different alpha value for each texel.

    If you want to change the alpha value used for render, I can think of the following methods:

    • Change the texture alpha values (not sure if you say that you don’t want to do that).
    • Use glColor4f to change the alpha value of the vertices. It will multiply the texture values. You may need to use glEnable(GL_COLOR_MATERIAL) and/or glColorMaterial().
    • Use a vertex shader to change the vertex alpha values. It will multiply the texture values.
    • Use a fragment shader to change the sampled texture values on the fly.
    • Use two texture stages and multiply them. The second one will have the modified alpha values (see glActiveTexture() and friends).
    • Use a fragment shader and two (or more) texture stages. This is the coolest!
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to render a simple texture mapped model as the output of a
I have a series of OpenGL-ES calls that properly render a triangle and texture
I need to initialize an OpenGL 2D texture with zeroes. Why? I render to
I have an OpenGL texture rendered to a first FBO and I need to
I'm trying to render to a texture, then draw that texture to the screen
I'm trying to write a C++ windows service that can render to a texture.
I'm trying to render a colored cube after rendering other cubes that have textures.
I'd like to render to svg data in a swf at runtime (not in
Say I have: void Render(void(*Call)()) { D3dDevice->BeginScene(); Call(); D3dDevice->EndScene(); D3dDevice->Present(0,0,0,0); } This is fine
In the Render method of an ASP.NET web-control, I need to alter the output

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.