Sha256: ad211f631f47637ecb3a3fe81711a1290fa968b4a0c33e9ae2651afa469f0ff3

Contents?: true

Size: 415 Bytes

Versions: 4

Compression:

Stored size: 415 Bytes

Contents

#version 110

uniform sampler2D in_Texture;
uniform bool in_TextureEnabled;

uniform vec3 in_Light;

varying vec4 var_Color;
varying vec3 var_Normal;

void main() {
  float intensity = dot(in_Light, normalize(var_Normal));

  float factor = 0.5;
  if (intensity > 0.1) factor = 1.0;
  else if (intensity < 0.0)  factor = 0.2;

  vec4 light = vec4(factor, factor, factor, 1.0);
  gl_FragColor = var_Color * light;
}

Version data entries

4 entries across 4 versions & 1 rubygems

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