XEffects - Reloaded - New Release (V 1.4)
Re: XEffects - Reloaded - New Release (V 1.3)
Somebody repaired xEffects? What about other approaches?
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Re: XEffects - Reloaded - New Release (V 1.3)
Hi, This is Nadro answer about the transparency problem:
http://irrlicht.sourceforge.net/forum/v ... =7&t=50805
You can check this thread. Where I reported the problem.This is the best solution to handle alpha + shaders with Irrlicht from SVN:
- Use standard SOLID material as a base material.
- Set SMaterial::BlendOperation to EBO_ADD;
- Set SMaterial::BlendFactor to pack_textureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA);
With this solution you don't need separate materialType for solid and transparent shaders, you can just change SMaterial::BlendFactor, however old solution should works too.
http://irrlicht.sourceforge.net/forum/v ... =7&t=50805
Last edited by christianclavet on Tue Jun 23, 2015 12:58 pm, edited 1 time in total.
Re: XEffects - Reloaded - New Release (V 1.3)
I do so. It turned out that all the shadows drawn EXCEPT the shadow from a cube with an alpha channel. I would like to and from the shadows drawn. So, I could not just the cube add processing shadows ... But I want to see the shadow, and from the letters of the cube.
Give a link to the thread, please. Because the old solution does not work. I will write to it...
Code:
Give a link to the thread, please. Because the old solution does not work. I will write to it...
Code:
Code: Select all
cube->getMaterial(0).MaterialType = video::EMT_SOLID;
cube->getMaterial(0).BlendOperation = EBO_ADD;
cube->getMaterial(0).BlendFactor = pack_textureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA);
effect->addShadowToNode(cube, filterType, ESM_CAST);
Re: XEffects - Reloaded - New Release (V 1.3)
Done: http://irrlicht.sourceforge.net/forum/v ... 36#p294636Harch wrote:While mongoose7 is preparing an example may be someone who understands the shaders, look, why xEffects not work with a transparent material, please?
Re: XEffects - Reloaded - New Release (V 1.3)
Hmm, I don't know that XEffects is broken.Harch wrote:Somebody repaired xEffects? What about other approaches?
I'm actually not convinced that you have fixed EffectCB.h as previously suggested. That is, change
Code: Select all
irr::u32 TexVar = 0;
Code: Select all
irr::s32 TexVar = 0;
Code: Select all
((irr:f32 *)&TexVar)
Code: Select all
&TexVar
Re: XEffects - Reloaded - New Release (V 1.3)
Good question Mongoose. If someone wants to share an updated package, I can put the link on the main page. Or perhaps I can chuck it on github and link to that? I'm surprised people are still using this to be honest.
Cheers,
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
Re: XEffects - Reloaded - New Release (V 1.3)
Hi all, I've updated the first post to link to the new github page and fixed the TexVar issue while I'm at it.
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
Re: XEffects - Reloaded - New Release (V 1.3)
Yay, BlindSide is back!
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: XEffects - Reloaded - New Release (V 1.4)
Mongoose7, is this OpenGL or DirectX? In DirectX all is OK, but in OpenGL shadows from transparent objects (ALPHA_CHANNEL_REF) don't work.
My irrlicht is Irrlicht 1.8.1 (not latest build 1.9).
My irrlicht is Irrlicht 1.8.1 (not latest build 1.9).
Re: XEffects - Reloaded - New Release (V 1.4)
You have to use 'trunk'. There appears to be a problem with 1.8.1. Fixes in trunk are not back-ported.
Re: XEffects - Reloaded - New Release (V 1.4)
I'll try that, thanks.
I will write when checking this.
P.S. Please give me a link to "trunk".
I will write when checking this.
P.S. Please give me a link to "trunk".
Re: XEffects - Reloaded - New Release (V 1.4)
Link to trunk: http://sourceforge.net/p/irrlicht/code/HEAD/tree/
You will need a svn client to download it (on Windows people mostly use TortoiseSVN).
You will need a svn client to download it (on Windows people mostly use TortoiseSVN).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: XEffects - Reloaded - New Release (V 1.4)
You can download a ZIP file ("Download snapshot").
Re: XEffects - Reloaded - New Release (V 1.4)
I downloaded a last irrlicht trunk. And also I downloaded the xEffects from the first post. I compiled Irrlicht in release-fast-math-dll(and accurate-math too) mode (Code::Blocks). I included xEffects. I compiled this. And I get the same error: with a transparent cube shadows is no all, but without a transparent cube all is works (with OpenGL driver).
Re: XEffects - Reloaded - New Release (V 1.4)
Hello, Irrlicht newbie here.
I'm trying to add shadow mapping to a large mesh (a whole voxel terrain). But all I'm getting is some large "blinking" squarred shadows over the terrain. A screenshot explains better : http://imgur.com/MGWHgmf
Here is a code snippet :
What I'm doing wrong ?
I'm trying to add shadow mapping to a large mesh (a whole voxel terrain). But all I'm getting is some large "blinking" squarred shadows over the terrain. A screenshot explains better : http://imgur.com/MGWHgmf
Here is a code snippet :
Code: Select all
EffectHandler *effect = &(*(new PostProcess(device, driver))->m_effect);
effect->addPostProcessingEffectFromFile(core::stringc("client/shaders/postprocessing/BlurHP.glsl"));
effect->addPostProcessingEffectFromFile(core::stringc("client/shaders/postprocessing/BlurVP.glsl"));
effect->addPostProcessingEffectFromFile(core::stringc("client/shaders/postprocessing/BloomP.glsl"));
scene::ISceneNode *m_map = smgr->getSceneNodeFromId(666);
m_map->setMaterialFlag(video::EMF_LIGHTING, false);
E_FILTER_TYPE filterType = (E_FILTER_TYPE)4;
effect->addShadowToNode(m_map, filterType, ESM_BOTH);
effect->addShadowLight(SShadowLight(512, v3f(-150, 500, -150), v3f(5, 0, 5),
video::SColor(255, 255, 255, 255), 20.0f, 60.0f, 30.0f * core::DEGTORAD));