Skip to content

Instantly share code, notes, and snippets.

@jimmyjonezz
Created October 26, 2019 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimmyjonezz/e56d976b51980ea340ac7c3d27297755 to your computer and use it in GitHub Desktop.
Save jimmyjonezz/e56d976b51980ea340ac7c3d27297755 to your computer and use it in GitHub Desktop.
shader_type canvas_item;
varying float VAR1;
void vertex()
{
VAR1 = VERTEX.y;
}
void light()
{
if( ( LIGHT_VEC.y - VAR1 ) <= 0.0 )
{
SHADOW_VEC.y += -VAR1 + 1.0;
}
else
{
LIGHT *= 0.0;
}
LIGHT *= 1.0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment