Nitlanguage.org
  • Nitdoc
  • gamnit
  • depth
  • particles
  • ParticleProgram
  • fragment_shader_source=

protected fun fragment_shader_source=(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 standard library. Version .