XEffects - Reloaded - New Release (V 1.4)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
jamessss
Posts: 12
Joined: Tue Aug 11, 2009 4:37 am

Problem with directx

Post by jamessss »

Hi blindside, I tried to do a game with your XEffect shader.

The problem I have now is that I can't run the shader in DirectX9. The shader works in OpenGL but the frame rate was rather bad (Sort of like 25 - 40 ). When I try it in DirectX, I get this printed constantly in my console.
DIRECT3D9 present failed.
Error setting float array for HLSL variable
Can you help me?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

That sounds very strange, I can't see a reason why you would get this error with XEffects in D3D9.

First make sure:

- You have the latest video card drivers.
- You have the latest Direct X 9 redistributable package.

Then tell me:

- What video card you are using (And your operating system).
- Which effects you are trying to accomplish, and whether this problem occurs only with those effects or with all of them.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
jamessss
Posts: 12
Joined: Tue Aug 11, 2009 4:37 am

Post by jamessss »

Yup, i have the latest video card and directx9 installed.

I am using Quadro FX 1500 (Its a school computer)

I am trying to do the example effect, the grainy and inverted color kind of effect.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Oh I forgot a very important question, do all the examples work correctly?

Also I'm not really sure what you're referring to when you say "inverted and grainy", are you talking about the SSAO effect?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
jamessss
Posts: 12
Joined: Tue Aug 11, 2009 4:37 am

Post by jamessss »

Yes, I am actually doing the SSAO effect. It is working properly for the example but when I try to implement it into my game, that's the error I got.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

Xeffects is nice but i think for my computer its wayyy tooo slow...

i have a 2.14ghz sempron overclocked (poop)
and a geforce 9600
and old linux drivers (new are supposed to 150% increase FPS)

on the verry basic settings under wine i get 24FPS

but the good news are that to get the shadows too look VERY CRISP there is no perf drop btween 512 and no PCF and full setting

on the second demo.. for some reason the FPS drops to 12????? (10 on highest setting)

(Are you using a cubeMap i see seams on stuff)

I get that much with 500 nodes and 68 dynamic lights

I mean great work, especially the SSAO (which I wouldnt be able to make myself) but its just not right for ME, but on the other hand it will be amazing for people who are willing to complete a game quick and need a framework.

I very much adore your work... but i want to reinvent the wheel.

I posted this because i wanted to analyse your SSAO again
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

XEffects Reloaded is particularly slow because it uses 2 passes per light + scene pass. It does this to separate the shadows from the scene materials and combine them in a post process pass. The old XEffects (You can search for it in these forums) just applied the shadow shaders directly and ran at playable framerates on my old Shader Model 1.4 Radeon 9200.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

you know your SSAO???

what values would i use at 10000 view dist?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Same values you would use at 1000 dist just scale it by 10.

Actually I have no way to answer you without knowing what the real "scale" of your scene is. For example is the length of a table 10000 units or would that be the span of a few mountains?

Anyway I haven't tested it over very large distances mostly small rooms etc. In all honesty I haven't seen many SSAO demos that work over large distances except for Crysis itself.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Daniel FF
Posts: 53
Joined: Tue Feb 19, 2008 7:15 pm

Post by Daniel FF »

Hi,

Will XEffects 1.2.1 with irr 1.6 ?

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

Post by BlindSide »

No I'll release 1.3 with Irrlicht 1.6. New features will be:

- Ability for transparent materials to co-exist correctly in the scene when shadows are enabled (Before it would not take them into account for the lighting and so they would usually appear darker even if lighting was disabled on them).

- Screen space water effect example with normal mapped specular, refraction and fading shore lines. Doesn't need much application side code just add whatever nodes you want affected to the depth buffer and load the post processing shader file.

- VSM shadow maps. This one is a maybe because I might just leave it off until I find the time to directly implement shadow mapping into Irrlicht (Which will be a hefty job indeed).

To make the screen space water effect possible I added some obvious stuff that was missing before:
- IPostProcessing callback that allows you to perform operations before and after a pass of post processing.
- An ability to set the uniform variables of post-processing shaders.

- Some other fixes and improvements. I think the way SShadowLight is currently handled is quite bad (It's difficult to alter/remove them) but I will leave this off until Irrlicht shadow map integration as I would probably want to remove SShadowLight and read the required values straight from ILightSceneNode.

Cheers, should be out by the end of this week if all goes as planned.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Daniel FF
Posts: 53
Joined: Tue Feb 19, 2008 7:15 pm

Post by Daniel FF »

Pretty nice! I just cant wait...

Thank you!
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

blindside: If you implement shadow mapping straight into irrlicht why not have CSM too???
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Yeah I like CSM/PSSM and I was considering it aswell but for a later addition as the task of having a clean interface for the shadow mapping is quite troublesome already. Most of the Irrlicht interface and lighting is biased towards stencil shadows so a lot of it has to be rethought and made more generic.

I don't want to go into too much detail about this (Shouldn't have brought it up :P ). When I'm ready to tackle it I'll make a topic where everyone can review the changes.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Here are some work in progress shots of the screen space water:

Image

Image

Image

It won't feature reflections but refraction and bump mapping. It also fades smoothly from the shoreline. I experimented with adding some foam (As seen in the second shot) but I feel it does not look as good. Yes I realise the terrain is very bad but that's not the point of the demo. Maybe I'll find a nicer texture for the release.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply