2D Lighting
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
2D Lighting
Well I want to understand how 2D lighting works in game programming. I've been searching around the web and I've seen tutorials on how to implement 2D Lighting in your game, but I need an explanation on how it works. I have also come across the word "shader", so I'm guessing that's pretty important. Can someone refer me to a good article explaining the general concept of 2D lighting. Or just explain it on the forum.
Re: 2D Lighting
Well, it really depends on what you want to do. It would really help if you would clarify that, because picking the right tool for the right job is important.
I'd say most 2D games simply draw their sprites with shadows and lighting on them and just leave it like that. For more fancy effects, shaders can be used. They're simple programs that are executed while drawing each pixel on screen, allowing you to modify it. They run on the GPU, because the GPU is very good at stuff like that. If that's what you want, go and learn some basic GLSL (they are tons of guides online, just google it) and then check out http://love2d.org/wiki/PixelEffect
I'd say most 2D games simply draw their sprites with shadows and lighting on them and just leave it like that. For more fancy effects, shaders can be used. They're simple programs that are executed while drawing each pixel on screen, allowing you to modify it. They run on the GPU, because the GPU is very good at stuff like that. If that's what you want, go and learn some basic GLSL (they are tons of guides online, just google it) and then check out http://love2d.org/wiki/PixelEffect
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests