2
votes

I can't seem to be able to have both texture2D() and textureCube() in one shader. When I do, nothing shows up and there is no error. I tried this both with my own shader loader and the Apple GLSL shader builder and the same thing happens. It happens even if I have textureCube() in the vertex shader and texture2D() in the fragment. They seem to work fine by themselves, but as soon as they're called together, no matter in which order, nothing shows up.

1

1 Answers

7
votes

You need to bind both textures as uniforms in both shaders and assign two different texture units, each with one of the textures to the sampler uniforms.