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

  • Home
  • SEARCH
  • 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 8335589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:43:12+00:00 2026-06-09T03:43:12+00:00

I am trying to run 100000 and more particles. I’ve been watching many tutorials

  • 0

I am trying to run 100000 and more particles.
I’ve been watching many tutorials and other examples that demonstrate the power of shaders and OpenCL.

In one example that I watched, particle’s position was calculated based on the position of your mouse pointer(physical device that you hold with one hand and cursor on the screen).
The position of each particle was stored as RGB. R being x, G y, and B, z. And passed to pixel shader.And then each color pixel was drawn as position of particle afterward.

However I felt absurd towards this approach.

  • Isn’t this approach or coding style rather to be avoided?
  • Shoudn’t I learn how to use OpenCL and use the power of GPU’s multithreading to directly state and pass my intended code?
  • 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-09T03:43:13+00:00Added an answer on June 9, 2026 at 3:43 am

    Isn’t this approach or coding style rather to be avoided?

    Why?

    The entire point of shaders is for you to be able to do what you want, to more effectively express what you want to do, and to allow yourself greater control over the hardware.

    You should never, ever be afraid of re-purposing something for a different functionality. Textures do not store colors; they store data, which can be color, but it can also be other stuff. The sooner you stop thinking of textures as pictures, the better off you will be as a graphics programmer.

    The GPU and API exist to be used. Use it as you see fit; do not allow how you think the API should be used to limit you.

    Shoudn’t I learn how to use OpenCL and use the power of GPU’s multithreading to directly state and pass my intended code?

    Yesterday, I would have said “yes”. However, today this was released: OpenGL compute shaders.

    The fact that the OpenGL ARB and Khronos created this shader type and so forth is a tacit admission that OpenCL/OpenGL interop is not the most efficient way to generate data for rendering purposes. After all, if it was, there would be no need for OpenGL to have generalized compute functionality. There were 3 versions of GL 4.x that didn’t provide this. The fact that it’s here now is basically the ARB saying, “Yeah, OK, we need this.”

    If the ARB, staffed by many people who make the hardware, think that CL/GL interop is not the fastest way to go, then it’s pretty clear that you should use compute shaders.

    Of course, if you’re trying to do something right now, that won’t help; only NVIDIA has compute shader support. And even that’s only in beta drivers. It will take many months before AMD gets support for them, and many more before that support becomes solid and stable enough to use.

    Even so, you don’t need compute shaders to generate data. People have used transform feedback and geometry shaders to do LOD and frustum culling for instanced rendering. Do not be afraid to think outside of the “OpenGL draws stuff” box.

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

Sidebar

Related Questions

I've got a oracle 10g PL/SQL program that I'm trying to get to run,
I was trying out a code sample from this book that should demonstrate that
I'm trying to make a Lift app that I can run on App Engine
I'm trying to run the SSL examples from boost::asio and I'm getting an Invalid
I have been trying to run some java programs from a bash script in
I am trying run a program from a qmake .pro file which modifies the
Situation: I'm trying run an https store (xcart) under one domain secure.example.com and I
Trying to run the following command in php to run powershell command... the following
Trying to run my program in FreeBSD OS, I have the following results: $
Trying to run a self-hosted app on my Win 7 system, with little success.

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.