2D Shader for affecting lights based on y-distance

by cardinalzenn   Last Updated July 12, 2019 08:13 AM - source

I've been struggling with this problem for a few weeks (mostly because I'm so new to shaders), but I have an angled camera for my 2D game that uses lights.

I saw this link about the '3D light simulation' and wondered how the shader responsible was written. I'm in Godot, which uses it's own shader language. I just need a way to compare the y-value's of the lightsource and the sprite. Any help would really be appreciated!

Related Questions

Dissolving fog of war when entering a room

Updated August 03, 2018 18:13 PM

Shader: displacement map to the all screen?

Updated August 30, 2019 11:13 AM

Godot: error(10) expected '(' after Identifier

Updated January 08, 2019 07:13 AM