Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Mon, 28 Jan 2008 20:35:22 -0800 (PST),    group: microsoft.public.win32.programmer.directx.sdk        back       


Mosaic Effect : Problem of lines in output generated by Pixel Shader   
Hello,

I have tried out the following Pixel shader code to create a Mosaic
Effect when a texture is applied for a simple rectangle. (Clamp U, V
addressing and Linear Filtering is being used for the texture) :

sampler2D s0 : register( s0 );

float4 mainPS( float2 vTex : TEXCOORD0 ) : COLOR0
{
    return tex2D( s0, saturate( floor ( vTex * 10 ) * 0.1 ) /* - 2.0f
*/ );

}

Although the above pixel shader produces a Mosaic effect, a few
lines having some random color appear along the edges of some
rectangles (These lines can be clearly seen when a complex texture is
applied to the rectangle and "- 2.0f" is uncommented in the last line
in the pixel shader in order to produce a black frame).

Screen Shots of the output and the original texture are available at
the following link :
http://picasaweb.google.com/dhirendvs/ProblemOfLinesInMosaicEffect

The output is being rendered using an ATI X700/X800 Graphics Card. I
don't know whether this problem is due to the graphics card.

Can anybody please explain to me how to solve this problem of lines in
the output?

Regards,
   Dhiren Sarup.
date: Mon, 28 Jan 2008 20:35:22 -0800 (PST)   author:   Dhiren

Re: Mosaic Effect : Problem of lines in output generated by Pixel Shader   
On Mon, 28 Jan 2008 20:35:22 -0800 (PST), Dhiren wrote:

> I have tried out the following Pixel shader code to create a Mosaic
> Effect when a texture is applied for a simple rectangle. (Clamp U, V
> addressing and Linear Filtering is being used for the texture) :

I'd recommend posting this in ../graphics.  The sdk newsgroup is relatively
inactive and the video newsgroup is for DirectShow questions.

-- 
Please read this before replying:
1. Dshow & posting help:  http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others:  follow up if you are helped or you found a solution
date: Wed, 30 Jan 2008 09:54:02 -0700   author:   The March Hare [MVP] erland

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us