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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:48:11+00:00 2026-05-19T02:48:11+00:00

Here is the deal, I want to make a particle system based on textures

  • 0

Here is the deal, I want to make a particle system based on textures and I have a cloud texture. I map the texture to 10 different polygons each having same size and textures.
when I blend them over each other, a problem rises and pixels which are in say 5 polygons become too white! i don’t want this. What I want is something like accumulation buffer’s effect. I want to take an effect like this:

say Rx,Bx,Gx be each pixels color when only 1 polygon is in page and pixel is inside it. Now we have n polygons each having same size and texture.

Rtotal = R1/n+R2/n+…+Rn/n
same for Gtotal and Btotal

What can I do to get such results from alpha blending.

BTW here is the initialization.

glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glEnable(GL_DEPTH_TEST) ;
glDepthFunc(GL_ALWAYS);

glEnable(GL_NORMALIZE);
glColor4f(.5,.5, .5,.2); 
glBlendFunc (GL_SRC_ALPHA, GL_DST_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-05-19T02:48:11+00:00Added an answer on May 19, 2026 at 2:48 am

    It’s difficult to make the result exactly as you want it to be, as you’d need to know for each pixel how many fragments were there.

    If it’s enough for you to make the particles look OK, then it should be enough to change the blending mode.

    They are accumulating to white because you probably are using additive alpha blending:

    result = source_color*source_alpha + destination_color
    

    Or plain additive blending:

    result = source_color + destination_color
    

    (where source is “the color of a given fragment” and destination is “what was already in the framebuffer in that place”).

    Both of those decay to white with a lot of “layers”. But you can use “true” alpha blending:

    result = source_color * source_alpha + destination_color * (1-source_alpha)
    

    which will not decay to white.

    In OpenGL, this corresponds to:

    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    

    That’s not exactly what you wanted since the result will be order-dependent, but it should be 100% sufficient for a particle system. Hope that helps.

    (Also, don’t forget to render the solid geometry before the particles and disable z-write then.)

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

Sidebar

Related Questions

Here is the deal, in my Java project I have to make a composite
Here is what I want to ask: I want to make a system to
Well, I have a number of different content types that I want to make
So here's the deal: I need to make all posted images in wordpress have
so here is the deal: I have a label (NSTextField) that I want to
Here's the deal : I have Publication objets in my application. I also have
So here's the deal, I am building out a site right now and want
here's the deal: I'm trying to make a colorpicker act much like in Photoshop,
Here's my scenario: I have a drop down menu, with different values. When option
Here's the deal. Is there a way to have strings tokenized in a line

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.