/usr/src/castle-game-engine-5.2.0/opengl/glsl/image.vs.inc is in castle-game-engine-src 5.2.0-3.
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 19 20 21 22 23 24 25 26 27 28 29 30 31 | { -*- buffer-read-only: t -*- }
{ DON'T EDIT -- this file was automatically generated from "image.vs" }
'attribute vec2 vertex;' + LineEnding +
'attribute vec2 tex_coord;' + LineEnding +
'' + LineEnding +
'/* Note that passing viewport_size (just 2 floats) removes the need to pass' + LineEnding +
' a projection_matrix (16 floats).' + LineEnding +
'' + LineEnding +
' We only pass a size of the context (width, height),' + LineEnding +
' since we know that the viewport for 2D drawing is always the full context,' + LineEnding +
' with coordinates matching pixels.' + LineEnding +
' (TCastleWindowCustom.EventRender even sets such projection matrix,' + LineEnding +
' although we don''t depend on it for TGLImage rendering after all.)' + LineEnding +
' This allows us to simplify' + LineEnding +
' gl_Position = projection_matrix * vec4(vertex, 0.0, 1.0);' + LineEnding +
' because we know that the projection_matrix actually corresponds to' + LineEnding +
' OrthoProjection(0, viewport_size.x, 0, viewport_size.y);' + LineEnding +
'*/' + LineEnding +
'uniform vec2 viewport_size;' + LineEnding +
'varying vec2 tex_coord_frag;' + LineEnding +
'' + LineEnding +
'/* Simple GLSL shader to apply 2D texture.' + LineEnding +
' Must be suitable also for GLES20, so don''t use any deprecated gl_Xxx' + LineEnding +
' variables. */' + LineEnding +
'' + LineEnding +
'void main(void)' + LineEnding +
'{' + LineEnding +
' gl_Position = vec4(vertex * 2.0 / viewport_size - vec2(1.0), 0.0, 1.0);' + LineEnding +
' tex_coord_frag = tex_coord;' + LineEnding +
'}' + LineEnding +
''
|