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 9148347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:14:51+00:00 2026-06-17T11:14:51+00:00

When I have a texture that has transparency (and an alpha channel), the transparent

  • 0

When I have a texture that has transparency (and an alpha channel), the transparent areas seem to be coming through as vec4s with values (0, 0, 0, 1). It’s easy enough to discard any color coming through that has an alpha value of 0 (apparently the 0 is still there…). But this is also causing problems with transparency between 0 and 1. Everything just shows up fully opaque and I can’t for the life of my imagine what is causing it.

Here’s what my shader looks like. I’ve been playing with it quite a bit, but this is currently the one I’m dealing with. Just putting through alpha values always a 0.5f, to see what happens. Still fully opaque:

#version 150 core

uniform sampler2D sampler;

in vec4 pass_Color;
in vec2 pass_TextureCoord;
in float pass_alpha;

out vec4 frag_Color;

void main(void) {
    frag_Color = pass_Color;

    vec3 color = texture2D(sampler, pass_TextureCoord);

    frag_Color = vec4(color, pass_alpha);

}
  • 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-06-17T11:14:52+00:00Added an answer on June 17, 2026 at 11:14 am

    I don’t know lwjgl, but seeing it is based on opengl, you may have to enable Blending. Assuming the pass_alpha is calculated correctly in the vertex shader.

    Also, the first line in main doesn’t do anything becaus frag_color is overwritten in the last line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one texture that has some portions which are transparent transparent I want
i have a GLSurfaceView, that has a texture that i need to change when
With WPF 3D, is it possible to have a texture with an alpha channel?
I have a simple openGL GUI that has uses a bmp as a texture.
I have a class named Texture that has a pointer to a SDL_Surface. When
I have a texture manager that I am running as singleton, and wish to
I understand that in CUDA's memory hierachy, we have things like shared memory, texture
I have an OpenGL texture with transparent and opaque pixels (eg, texture contains a
I have a texture loaded into memory that is of RGBA format with various
I would like to have a MovieClip that has a bit of depth. I

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.