AnsweredAssumed Answered

OpenGL texture3D sample3D problem

Question asked by jbizcocho on Jul 23, 2012
Latest reply on Aug 1, 2012 by jbizcocho

Hello guys,

Right now i'm preparing a shader that contains glow, bloom and FXAA on a single pass. The problem is that i'm using one sample3D for a texture lookup in the glow part. and I don't know why, when I try to validate the shader it appears the error:

"Validation Error!, Different sampler types for same sample texture unit in fragment shader". here is a summary of the problematic part of the code:


#version 130 
#extension GL_EXT_gpu_shader4 : enable 

precision mediump float; 

uniform vec2            vInvViewport; 
uniform float            fGlowMultiplier; 
uniform int                iDebug;
uniform sampler3D sourceLUT; 
uniform sampler2D sourceTex; 
uniform sampler2D sourceBloom; 
uniform sampler2D sourceBlurData; 

void main() 
    vec3 vColor; 
    if( iDebug == 0 ) 
        vColor = FxaaPixelShader( gl_TexCoord[0].xy, sourceTex, vInvViewport ); 
        vColor = texture2D( sourceTex, gl_TexCoord[0].xy ).rgb; 

    vec3 vBloom = texture2D( sourceBloom, gl_TexCoord[0].xy ).rgb; 
    vColor += fGlowMultiplier * vBloom;

    vec4  vBlak = texture3D( sourceLUT, ).xyzw;
    float  fBlik    = texture2D( sourceBlurData, gl_TexCoord[0].xy ).x; 

    gl_FragColor = vec4(, fBlik ); 


If I comment the line 33, it works perfectly. So I dont know If I'm not using the function / variables in the proper way, or maybe its a driver confilct.


Does anyone have dealed with this issue before? .


My configuration is: Ubuntu 12.04, latest catalyst and ATI HD6870. I'm forcing the app to use OpenGL 2.1 with extensions when its possible to apply ^_^.



Thanks in advance people! .