You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
454 B
15 lines
454 B
14 years ago
|
uniform sampler3D m_Texture;
|
||
|
uniform int m_Rows;
|
||
|
uniform float m_InvDepth;
|
||
|
|
||
|
varying vec2 texCoord;
|
||
|
|
||
|
void main(){
|
||
13 years ago
|
float rows = float(m_Rows);
|
||
|
float depthx = floor(texCoord.x);
|
||
|
float depthy = (rows - 1.0) - floor(texCoord.y);
|
||
14 years ago
|
//vec3 texC=vec3(texCoord.x,texCoord.y ,0.7);//
|
||
|
|
||
13 years ago
|
vec3 texC = vec3(fract(texCoord.x),fract(texCoord.y),(depthy * rows + depthx) * m_InvDepth);
|
||
|
gl_FragColor = texture3D(m_Texture, texC);
|
||
14 years ago
|
}
|