XEffects - Reloaded - New Release (V 1.4)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
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.
asparagusx
Posts: 81
Joined: Thu Oct 16, 2008 6:50 am

Anti-aliasing and XEffects

Post by asparagusx »

Hi

I have downloaded and got R1_1 of XEffects working in my app. Still got a few funnies, one being that when a create the irrlicht device with anti-aliasing turned on, the ZBuffer while shadowing goes crazy.

Code: Select all

SIrrlichtCreationParameters param;
	   CRect c;
   	
	   pView->GetClientRect(&c);
	   pReceiver = new CEventReceiver(pView);
	   shader    = (SHADERCALLBACKPTR) new MyShaderCallBack();

      param.WindowSize       = irr::core::dimension2d<s32>(c.Width(),c.Height());
      param.WindowId         = (void *) pView->m_hWnd; 
      param.EventReceiver    = pReceiver;
      param.AntiAlias        = CSystem::AntiAlias;
if param.AntiAlias = false, then it works fine.

I also have billboards with a transparent texture on it. The MaterialType is EMT_TRANSPARENT_VERTEX_ALPHA - would you expect this to render shadows correctly. At the moment, the shadow is that of the billboard outline and not the 'contents'.

Great bit of software!

Anton
asparagusx
Posts: 81
Joined: Thu Oct 16, 2008 6:50 am

Anti-aliasing

Post by asparagusx »

Looks like it might be with NVidia card(s). My app on an ATI card (will get final spec) does work with anti-aliasing! Transparency on nodes is also really going to be be needed.

Thanks

Anton
Saumane
Posts: 27
Joined: Wed Jul 09, 2008 6:14 pm
Location: Finland

Post by Saumane »

Any demos how to make the directional lighting correct? I just can't get them right..
asparagusx
Posts: 81
Joined: Thu Oct 16, 2008 6:50 am

Dynamic allocation of Effects 'resources'

Post by asparagusx »

I would like to create an EffectHandler and then later on during my app session, the user may want to change (as an example) the ScreenRTT (to improve quality). What would be involved in deleting and then re-creating the EffectsHandler? There are lots of material renderers allocated, various render targets are allocated etc. - what would be the correct way to this effeciently and safely.

Thanks

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

Post by BlindSide »

I am implementing a proper destructor and a "setScreenRenderTargetResolution()" function in the next version, for now you can just make sure all of the render targets created in the constructor are desposed of using "driver->removeTexture", and for the shadow maps use "removeAllShadowMapTextures()". TRANSPARENT_REF support is coming too.

Nate_D, I managed to reproduce your problem using the example code you provided, but I am on a 8200 so the effect is not very noticeable. I will look into it more closely when I get a better video card (Hopefully soon).
Saumane wrote:Any demos how to make the directional lighting correct? I just can't get them right..
Look at this: http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=29105

Cheers

EDIT: Ok, new release.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Saumane
Posts: 27
Joined: Wed Jul 09, 2008 6:14 pm
Location: Finland

Post by Saumane »

I've already tried that but i cant just get it right.. Well, guess i'll have to try harder :) Trying out new release ->
edit: Awesome! Shadows work with transparent textures! Really nice update :)
Saumane
Posts: 27
Joined: Wed Jul 09, 2008 6:14 pm
Location: Finland

Post by Saumane »

I have something going on with my bush.. It doesn't quite work correctly.
Image
If i set the shadow mode to ESM_CAST, it kinda works, but the bush isn't affected by light and the FPS drops like crazy.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Hey if you email the bush I can take a look at it, cheers.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Saumane
Posts: 27
Joined: Wed Jul 09, 2008 6:14 pm
Location: Finland

Post by Saumane »

BlindSide wrote:Hey if you email the bush I can take a look at it, cheers.
http://flare.xenmedia.org/uploads/bush.rar
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

thinking about shadow transparency, couldn't you just render the object using a shader that doesn't flatten the alpha value to 0???
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Wow what a great idea, surely someone without such a remarkable IQ level such as yours would be unable to think of such a thing. (Or maybe its because your idea makes no sense :P )
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

errors again...

Post by timetokill »

ALL I GET IS A BLACK SCREEN!! :(

Okay, less melodramatic...
Like the person before me (sjb on page 8 ) I keep getting the following:

HLSL vertex shader compilation failed:
error X3506: unrecognized compiler target 'vs_3_0'

HLSL vertex shader compilation failed:
error X3506: unrecognized compiler target 'vs_3_0'

HLSL vertex shader compilation failed:
error X3506: unrecognized compiler target 'vs_3_0'

HLSL vertex shader compilation failed:
error X3506: unrecognized compiler target 'vs_3_0'

Error setting float array for HLSL variable
Error setting float array for HLSL variable
Error setting float array for HLSL variable
Error setting float array for HLSL variable
Error setting float array for HLSL variable


I'm using Windows XP, NVidia 7950, Irrlicht 1.5. Using Visual Studio 2008. Like sjb, it runs okay in OpenGL (as in it's not a black screen) but I'd prefer to use DirectX if possible.

I tried following the advice you gave sjb but it didn't seem to work for me:

- First, I downloaded the latest DirectX SDK, which is March 2009. I tried compiling the SVN copy of Irrlicht with it, but I kept getting a "Entry Point Not Found" error involving createDeviceEx. I couldn't figure out how to solve it, so I reverted.

- Then I tried November 2008 DXSDK, because I noticed your advice was given in December and that would've been the most recent sdk at that time. I tried compiling it with the svn as well as 1.5. with the SVN version I can't get it to work, but with 1.5 I can... but it still gives me nothing.

Something I've discovered is that the "error setting float array" problem happens only when adding shadow lights. If I take shadow lights out of the scene I can get it to run without the error.

I'm not sure how to handle the VS_3_0 problem. I know that the scene is still there as I can mouse over the black screen and pick objects in the scene, I just can't see anything because it's all black. I'm using a shadowmap size of 512 and filtertype of 0, and no anti-aliasing.

Any suggestions? Let me know :) And sorry to throw this wall of text at you!
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Are you using the latest DirectX Redistributable?
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 »

Saumane wrote:I have something going on with my bush.. It doesn't quite work correctly.
Image
If i set the shadow mode to ESM_CAST, it kinda works, but the bush isn't affected by light and the FPS drops like crazy.
UPDATE: V 1.2 includes added support for EMT_TRANSPARENT_ALPHA_REF materials for shadow mode ESM_CAST only.
I tested it and it works fine for me.

For the lighting for ESM_CAST, do it on the smgr side (Add lightscenenode, etc).
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply