I am creating 2 (or more) textures manually (2DArray, 1 slice), which are then filled via workspaces/shaders. I set that textures as diffuse/details/normals/detailNormals, etc. but always its just the first texture I set the one that works, the other ones are "omitted"
in quotes because: Its not being binded in the shader (checked with renderdoc), but the shader it is generating the corresponding blocks, but its using the first texture for it.
For example, something like this (pseudocode):
Code: Select all
texture1 = createTexture( myTextureONE );
texture2 = createTexture( myTextureTWO );
datablock->setTexture( DIFFUSE, texture1 );
datablock->setTexture( DETAIL0, texture2 );Code: Select all
slot 5: textureMaps0 myTextureONECode: Select all
uniform sampler2DArray textureMaps0;
........
vec4 detailCol0 = texture( textureMaps0, vec3( (inPs.uv0.xy), texIndex_detailMapIdx0 ) )
........
pixelData.diffuse = texture( textureMaps0, vec3( (inPs.uv0.xy), texIndex_diffuseIdx ) )Code: Select all
texture1 = createOrRetrieveTexture( myTextureONE.dds );
texture2 = createOrRetrieveTexture( myTextureTWO.png ); //with other format to test if it binds a different array
datablock->setTexture( DIFFUSE, texture1 );
datablock->setTexture( DETAIL0, texture2 );Code: Select all
slot 5: textureMaps0 [Hash 0x324234]
slot 6: textureMaps1 [Hash 0x567657]Code: Select all
uniform sampler2DArray textureMaps0;
uniform sampler2DArray textureMaps1;
........
vec4 detailCol0 = texture( textureMaps1, vec3( (inPs.uv0.xy), texIndex_detailMapIdx0 ) )
........
pixelData.diffuse = texture( textureMaps0, vec3( (inPs.uv0.xy), texIndex_diffuseIdx ) )I also tried with N textures and when they are manually created.. mCapacity/mSize is always 1 and with textures loaded by file is indeed N
I am still looking for more clues
thanks!

