Debian Codegraph @

code/renderergl2/glsl/depthblur_vp.glsl

raw
1 attribute vec4 attr_Position;
2 attribute vec4 attr_TexCoord0;
3
4 uniform vec4 u_ViewInfo; // zfar / znear, zfar, 1/width, 1/height
5
6 varying vec2 var_ScreenTex;
7
8 void main()
9 {
10 gl_Position = attr_Position;
11 vec2 wh = vec2(1.0) / u_ViewInfo.zw - vec2(1.0);
12 var_ScreenTex = (floor(attr_TexCoord0.xy * wh) + vec2(0.5)) * u_ViewInfo.zw;
13
14 //vec2 screenCoords = gl_Position.xy / gl_Position.w;
15 //var_ScreenTex = screenCoords * 0.5 + 0.5;
16 }