Nitlanguage.org
  • Nitdoc
  • gamnit
  • depth
  • selection
  • SelectionProgram
  • vertex_shader_source=

protected fun vertex_shader_source=(vertex_shader_source: Text)

gamnit :: SelectionProgram :: vertex_shader_source=

  • Doc
  • Linearization

Summary

  • Property definitions

  • gamnit$SelectionProgram$vertex_shader_source=

Property definitions

gamnit $ SelectionProgram :: vertex_shader_source=
	redef var vertex_shader_source = """
		// Vertex coordinates
		attribute vec4 coord;

		// Vertex translation
		uniform vec4 translation;

		// Vertex scaling
		uniform float scale;

		// Vertex coordinates on textures
		attribute vec2 tex_coord;

		// Model view projection matrix
		uniform mat4 mvp;

		// Model rotation
		uniform mat4 rotation;

		// Output for the fragment shader
		varying vec2 v_tex_coord;

		void main()
		{
			v_tex_coord = vec2(tex_coord.x, 1.0 - tex_coord.y);

			gl_Position = (vec4(coord.xyz * scale, 1.0) * rotation + translation) * mvp;
		}
		""" @ glsl_vertex_shader
lib/gamnit/depth/selection.nit:240,2--268,26
Nit standard library. Version .