Hmm, are you sure about this? I think that I am using "the screen shadowing method". You don't really have to change the shader of anything. The shadows are calculated in a different pass then overlayed on the screen, so it is independent of the scene's materials.Sudi wrote:But ur still using the direct shadow method...
I'm trying really hard to get screen shadowing to work......so that i don't have to change the shader of each model which should receive shadows.
XEffects - Reloaded - New Release (V 1.4)
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Ok i might be wrong but to me it looks like ur setting the material for each node urself in XEffects.
haven't checked the references ur using there yet.
i guess the method i mean is called deffered shading so that u only render the depthmap twice. once from the point of the cam and then from the light. transform both into camspace and compare. then shade the already rendered scene.
Code: Select all
ShadowNodeArray[i].node->getMaterial(m).MaterialType =
(ShadowNodeArray[i].shadowMode == ESM_CAST) ? (E_MATERIAL_TYPE)WhiteWash
: (E_MATERIAL_TYPE)Solid[ShadowNodeArray[i].filterType];
i guess the method i mean is called deffered shading so that u only render the depthmap twice. once from the point of the cam and then from the light. transform both into camspace and compare. then shade the already rendered scene.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Hmm yeah but to render the depth map you still need to temporarily change the material like I do unless you had direct access to the depth buffer or something. So in the end it's the same thing (Except filtering becomes screen space, which might not be as accurate).Sudi wrote:Ok i might be wrong but to me it looks like ur setting the material for each node urself in XEffects.
haven't checked the references ur using there yet.Code: Select all
ShadowNodeArray[i].node->getMaterial(m).MaterialType = (ShadowNodeArray[i].shadowMode == ESM_CAST) ? (E_MATERIAL_TYPE)WhiteWash : (E_MATERIAL_TYPE)Solid[ShadowNodeArray[i].filterType];
i guess the method i mean is called deffered shading so that u only render the depthmap twice. once from the point of the cam and then from the light. transform both into camspace and compare. then shade the already rendered scene.
This is a touch-and-go method, I change it, render, then change it back, so it's transparent to the user. I do this in the depth render pass and in the shadow mapping pass.
I do like the performance aspect of the deferred idea, I will definately try it some time when I look more into deferred shading.
Last edited by BlindSide on Wed Oct 15, 2008 2:20 pm, edited 1 time in total.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
It's a geforce 59XX (can't remember the XXs!) and it's much below 20fps on both so fairly unusable for anything unfortunatelyBlindSide wrote:What video card you using? You're referring to just the point light demo right? Keep in mind that the point lights even at the lowest res/filter still offer pretty decent quality since you're using 6 shadowmaps instead of one, and there is no wasted space so the resolution is used sparingly.
wait a minute, isn't this how projective shadows work anyway?Sudi wrote: i guess the method i mean is called deffered shading so that u only render the depthmap twice. once from the point of the cam and then from the light. transform both into camspace and compare. then shade the already rendered scene.
what is xeffects doing if not this method?! I really need to have a look at the code
just some stats for you, on my P4 2GHz geforce 7300GT (latest drivers, DX9) I get:
Example 1:
- OGL: with best settings max FPS = 13
- OGL: with crapest settings max FPS = 17
- DX: with best settings max FPS = 11
- DX: with crapest settings max FPS = 16
Example 2:
- OGL: with best settings max FPS = 2
- OGL: with crapest settings max FPS = 7
- DX: with best settings max FPS = 1
- DX: with crapest settings max FPS = 7
OGL generally seems to perform a tad better (not by a lot tho').
No ATI machine I can test it on unfortunatly
Hi again,
You seem to have fixed all my shader compile errors, great.
Direct3D still runs fine... but for OpenGL, the included binary crashes! (the previous one did too, after I attempted to fix the errors myself)
Here's the output with my graphics card info etc: http://pastebin.com/m42b0a204
It says GLSL version is 0.0
Now I tried compiling it myself. Using Irrlicht 1.4.2.
And it runs without crashing! also this time reports that GLSL version is 1.0
It seems getVendorInfo is not defined. So I commented out the line you say (so ScreenRTT is screen sized), which gives this
http://xzist.org/temp/xeffects1.png
setting the screenRTT size to (512,512) fixes the size problem, but it's still not right:
http://xzist.org/temp/xeffects2.png
My graphics card (ATI mobility radeon 9700) drivers are a few years old, it's an acer laptop and they don't provide updated ones. (and I have never managed to update them myself)
Hmm!
Direct3D notes:
- I get about 30-40 FPS on the lower settings. As high as it will go @2048x2048 and 16 PCF it's about 20 FPS.
That's for the first example. Example 2 is about 20 fps on the lowest settings, 4 on the highest!
- when setting the shadowmap resolution too high for my card (4096x4096), it gives lots of "Error: Could not set render target." messages. Is it possible to automatically fall back to a lower size if that is not supported?
You seem to have fixed all my shader compile errors, great.
Direct3D still runs fine... but for OpenGL, the included binary crashes! (the previous one did too, after I attempted to fix the errors myself)
Here's the output with my graphics card info etc: http://pastebin.com/m42b0a204
It says GLSL version is 0.0
Now I tried compiling it myself. Using Irrlicht 1.4.2.
And it runs without crashing! also this time reports that GLSL version is 1.0
It seems getVendorInfo is not defined. So I commented out the line you say (so ScreenRTT is screen sized), which gives this
http://xzist.org/temp/xeffects1.png
setting the screenRTT size to (512,512) fixes the size problem, but it's still not right:
http://xzist.org/temp/xeffects2.png
My graphics card (ATI mobility radeon 9700) drivers are a few years old, it's an acer laptop and they don't provide updated ones. (and I have never managed to update them myself)
Hmm!
Direct3D notes:
- I get about 30-40 FPS on the lower settings. As high as it will go @2048x2048 and 16 PCF it's about 20 FPS.
That's for the first example. Example 2 is about 20 fps on the lowest settings, 4 on the highest!
- when setting the shadowmap resolution too high for my card (4096x4096), it gives lots of "Error: Could not set render target." messages. Is it possible to automatically fall back to a lower size if that is not supported?
-
- Posts: 81
- Joined: Thu Oct 16, 2008 6:50 am
Ambient light
Blindside - does this support ambient light?
Thanks
Anton
Thanks
Anton
Why did you make another account aheymann? :S
Currently it supports global ambient color through effectHandler::setAmbientColor() and also you can set individual material properties if you want to effect the color in a diffuse manner. Please look at the tutorial for more information.
torlief, what problems are you encountering now? There is nothing restricting any of the resolutions to be 2^n except for hardware and Irrlicht limitations. These include problems with ATI in OpenGL and lack of large RTT support in DX in Irrlicht.
Cheers
Currently it supports global ambient color through effectHandler::setAmbientColor() and also you can set individual material properties if you want to effect the color in a diffuse manner. Please look at the tutorial for more information.
torlief, what problems are you encountering now? There is nothing restricting any of the resolutions to be 2^n except for hardware and Irrlicht limitations. These include problems with ATI in OpenGL and lack of large RTT support in DX in Irrlicht.
Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Totally forgot to say that it works great over here.
I'm using a laptop with geforce8600gt. well framerate is really when using the pointlight.
btw i have done some research and found some really nice article about deffered lightning. but none about shadowing which is kinda making me believe that its not something u should do or maybe no one has simply done...or i'm to stupid to find it. anyway keep up the good work.
I'm using a laptop with geforce8600gt. well framerate is really when using the pointlight.
btw i have done some research and found some really nice article about deffered lightning. but none about shadowing which is kinda making me believe that its not something u should do or maybe no one has simply done...or i'm to stupid to find it. anyway keep up the good work.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.