1 uniform sampler3D m_Texture; 2 uniform int m_Rows; 3 uniform float m_InvDepth; 4 5 varying vec2 texCoord; 6 7 void main(){ 8 float depthx=floor(texCoord.x); 9 float depthy=(m_Rows-1.0) - floor(texCoord.y); 10 //vec3 texC=vec3(texCoord.x,texCoord.y ,0.7);// 11 12 vec3 texC=vec3(fract(texCoord.x),fract(texCoord.y),(depthy*m_Rows+depthx)*m_InvDepth);// 13 gl_FragColor= texture3D(m_Texture,texC); 14 }