Help with post process shader

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
omg_fail
Posts: 83
Joined: Wed Apr 20, 2011 1:14 pm
Location: Germany/Bavaria
Contact:

Help with post process shader

Post by omg_fail »

Hey guys.

I am on to modify an older shader from the code snippets to use it with the new irrlicht.

Acctually i am done so far but now i have a probem :

In the old shader the TextureWarp was called like this

Code: Select all

 
material.TextureLayer[0].TextureWrap = video::ETC_CLAMP;
 
But now , the SMaterialLayer class have two members if i see it right

TextureWrapU(ETC_REPEAT)
TextureWrapV(ETC_REPEAT)

Code: Select all

 
class SMaterialLayer
        {
        public:
                //! Default constructor
                SMaterialLayer()
                        : Texture(0),
                                TextureWrapU(ETC_REPEAT),
                                TextureWrapV(ETC_REPEAT),
                                BilinearFilter(true),
                                TrilinearFilter(false),
                                AnisotropicFilter(0),
                                LODBias(0),
                                TextureMatrix(0)
                        {}
...
 
any suggestions for a fix ?

Luis
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Re: Help with post process shader

Post by Radikalizm »

I don't see the problem, just set both the U and V texture wrap properties to ETC_CLAMP
omg_fail
Posts: 83
Joined: Wed Apr 20, 2011 1:14 pm
Location: Germany/Bavaria
Contact:

Re: Help with post process shader

Post by omg_fail »

Yes i already tryed it but i get no post pro. effect.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Re: Help with post process shader

Post by Radikalizm »

We can't exactly help you out any further without specifics ;)
omg_fail
Posts: 83
Joined: Wed Apr 20, 2011 1:14 pm
Location: Germany/Bavaria
Contact:

Re: Help with post process shader

Post by omg_fail »

This was the wrong code
...
firstmap = driver->createRenderTargetTexture(core::dimension2d<u32>(res_x,res_y));
secondmap = NULL;
material.Wireframe = false;
material.Lighting = false;
material.setTexture(0,firstmap);
material.TextureLayer[0].TextureWrap = video::ETC_CLAMP;

material.MaterialType = (video::E_MATERIAL_TYPE)matid;
}
}

here i changed the

material.TextureLayer[0].TextureWrap = video::ETC_CLAM
to
material.TextureLayer[0].TextureWrapU = video::ETC_CLAMP;
...
omg_fail
Posts: 83
Joined: Wed Apr 20, 2011 1:14 pm
Location: Germany/Bavaria
Contact:

Re: Help with post process shader

Post by omg_fail »

oh and i see taht createRenderTargetTexuture should be addReander....

Don't go anyway
Post Reply