Permalink
Browse files

simpler shader

1 parent cabbc3f commit 7fe41693f7bc2d67fb0ebc176124011d86ee0069 @makc committed Apr 5, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 three.js/chromakey/index.html
@@ -44,7 +44,7 @@
void main()
{
vec3 tColor = texture2D( texture, vUv ).rgb;
- float a = (0.9 - dot(/*normalize(*/color/*)*/, tColor) / (length(tColor) + 0.05)) * 3.0;
+ float a = (length(tColor - color) - 0.5) * 7.0;
// gl_FragColor = vec4(a, a, a, 1.0);
gl_FragColor = vec4(tColor, a);
@@ -137,7 +137,7 @@
scene.add(floor);
- var movieMaterial = new ChromaKeyMaterial('girl.ogv', 242, 421, 0xff00);
+ var movieMaterial = new ChromaKeyMaterial('girl.ogv', 242, 421, 0xd400);
var movieGeometry = new THREE.PlaneGeometry(60, 105, 4, 4);
var girls = []

0 comments on commit 7fe4169

Please sign in to comment.