Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

How many textures can sent to a shader?

Fri Jan 25, 2013 12:38 am

In the R-Pi GPU, how many textures can be pushed into a single render pass with a GLES2 shader?

And can I do a texture lookup in a vertex shader?

User avatar
paddyg
Posts: 2529
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: How many textures can sent to a shader?

Fri Jan 25, 2013 1:11 pm

There's a memory or size limit which is probably a more real limit, what do you want to do that would need more than a handful of textures (for one shader). For sampler lookups there are certainly texture2DLod, texture2DProjLod etc see http://www.khronos.org/opengles/sdk/doc ... e-card.pdf
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
PeterO
Posts: 5829
Joined: Sun Jul 22, 2012 4:14 pm

Re: How many textures can sent to a shader?

Fri Jan 25, 2013 1:27 pm

ISTR that glGet for GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS returns 8 (the minimum allowable value for standard compliance)..

See glGet on http://www.khronos.org/opengles/sdk/docs/man/

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Return to “OpenGLES”