PDA

View Full Version : Max usable Texture Image Units in Fragment Shader



KrisZero
09-11-2013, 04:10 PM
Hi,

i want to active and bind as much textures as possible and then just switch the sampler that uses a different unit in fragment-shader.

I have 2 Machines:

1. Windows 7 with Nvidia graphic card
GL_MAX_TEXTURE_IMAGE_UNITS: 32
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: 192
On this machine I can (only) use 32 Texture Image Units.

2. Windows 7 and Arch-Linux with ATI graphic card
GL_MAX_TEXTURE_IMAGE_UNITS: 16
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: 32
On this machine I can use 32 Texture Image Units too...

Why it's the same? On both machines I can have max 32 Units and this ist ok but I want to know how to determine that.

GClements
09-12-2013, 02:22 PM
i want to active and bind as much textures as possible and then just switch the sampler that uses a different unit in fragment-shader.

I have 2 Machines:

1. Windows 7 with Nvidia graphic card
GL_MAX_TEXTURE_IMAGE_UNITS: 32
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: 192
On this machine I can (only) use 32 Texture Image Units.

2. Windows 7 and Arch-Linux with ATI graphic card
GL_MAX_TEXTURE_IMAGE_UNITS: 16
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: 32
On this machine I can use 32 Texture Image Units too...

Why it's the same? On both machines I can have max 32 Units and this ist ok but I want to know how to determine that.
GL_MAX_TEXTURE_IMAGE_UNITS is the maximum number of texture units which can be used from the fragment shader. There are similar variables for the other shaders, e.g. GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS for the vertex shader. GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS is the maximum number of texture units in total, and represents the (exclusive) upper bound for the argument to glActiveTexture().

KrisZero
09-12-2013, 04:34 PM
GL_MAX_TEXTURE_IMAGE_UNITS is the maximum number of texture units which can be used from the fragment shader. There are similar variables for the other shaders, e.g. GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS for the vertex shader. GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS is the maximum number of texture units in total, and represents the (exclusive) upper bound for the argument to glActiveTexture().

yeah, but if GL_MAX_TEXTURE_IMAGE_UNITS is the maximum number of texture units which can be used from the fragment shader
and it shows 16, why can I use 32 in fragment shader?