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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:35:14+00:00 2026-06-13T07:35:14+00:00

I have some GUI-like elements in my WebGL scene which have to be displayed

  • 0

I have some GUI-like elements in my WebGL scene which have to be displayed in plain white and not be affected by the lighting in scene.

The texture is a HTML5 canvas element, which has plain white background.

But when I render the canvas in the scene, as a texture, its affected by the lighting and becomes light gray.

How do I display this texture exactly with the same color of the canvas (plain white)?

I suspect the answer is in the fragment shader and playing already a while with it… and yes, I got once a plain color but nothing else, and I want to display some text over the background color.

Thanks!

  • 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-13T07:35:15+00:00Added an answer on June 13, 2026 at 7:35 am

    I got it! 😀

    In the fragment shader I added a boolean variable:

    uniform bool uNoLights;
    

    And use only the texture pixel information, to determine the final color, when it’s set:

    if (uNoLights) {
        gl_FragColor =  texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));
    }  else {
        gl_FragColor =  lights * texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some WPF ListBox which is dynamically populating with items. Something like this
I have some text lines like that : vt_wildshade2^508^508 vt_ailleurs2^1188^1188 ... vt_high2^13652^13652 Is it
I have some tables roughly like so: Client: id name Employee id name Email
I have a main application class, which contains a logger, plus some general app
I have some GUI on a bunch of LINQ queries. The queries take some
I'm an experienced GUI C# programmer and have some experience with C/C++ for CLI
I have a problem using CAB Framework. I created some GUI User control interfaces
I have some code that moves files around and would like to implement a
I have some data loaded as a np.ndarray and need to convert it to
I have some arbitrary pixel data that I want to save as a PNG.

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.