Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'd say probably not number 1.. you have a limited number of registers for shader uniforms, which varies by card. You can query GL_MAX_FRAGMENT_UNIFORM_COMPONENTS to find out your limit. On newer cards it runs into the thousands, e.g. a Quadro FX 5500 has 2048, apparently. (http://www.nvnews.net/vbulletin/showthread.php?t=85925). It depends what hardware you want it to run on, and what other uniforms you might want to send to the shader too.</p> <p>Number 2 could be made to work depending on your requirements. Sorry for the vagueness here, hopefully someone else can give you a more precise answer, but you must be explicit in how many texture calls you make in older shader model cards. It also depends how many texture reads you want to do per fragment, you probably wouldn't want to be trying to read 1000's of elements per fragment, again, depending on your shader model and performance requirements. You could pack values into RGBAs of a texture, giving you 4 reads per texture call, but with random access as a requirement, this might not help you.</p> <p>I'm not sure about number 3, but I'd suggest maybe looking at UAV (unordered access views) although i think that is DirectX only, with no decent openGL equivalent. I think there's an nVidia extension for openGL, but again you then restrict yourself to a pretty strict minimum spec.</p> <p>It's unlikely that passing 1000's of items of data to your fragment shader is the best solution to your problem.. perhaps if you gave more details on what you're trying to achieve you may get alternative suggestions?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload