TextureArray bug?

I am implementing texture arrays. The problem is that the textures dont seem to wrap according to the settings.

Code snippets as follows…

TextureArray dmta=new TextureArray(dma);



if i just use the following the surface is blank…

vec4 diffuseColor1=texture2D(m_DIFFUSEMAPS[1],texCoord1);

To make it work I have to do the following…

vec2 tc1;
vec4 diffuseColor1=texture2D(m_DIFFUSEMAPS[1],tc1);

Why doesnt the wrap mode work in texture arrays?

is wrap mode legacy from the Texture object that just is not implemented in TextureArray?

It would be nice to know the answers to these. The work around code is fine but I would like to put my concerns of “is this the correct way” to bed.

Many Thanks

I had at some point I had repeating texturemaps in arrays, but this is quite a while ago, when they were new.

I realise now that the TextureArray is not being passed to the frag.

Here are the code snippets…


 Texture2D DiffuseMaps
 Texture2D HeightMaps

nothing declared or any mention in regard to maps.

uniform sampler2D m_DIFFUSEMAPS[6];
uniform sampler2D m_HEIGHTMAPS[6];

I cant seem to find an example of implementation. What am I doing wrong?

Many Thanks

I tried changinh the materialParameters from Texture2D to TextureArray with no errors and no change in results.

There’s an example on how to use them here:

Sorted thank you.

The wiki & documentation have lots of broken links which makes it difficult to understand some aspects. I will retain the link to the examples for future reference.

Many Thanks

Do you know of any specific pages which have issues with links?

It may well be user contributed content links that are broken. I especially notice a lot by mifth. All the links to the shaddow blow project are defunct or the location does not hold the source. If I come across any links that are broken I will keep you informed.

Just so you know, you can login onto the wiki with your credentials and modify any pages.

1 Like