Nitlanguage.org
  • Nitdoc
  • gamnit
  • depth
  • particles
  • ParticleProgram
  • _fragment_shader_source

private var _fragment_shader_source: Text

gamnit :: ParticleProgram :: _fragment_shader_source

  • Doc
  • Linearization

Summary

  • Property definitions

  • gamnit$ParticleProgram$_fragment_shader_source

Property definitions

gamnit $ ParticleProgram :: _fragment_shader_source
	redef var fragment_shader_source = """
		precision mediump float;

		// Input from the vertex shader
		varying vec4 v_color;

		// Does this particle use a texture?
		uniform bool use_texture;

		// Texture to apply on this particle
		uniform sampler2D texture0;

		void main()
		{
			if (use_texture) {
				gl_FragColor = texture2D(texture0, gl_PointCoord) * v_color;
			} else {
				gl_FragColor = v_color;
			}
		}
		""" @ glsl_fragment_shader
lib/gamnit/depth/particles.nit:255,2--275,28
Nit tools. Version .