Hello.
I compiled example1 but a shadow of the last additional light was only drawn.
OpenGL:
This doesn't happen in Direct3D9, only in OpenGL.
Direct3D9:
I did not change the example code.
The ambient color also doesn't work.
How do I solve them?
Thank you.
Multiple lights with XEffects
Re: Multiple lights with XEffects
Hi, Xeffects renders a shadow map from one light only to produce shadows, so extra lights will not affect shadows.
You can render multiple shadow maps, and altering the code to do this is relatively easy.
Frame rates will drop though, as every etra light requires a complete redraw of each scene.
You´ll need to re-render the depth map, calling the same code but using a different light, then change the shader to look-up the depth value from both depth maps. The code is easy enough to follow if you´ve experience with this sort of thing, if not, it will take you a good few hours of digging, thinking and research on the principles.
Behaviour with different drivers is normal because the code has not been exhaustively tested for all drivers.
You can render multiple shadow maps, and altering the code to do this is relatively easy.
Frame rates will drop though, as every etra light requires a complete redraw of each scene.
You´ll need to re-render the depth map, calling the same code but using a different light, then change the shader to look-up the depth value from both depth maps. The code is easy enough to follow if you´ve experience with this sort of thing, if not, it will take you a good few hours of digging, thinking and research on the principles.
Behaviour with different drivers is normal because the code has not been exhaustively tested for all drivers.
Re: Multiple lights with XEffects
I'll try to effort to modify the code.
Although, I don't know why pre-compiled binary works well if even the device is OpenGL.
Although, I don't know why pre-compiled binary works well if even the device is OpenGL.
Re: Multiple lights with XEffects
Probably the binary was compiled from different code changes, hence different functionality.
In any case, XEffects is easy enough to follow although it will take some time to go through, once you have done that, you will be able to make the changes you need in future easily.
No pain, no gain as they say!
In any case, XEffects is easy enough to follow although it will take some time to go through, once you have done that, you will be able to make the changes you need in future easily.
No pain, no gain as they say!
Re: Multiple lights with XEffects
Thank you so much!
Re: Multiple lights with XEffects
Hello! Did you fix the problem? (irrlicht 'trunk' work correctly with xEffects, problem in irrlicht 1.8.x).