Sha256: 335cfb2cd6c14fdf373364539a94a2a4cd6438c246ace68303e6e5227b3bfb63

Contents?: true

Size: 387 Bytes

Versions: 4

Compression:

Stored size: 387 Bytes

Contents

#version 110

uniform sampler2D in_Texture;
uniform bool in_TextureEnabled;

varying vec4 var_Color;
varying vec2 var_TexCoord;

void main() {
  if (in_TextureEnabled)
    gl_FragColor = texture2D(in_Texture, var_TexCoord) * var_Color;
  else
    gl_FragColor = var_Color;

  float gray = dot(gl_FragColor.xyz, vec3(0.299, 0.587, 0.114));
  gl_FragColor = vec4(gray, gray, gray, 1.0);
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ray-0.2.1 test/res/frag_gray.c
ray-0.2.0 test/res/frag_gray.c
ray-0.1.1 test/res/frag_gray.c
ray-0.1.0 test/res/frag_gray.c