Search found 16 matches

by guruhenry
Mon Jun 24, 2013 8:47 am
Forum: Beginners Help
Topic: video frame region post-process effect
Replies: 4
Views: 602

Re: video frame region post-process effect

RTT:
m_poRenderTarget0 = m_poVideoDriver->addRenderTargetTexture(dimension2d<u32>(m_sResolution.m_lWidth, m_sResolution.m_lHeight), "RTT0", ECF_A8R8G8B8);

Texture:
m_pInputTexture = m_poVideoDriver->addTexture(dimension2d<u32>(m_sResolution.m_lWidth, m_sResolution.m_lHeight), "Surface", ECF ...
by guruhenry
Fri Jun 21, 2013 9:48 am
Forum: Beginners Help
Topic: video frame region post-process effect
Replies: 4
Views: 602

Re: video frame region post-process effect

Hi,

Isn't there anyone that have an idea about why using a texture loaded from a file as a source in my shader has a different behaviour than a RTT filled with the same texture (draw2DImage) and used as source?
Is there anyone that knowing Irrlicht or the shader technology in the deep see something ...
by guruhenry
Mon Jun 17, 2013 10:20 am
Forum: Beginners Help
Topic: video frame region post-process effect
Replies: 4
Views: 602

video frame region post-process effect

Hi,
I'm studying how to post-process a region of a video frame, for example to apply a mosaic effect in a small quad region.

In each rendering cycle I have:
1. a texture that represents the current source frame
2. a quad that represents the effect rectangular region
3. a RTT as a destination of the ...
by guruhenry
Thu Dec 13, 2012 9:34 am
Forum: Beginners Help
Topic: png texture alpha blending without any alpha cutoff
Replies: 13
Views: 2067

Re: png texture alpha blending without any alpha cutoff

I solved the final issue setting in the addHighLevelShaderMaterialFromFiles(...) call for each shape rendered in the RTT intermediate stage, a EMT_ONETEXTURE_BLEND material type instead of EMT_TRANSPARENT_ALPHA_CHANNEL:

io::path psFileName0; // filename for the pixel shader
psFileName0 = "C ...
by guruhenry
Thu Dec 13, 2012 7:49 am
Forum: Beginners Help
Topic: png texture alpha blending without any alpha cutoff
Replies: 13
Views: 2067

Re: png texture alpha blending without any alpha cutoff

Maybe could be that the alpha channel is rendered twice, as it is mentioned in this thread "Draw fonts to RTT with alpha", http://irrlicht.sourceforge.net/forum/v ... hp?t=45901 ?

If yes, is there anyone that know a solution/workaround?
by guruhenry
Wed Dec 12, 2012 8:37 am
Forum: Beginners Help
Topic: png texture alpha blending without any alpha cutoff
Replies: 13
Views: 2067

Re: png texture alpha blending without any alpha cutoff

Now, in my simplified test application, also with RTT the alpha is ok (and at this moment I don't know why in my original application it doesn't work), but there is a new problem: using a RTT as intermediate stage, alpha blending has less quality than in the direct rendering case.

No RTT: http ...
by guruhenry
Wed Dec 12, 2012 8:13 am
Forum: Beginners Help
Topic: png texture alpha blending without any alpha cutoff
Replies: 13
Views: 2067

Re: png texture alpha blending without any alpha cutoff

a custom shader that simply copies the texture color on output.
by guruhenry
Tue Dec 11, 2012 5:20 pm
Forum: Beginners Help
Topic: png texture alpha blending without any alpha cutoff
Replies: 13
Views: 2067

Re: png texture alpha blending without any alpha cutoff

Hi,

I wrote a simplified test application with same shaders and png and alpha is ok.
I'm still investigating if the RTT use in my workflow could be the cause.
by guruhenry
Wed Dec 05, 2012 7:53 pm
Forum: Beginners Help
Topic: png texture alpha blending without any alpha cutoff
Replies: 13
Views: 2067

Re: png texture alpha blending without any alpha cutoff

Hi,

maybe I have found the problem, but I'm not sure.

Going to the Irrlicht source code, the class CD3D9MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL (CD3D9MaterialRenderer.h) enables the alpha-blending and the alpha-test:

pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE ...
by guruhenry
Wed Dec 05, 2012 4:43 pm
Forum: Beginners Help
Topic: png texture alpha blending without any alpha cutoff
Replies: 13
Views: 2067

Re: png texture alpha blending without any alpha cutoff

Hi,

I tried Irrlicht 1.7.3 and now 1.8 release. Windows 7 64bit, Direct3D9 driver.

But I'm an Irrlicht newbie and I believe it's likely my own mistake. Let me add some informations:
- each quad is a couple of triangles, drawn via drawIndexedTriangleList.
- each quad is managed by a custom scene ...
by guruhenry
Wed Dec 05, 2012 3:29 pm
Forum: Beginners Help
Topic: png texture alpha blending without any alpha cutoff
Replies: 13
Views: 2067

Re: png texture alpha blending without any alpha cutoff

Hi hendu,

I tried to set it to 0 (or to leave the default) but it seems to imply that alpha cutoff value is 0, so the texture appears totally opaque.

Trying value greater than 0, i.e 0.5, the result is that pixels with alpha less than 0.5 are considered fully transparent, and > 0.5 are considered ...
by guruhenry
Wed Dec 05, 2012 11:22 am
Forum: Beginners Help
Topic: png texture alpha blending without any alpha cutoff
Replies: 13
Views: 2067

png texture alpha blending without any alpha cutoff

Hello,

In my test application I simply draw two quads, each one with a png texture with alpha channel. To manage the alpha blending I'm trying to use the EMT_TRANSPARENT_ALPHA_CHANNEL flag but it introduces an alpha cutoff (..MaterialTypeParam etc...) that degrades the original textures alpha ...
by guruhenry
Tue Aug 03, 2010 4:31 pm
Forum: Beginners Help
Topic: Shaders multi-pass, techniques support
Replies: 14
Views: 3656

First of all, I apologize for the sentence "not so stable?" related to IrrCG extension, or other extensions... ;)

About defining a custom scene node, It seems a good way. I'll try it as soon as possible.


Thanks for your informations.
by guruhenry
Tue Aug 03, 2010 3:25 pm
Forum: Beginners Help
Topic: Shaders multi-pass, techniques support
Replies: 14
Views: 3656

Hi Slavik,

I'm still evaluating both Irrlicht and Ogre libraries.

What I can see is that the Ogre material definition is similar to .fx files, while in Irrlicht seems to not have the possibility to read the passes informations from a standardized file.

Using DirectX I read that I can load a .fx ...
by guruhenry
Tue Aug 03, 2010 2:41 pm
Forum: Beginners Help
Topic: Shaders multi-pass, techniques support
Replies: 14
Views: 3656

Hi,

Ok, I'm new about programming shaders, but if I have understood correctly, starting from a .fx file:

- I can import the hlsl vertex and pixel shaders, discarding the techniques parts.
- I have to manually implement the techniques performing each passes setting the state values and drawing the ...