Dynamic lights .. any way to improve?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Eigen
Competition winner
Posts: 375
Joined: Fri Jan 27, 2006 2:01 pm
Location: Estonia
Contact:

Dynamic lights .. any way to improve?

Post by Eigen »

Hey.

I have a slight problem with dynamic lights. Let me start with a screenshot.
Image

My issue is, that I'd like the lighting on the wall to be smoother. It is vertex based at the moment, so it's not looking very good. I know I could divide the very simple geometry of the wall to smaller bits, but I would rather not raise the polycount. So, as I understand, a way to achive that would be to use a shader.

I googled and found an article about unified per-pixel lighting. Seems perfect.

But since my shader knowledge is very small, how would I go about using that tehcnique? Is it even possible? Also, I'd like to keep my lightmaps intact when using dynamic lights.

Or do you have any other suggestions?
Thanks in advance!
Dan911
Posts: 21
Joined: Tue Dec 16, 2008 11:28 pm

Post by Dan911 »

Check out tutorial 11, has per pixel lighting
http://irrlicht.sourceforge.net/docu/example011.html

if thats not what your looking for, i looked at the gamasutra shader code and i could convert that into HLSL/GLSL?cg for you
Eigen
Competition winner
Posts: 375
Joined: Fri Jan 27, 2006 2:01 pm
Location: Estonia
Contact:

Post by Eigen »

Yes I have tried the example 11, but it's essentially the same, still vertex based lighting. You can see that if you scale the room mesh on the Y axis, the upper parts of walls are still lighted by the light way below.

If you could convert that for me, I'd be very happy. :)
Then I'd have to figure out how to put it into action and see if it works.
Eigen
Competition winner
Posts: 375
Joined: Fri Jan 27, 2006 2:01 pm
Location: Estonia
Contact:

Post by Eigen »

I found Nadro's IrrCg to contain a per-pixel lighting shader, but I haven't been able to compile it with DevCpp. It only contains a VisualStudio binaries.
Post Reply