BlindSide's HLSL Shader Pack

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Looks impressive blindside! however I got errors when running it so I decided to build the example you're including, but it´s missing the following header:
"shadowWrapper.h"
Could you please upload it ;)

regards,
Alvaro
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Woops, this is a small mistake. Simply change the "shadowWrapper.h" to "effectWrapper.h" in the file, as I changed the name halfway through but forgot to change it in the source! :oops:

(It should be fixed in the new one but maybe I forgot to change something in the example code.)

PS: You say you got an error running the binary? Please tell me what kind of error and also your graphics card/operating system.

Cheers
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Thanks for replying!

I'll rename it and see what happens, but I'll also redownload the latest version. Thanks a bunch.

I got the error trying to run on an Nvidia Geforce FX5900 ultra 256 mb, so perhaps it doesn't support your shader version. Will try on the other PC with a 6800 GT 256 Mb. They say it's the minimum to run this sort of apps ;)

cheers!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I'm quite busy these days, but I'll have a look at this stuff maybe next weekend - I'm really interested in this stuff. What a pity that there are so much other things that are bothering me right now. :(
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

@Blindside: indeed it was the video card. Runs great (115-120fps) on the 6800 GT. Cool work!
And the app now compiles just fine, after renaming the header file.

Gotta start checking those shaders! (and finally find the time to learn-understand them!) ;)

thanks a lot. :D

regards,
Alvaro
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

To fix the 16 bit issue, open up the desirted shader and change

Code: Select all

OUT.RealDistance[0] = (SMPos.z/MaxD) - 0.01f;
to

Code: Select all

OUT.RealDistance[0] = (SMPos.z/MaxD) - 0.03f;
This will increase the offset to subtract from the depth buffer in order to reduce artifacts due to depth inaccuracy.

Also you can change all the "tex2D( ShadowMapSampler,ShadowMapSamplingPos ).x" to "tex2D( ShadowMapSampler,ShadowMapSamplingPos ).y" so that it reads from the Green component, which should give you 6 bits instead of 5 in 16 bit mode.

Subtracting from the depth buffer causes more of the shadow to get cut off under sydney's feet, so maybe setting it up so it only loads the 16 bit one under 16 bit mode is best. (Shouldn't be hard to modify the wrapper to do this).
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
jingquan
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am
Contact:

Post by jingquan »

Great stuff, Blindside. Any plans to support GLSL for the shadows? Cound save me some trouble converting them. :wink:

Thanks.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

I have already kind of converted it, but I need to convert all the filtering types and release the wrapper in a nice way. Unfortunately lately I have not had much time for this kind of stuff. I'll try to get it out sometime soon.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
jiedi123
Posts: 6
Joined: Thu Dec 16, 2010 9:08 am

Post by jiedi123 »

this is my code

the effect is so good,
but when the node moved is error,
why? please help me.
///////////////////////////////////////////////////////////////////////////////////
IAnimatedMesh* mesh = smgr->getMesh("body.b3d");
IAnimatedMeshSceneNode* snode = smgr->addAnimatedMeshSceneNode( mesh );
effect->addEffectToNode(snode,EET_PHONG);
while(device->run())
{
driver->beginScene(true,true,SColor(0,0,0,0));
effect->getLightCamera()->setPosition(snode->getAbsolutePosition());
effect->setLightTarget(snode->getAbsolutePosition());
effect->update();
smgr->drawAll();
driver->endScene();
}
///////////////////////////////////////////////////////////////////////////////////


snode moved

Image
snode not moved,postion is 0,0,0

Image[/img]
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Post by Granyte »

in my case i get an even more interesting effect wich seem to be a conflict between this shader and the water shader
Post Reply