Can't use multiple lights in X-Effects R 1.3(solved)

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
jwatson1993
Posts: 37
Joined: Fri Nov 04, 2011 12:15 am

Can't use multiple lights in X-Effects R 1.3(solved)

Post by jwatson1993 »

I have a very weird problem that I can't begin to figure out how to solve. I downloaded Blindside's well-reviewed shader(X-effects) and loaded up the examples to try and see how I would integrate them into my project. When I finally got them linked, Example1 was bugged. It would only display one light, specifically the last light that was added to the effects handler. I didn't change any code. I loaded up other examples and added lights to them to see if it was true for all of them, which it was. Whenever I added a new shadow light, it would be the only light displayed. This is not what was advertised, and I couldn't find any other complaints like this. What makes it even stranger is that this isn't a problem with the .dll or my graphics card. I went to the /bin and started up the pre-compiled .exe files, and they worked as they should, e.g. Example1 had two counter-rotating lights.

I don't know what's going on. It could be some strangeness with the irrlicht library version I have( I was using 1.8 alpha but I think I successfully downgraded to the last stable version), or it could be some code bug in the shader that nobody noticed, and I'm just the last to download it in a while. I don't know a whole lot about shaders and shadow-mapping, I was hoping to look at the Blindside's code and learn. From what I can tell it loops through the lights just fine, but somehow a map is getting overwritten. It's a great shader, but for some reason it's just not happening for me. Thanks in advance for any help.

Edit: Solved. Nobody responded, but just in case somebody else runs in to this problem I don't want them to go crazy like I did. Blindside's shader will not work with the 1.8 alpha(at least the build I did, I can't comment on what happened between February and now in terms of irrlicht development), but will work with 1.7.2. Took me forever to get all the files properly copied and arranged so that I could downgrade. Turns out I didn't downgrade after all, the .dll file was still 1.8. Looks amazing, looking forward to using this in my game.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Re: Can't use multiple lights in X-Effects R 1.3(solved)

Post by BlindSide »

Oh woops glad you got this sorted -_- when the official 1.8 is released I might have a look at fixing this properly
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Can't use multiple lights in X-Effects R 1.3(solved)

Post by CuteAlien »

Hi BlindSide... would be cool if you could find time before that. Because if it turns out there is a problem in 1.8 it would be better if we find it before release when we can still fix it easily.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply