Maybe I find a "BUG" in Deferred Shading pipeline

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Maybe I find a "BUG" in Deferred Shading pipeline

Post by panzhiyi3 »

Hi there,I'm working on deferred pipeline based on Ogre's example.Oneday I setup a big scene with mountains,and some very strange strip line appeared on my screen,first I thought that maybe the bug in my VSM shader,but after some tests,those stripe line didn't disappear.According to my careful observation...I find those line will only appears in the upper left of the screen.And I can't fix that,I have no idea.
Today I'm testing a new small scene,those annoying strip line show up again.
Soon I have got new idea to test them,by switch my compositor mode between ShowLit/ShowDiffuse/ShowNormal/ShowDepth,I find the problem!
The problem is--those line only appear in normal map,then I rewrite the code of DeferredShading/LightMaterial/Geometry

Code: Select all

texture_unit GBuffer1_DiffSpec
{
	content_type compositor DeferredShading/GBuffer mrt_output 0
	tex_address_mode clamp
	filtering none
}
texture_unit GBuffer2_Normal
{
	content_type compositor DeferredShading/GBuffer mrt_output 1
	tex_address_mode clamp
	//So use bilinear filter here
	//filtering none
}
texture_unit GBuffer3_Depth
{
	content_type compositor DeferredShading/GBuffer mrt_output 2
	tex_address_mode clamp
	filtering none
}
By changing filtering of NormalBuffer to bilinear,the problem sovled.In the picture,upper one without filtering,lower one with bilinear filtering.
bug.jpg
bug.jpg (161.58 KiB) Viewed 2171 times
I don'nt know why,I'm not an expert in this,could anybody tell me the reason please?

Also,there is another problem in Ogre's deferred shading,have you noticed how serious aliasing phenomenon,especially in non-vertical lines
bug2.jpg
bug2.jpg (147.72 KiB) Viewed 2171 times
Is that congenital? Aliasing is not so much serious in Forward pipeline.
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Maybe I find a "BUG" in Deferred Shading pipeline

Post by panzhiyi3 »

Unfortunately,It was totally wrong. I'm sorry for my bad solution which without a fully examination.
If you enabled bilinear fitering,those strip line will disappear,BUT, you will see light line between some objects,between object and skybox.the light line on the edge may be the result of wrong normal,because you interpolated!
Please help :(
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Maybe I find a "BUG" in Deferred Shading pipeline

Post by panzhiyi3 »

And I find another ugly solution,change your compositor DeferredShading/GBuffer to:

Code: Select all

//2 or higher,also you will get beautiful image
texture mrt_output target_width_scaled 2 target_height_scaled 2 PF_FLOAT16_RGBA PF_FLOAT16_RGBA PF_FLOAT16_RGBA chain_scope
It's interesting,does it mean Ogre use a smaller render target for MRT?Not as big as screen?
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Maybe I find a "BUG" in Deferred Shading pipeline

Post by panzhiyi3 »

Ah......It seems that you have never seen it before?
shot.jpg
shot.jpg (22.63 KiB) Viewed 2011 times
User avatar
tod
Troll
Posts: 1394
Joined: Wed Aug 02, 2006 9:41 am
Location: Bucharest
x 94
Contact:

Re: Maybe I find a "BUG" in Deferred Shading pipeline

Post by tod »

I've played a bit with the Ogre deferred shading. I think the render target is the same size as my screen on my set-up, and I didn't see any lines. The smaller render target would explain the bad aliasing, but I'm not sure about the normal map errors. Maybe there is something wrong with your normals, like dds artifacts, if you use that format. I guess there should be some function to tell you the actual size of the RT.
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Maybe I find a "BUG" in Deferred Shading pipeline

Post by panzhiyi3 »

tod wrote:I've played a bit with the Ogre deferred shading. I think the render target is the same size as my screen on my set-up, and I didn't see any lines. The smaller render target would explain the bad aliasing, but I'm not sure about the normal map errors. Maybe there is something wrong with your normals, like dds artifacts, if you use that format. I guess there should be some function to tell you the actual size of the RT.
I swear I did nothing :) This mustn't be my problem.Today I did the same test in Ogre 1.8's DeferredShading example.
Here you can see
ogrebug1.jpg
ogrebug1.jpg (16.88 KiB) Viewed 1975 times
The jaqua.mesh comes from Ogre,you can try other meshes,the same result!

And look at this picture
ogrebug2.jpg
ogrebug2.jpg (72.45 KiB) Viewed 1975 times
Depends on the light direction,you can see the dark line on the back side of model,and light line on the front side
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Maybe I find a "BUG" in Deferred Shading pipeline

Post by panzhiyi3 »

Because of the wrong jpg compresss,we can't see the dark line and light line on the second picture,sorry fot this
panzhiyi3
Halfling
Posts: 43
Joined: Mon Dec 28, 2009 4:37 am
x 2

Re: Maybe I find a "BUG" in Deferred Shading pipeline

Post by panzhiyi3 »

Hi there,
I hope this is my last post for this,I have tried Render Monkey and FxComposer's deferred demo,the same thing happend,and I test this on my ATI HD4330,nothing happen.
Now I think this may be a bug on my GTX650Ti,seems that I have to contact with Nvidia :cry:
Post Reply