/usr/share/gazebo-9/media/materials/programs/deferred_rendering/ssao_vp.glsl is in gazebo9-common 9.0.0+dfsg5-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | uniform vec3 farCorner;
uniform mat4 wvp;
void main()
{
gl_Position = wvp * gl_Vertex;
// clean up inaccuracies for the UV coords
vec2 uv = sign(gl_Vertex.xy);
// convert to image space
uv = (vec2(uv.x, -uv.y) + 1.0) * 0.5;
gl_TexCoord[0].xy = uv;
// calculate the correct ray
// (modify XY parameters based on screen-space quad XY)
gl_TexCoord[1].xyz = farCorner * vec3(sign(gl_Vertex.xy), 1.0);
}
|