Jump to content

Glsl - Running out of samplers - can I use sampler arrays?


Recommended Posts

Hi, I'm creating a glsl blend shader for the Houdini viewport and I'm pretty sure I'm hitting the max amount of samplers as when I get above ~22 or so the material starts to go black.

I was looking at sampler 2d arrays as a solution to this as all my textures are the same size, however I don't know if this is supported. I was looking at one of the shaders shipped with Houdini that is exactly the kind of thing I'm looking for,

found in Side Effects Software\Houdini 19.0.657\houdini\glsl\block\GL32\game_layer.blk

image.thumb.png.f11ff0396d173d31e3525f6e46ba8dfc.png

Which is later referenced like so:
image.png.d2f73285b9bdce01de966e3aabfd8691.png

For regular sampler2D textures I got them into the shader through a "file - image" parameter in the opengl node type properties  and I was hoping using array maps would be supported in a similar way, maybe through a multiparm folder, but I've had no luck trying to get it through like that.

Does anyone know if this is supported? Or maybe there's a better way of getting more samplers into the shader?

Thanks so much,

Ole

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...