A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged


this is how I solved this issue for myself. I hope it helps , ) In the frag shader the important bits are. . . vec2 rotate(vec2 v, float a) { float s = sin(a); float c = cos(a); mat2 m = mat2(c, -s, s, c); return m * v; } void main() { .... .... //The delta position of light vec3 LightDir = vec3(LightPos.xy - (...

Top 50 recent answers are included