XEffects - Reloaded - New Release (V 1.4)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
timetokill
Posts: 74
Joined: Tue Jul 22, 2008 4:28 am
Location: Los Angeles

Post by timetokill »

BlindSide wrote:Are you using the latest DirectX Redistributable?
Yeah, I even went and downloaded it again just now and installed it once again. Still just a black screen when using DX. It's really strange.

I guess I'll just work without it or in OpenGL. It's not a huge issue, it would just be fun to work with some shaders in DirectX. (I can't get Nadro's CG thing to work at all. :? )
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Keep trying, I'm sure your hard work will pay off eventually! :D

I guess it goes without saying that you have the latest NVidia drivers?

If all else fails, you can go into EffectWrapper.cpp and search/replace all EVST_VS_3_0 to EVST_VS_2_0. It should work that way, atleast (But the driver will complain about mixing VS 2.0 with PS 3.0, aside from that not a big deal.).
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
timetokill
Posts: 74
Joined: Tue Jul 22, 2008 4:28 am
Location: Los Angeles

Post by timetokill »

I assume you meant EffectHandler.cpp? :)

I went in and changed all the Vertex and Pixel shaders to 2_0, and it now at least shows my skybox, but nothing else.. and it runs at 30fps :oops:

Oh and yes, I do have the latest NVidia drivers :)

I'm actually seeing if I can use the OpenGL version at the moment (everything is visible) but I get only about 60fps to start with, which drops down to 40 or below when I start adding in additional characters.

I'm running my program at 1280x720...
.. with DirectX + Irrlicht (no XEffects) I get 120fps or so.
.. with OpenGL + Irrlicht (no XEffects) I get 160fps or so.
.. with OpenGL + Irrlicht + XEffects (no additional postprocessing shaders) I get 90fps which drops to 40-50fps or so pretty quickly with additional characters.

I'm using only two lights, one of them being a shadow light when XEffects is turned on.

I love how it looks with XEffects but I'm trying to see if I can do anything to get it to run a lot faster as I don't have a lot of the geometry that I will eventually have in the game in there yet. The main thing killing me with regular Irrlicht is the stencil shadows... they look really bad on my characters :?

Anyway I will keep experimenting and let you know what comes about.

One last thing, do I need to do a depth pass for every shader, or just ones like SSAO? (I won't be using SSAO as it brings my game to its knees :lol: ) I think my scene is too big to use it realistically.

Thanks for being so helpful though, your help throughout the thread has helped me learn a lot.
nickle
Posts: 17
Joined: Sun Feb 15, 2009 5:29 pm

White lines problem

Post by nickle »

Hey, Blindside, I tried out the SSAO postprocess shader. It is great though I find a region consisting of white lines.

Image

The white lines will change its orientations when changing view positions and angles.

I tried to set different values inside the shader, like SSAO_REACH, DEPTH_ALIASING_EPISILON. I also tried to set different far, near value of the camera. They don't seem to solve the white lines problem. What might causing this?
[/img]
nickle
Posts: 17
Joined: Sun Feb 15, 2009 5:29 pm

the white lines problem pic related to above post

Post by nickle »

Image
9YkKsvXM
Posts: 64
Joined: Tue Mar 11, 2008 11:45 pm

Post by 9YkKsvXM »

-
Last edited by 9YkKsvXM on Mon Jun 08, 2020 1:23 am, edited 1 time in total.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

That's more or less correct.

@nickle: It seems to be either some driver problem or the way I am packing the depth buffer into 16bits (Happens in 32bits too). 2 possible solutions exist:

- Wait until Irrlicht has FP render targets (Hopefully soon.).

- Use only the first half of the depth buffer. This way you only get 15 bits of precision, but hey it's not a big difference. For this you can find the far value depth callback setting in the depth pass (Look for the "if(DepthPass)") and multiply it by 2.

Please remember to give me your video card specs when posting this stufff.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

yea blindside, im loving xeffects ( as you know im using different shaders to yours that were released) but one thing that popped up was an interesting issue on a 6200 geforce fx, Check it out :

My normal pc (8800 gtx)
Image


The 6200 :
Image

I think its along the same lines as the above, just more obvious cos of world scale... I will try your solution but its ONLY that card so far... i wonder why ?
fuego2008
Posts: 22
Joined: Wed Sep 24, 2008 7:26 pm

RealisticWaterSceneNode

Post by fuego2008 »

Hi!

Can smebody please help me for using this excellent node with RealisticWaterSceneNode? When I apply it together with RealisticWaterSceneNode, all I get is a jumbled white screen.

Great thanks
thespecial1
Posts: 135
Joined: Thu Oct 30, 2008 11:56 am
Location: UK
Contact:

Post by thespecial1 »

hi blindside

was impressed with your effect class, i have included it in my project to have a play but am getting some weird compiler warnings from VS2008 on irr1.5.

on my own project and your demos get a large number of errors with this one repeated alot :-

Error 1 error C2039: 'dimension2du' : is not a member of 'irr::core' c:\sauce\murmuur\murmuurc++\effecthandler.h 190

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

Post by BlindSide »

It's not "rather weird" :P . The problem is that 1.5 is too old for XEffects at the moment, you need to use the SVN branch.

An alternative is to replace all of the "dimension2du" in EffectWrapper.h and EffectWrapper.cpp with "dimension2di", this should solve most of the problems. Or you can update to SVN/wait for 1.6.

fuego, I might be able to help if you show me what the renderloop looks like.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
thespecial1
Posts: 135
Joined: Thu Oct 30, 2008 11:56 am
Location: UK
Contact:

Post by thespecial1 »

well to be honest the weird was more of a question but thanks for the quick answer, will pull in the irrlicht SVN asap ;0)

** UPDATED
I have rebuilt irrlicht from SVN, which is fine except that it completly breaks the freetype code in my project and looks messy to fix, so i tried the other route. After replacing all of the dimension2du with dimension2di I am left with one error,

Code: Select all

error C2664: 'irr::video::ITexture *irr::video::IVideoDriver::addTexture(const irr::core::dimension2d<T> &,const irr::c8 *,irr::video::ECOLOR_FORMAT)' : cannot convert parameter 1 from 'const irr::core::stringc' to 'const irr::core::dimension2d<T> &'	c:\sauce\murmuur\murmuurc++\effecthandler.cpp	
which relates to your function

Code: Select all

irr::video::ITexture* EffectHandler::generateRandomVectorTexture(const irr::core::dimension2di& dimensions,
	const irr::core::stringc& name)
{
	IImage* tmpImage = driver->createImage(irr::video::ECF_A8R8G8B8, dimensions);

	srand(device->getTimer()->getRealTime());
	
	for(u32 x = 0;x < dimensions.Width;++x)
	{
		for(u32 y = 0;y < dimensions.Height;++y)
		{
			vector3df randVec; 
			
			// Reject vectors outside the unit sphere to get a uniform distribution.
			do {randVec = vector3df((rand()%255) / 255.0f, (rand()%255) / 255.0f, (rand()%255) / 255.0f);}
			while(randVec.getLengthSQ() > 1.0f);

			SColorf randCol(randVec.X, randVec.Y, randVec.Z);
			tmpImage->setPixel(x, y, randCol.toSColor());
		}
	}

	ITexture* randTexture = driver->addTexture(name, tmpImage);
	
	tmpImage->drop();

	return randTexture;
}
basically addTexture has a different parameter list, can i get a quick hint to fix this for irrlict 1.5??
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

ITexture* randTexture = driver->addTexture(name.c_str(), tmpImage);
Should fix this. Anything else?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
thespecial1
Posts: 135
Joined: Thu Oct 30, 2008 11:56 am
Location: UK
Contact:

Post by thespecial1 »

nope thats it, thanks for your help mate ;0)


** UPDATED
very impressed with the post processing effects, I have been building up a collection of shaders so that really helps me out.

One question thou, I have a fire shader as a hlsl and glsl file, I can see how to use it in post processing but I want to add that shader to a irr node. Is this possible?, looking at the routines I think it is beyond the scope of your 1.2 release, am I missing the obvious??

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

Post by BlindSide »

I personally have no idea what you mean by "add to irr node". It's either post processing or it's not. If you want to have a screen space effect on a single node you can use projective texturing and project the texture from the screen onto the object, but XEffects or post-processing is not needed here, it's just a simple shader. A very relevant place to start looking would be here:

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=27054
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply