If I write this shader:
[source lang="cpp"]uniform samplerCube cubeTest;uniform samplerCube terrainNoiseTexture;void main(void){ fragmentColour.rbg = texture(terrainNoiseTexture, vec3(rawNormal.xyz)).rrr; fragmentColour.rbg += texture(cubeTest, vec3(rawNormal.xyz)).rrr; fragmentColour.a = 1;}[/source]
I can suddenly read from the black cubemap as expected....
Maybe I just should update my drivers...
Still nothing. So what could cause a cubemap to be all blick until I sample another cubemap first?
Show differencesHistory of post edits
#2PAndersson
Posted 23 November 2012 - 07:53 PM
If I write this shader:
[source lang="cpp"]uniform samplerCube cubeTest;uniform samplerCube terrainNoiseTexture;void main(void){ fragmentColour.rbg = texture(terrainNoiseTexture, vec3(rawNormal.xyz)).rrr; fragmentColour.rbg += texture(cubeTest, vec3(rawNormal.xyz)).rrr; fragmentColour.a = 1;}[/source]
I can suddenly read from the black cubemap as expected....
Maybe I just should update my drivers...
Still nothing. So what could cause a cubemap to be all blick until I sample another cubemap first?
[source lang="cpp"]uniform samplerCube cubeTest;uniform samplerCube terrainNoiseTexture;void main(void){ fragmentColour.rbg = texture(terrainNoiseTexture, vec3(rawNormal.xyz)).rrr; fragmentColour.rbg += texture(cubeTest, vec3(rawNormal.xyz)).rrr; fragmentColour.a = 1;}[/source]
I can suddenly read from the black cubemap as expected....
Maybe I just should update my drivers...
Still nothing. So what could cause a cubemap to be all blick until I sample another cubemap first?
#1PAndersson
Posted 23 November 2012 - 07:10 PM
If I write this shader:
[source lang="cpp"]uniform samplerCube cubeTest;uniform samplerCube terrainNoiseTexture;void main(void){ fragmentColour.rbg = texture(terrainNoiseTexture, vec3(rawNormal.xyz)).rrr; fragmentColour.rbg += texture(cubeTest, vec3(rawNormal.xyz)).rrr; fragmentColour.a = 1;}[/source]
I can suddenly read from the black cubemap as expected....
Maybe I just should update my drivers...
[source lang="cpp"]uniform samplerCube cubeTest;uniform samplerCube terrainNoiseTexture;void main(void){ fragmentColour.rbg = texture(terrainNoiseTexture, vec3(rawNormal.xyz)).rrr; fragmentColour.rbg += texture(cubeTest, vec3(rawNormal.xyz)).rrr; fragmentColour.a = 1;}[/source]
I can suddenly read from the black cubemap as expected....
Maybe I just should update my drivers...