How do I make 2D shadow cones in GLSL fragment shader?
I’m trying to make a 2D renderer in OpenGL with lights and shadows, and the lights work pretty well. But the shadows are not cones, they project the object as it is onto an object with a lower z-position. Here’s an image of what it looks like: shadow. I can’t figure out how to make shadow cones that extend away from the light source. This is my fragment shader:
incompatible options for link
When I run the program I get these two errors
0(6) : error C7011: implicit cast from “float” to “vec4”
(0) : error C2003: incompatible options for link