Skip to content

Instantly share code, notes, and snippets.

@mattdesl
Created May 17, 2016 21:25
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattdesl/e4c91148e97ea2778653ca0cf96ee84d to your computer and use it in GitHub Desktop.
Save mattdesl/e4c91148e97ea2778653ca0cf96ee84d to your computer and use it in GitHub Desktop.
shadow on transparent plane ThreeJS r76
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
varying vec3 vLightFront;
#ifdef DOUBLE_SIDED
varying vec3 vLightBack;
#endif
#include <common>
#include <packing>
#include <lights_pars>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
void main() {
gl_FragColor = vec4(vec3(0.0), 1.0 - getShadowMask());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment