Of course, it only shows up in my blur. Sampling just the world doesn't have this artifact. I tried not downsampling my blur and I still get the artifact. I've exaggerated the blur to show you the artifact.
http://img687.imageshack.us/i/18979256.jpg/
////////////////////////////////////////////////////// BlurX////////////////////////////////////////////////////float Pixel;texture Texture0:TEXTURE0;sampler2D Sampler0 = sampler_state{ texture = (Texture0); MIPFILTER = LINEAR; MAGFILTER = LINEAR; MINFILTER = LINEAR; ADDRESSU = CLAMP; ADDRESSV = CLAMP;};struct IN0{ float4 Position : POSITION; float2 UV : TEXCOORD0;};struct OUT0{ float4 Position : POSITION; float2 UV : TEXCOORD0;};OUT0 VS(IN0 IN){ OUT0 OUT; OUT.Position = IN.Position; OUT.UV = IN.UV; return OUT;}float4 PS(OUT0 IN) : COLOR{ float2 UV = IN.UV; float4 RGBA = tex2D(Sampler0, UV); UV.x += Pixel; RGBA += tex2D(Sampler0, UV); UV.x += Pixel; RGBA += tex2D(Sampler0, UV); UV.x += Pixel; RGBA += tex2D(Sampler0, UV); UV.x += Pixel; RGBA += tex2D(Sampler0, UV); UV.x -= Pixel * 8; RGBA += tex2D(Sampler0, UV); UV.x += Pixel; RGBA += tex2D(Sampler0, UV); UV.x += Pixel; RGBA += tex2D(Sampler0, UV); UV.x += Pixel; RGBA += tex2D(Sampler0, UV); RGBA /= 9; return RGBA;}technique T0{ pass P0 { VertexShader = compile vs_2_0 VS(); PixelShader = compile ps_2_0 PS(); }}
////////////////////////////////////////////////////// Render////////////////////////////////////////////////////float time : TIME;float2 BlurPixel;float2 BlurCenter;texture Texture0:TEXTURE0;sampler2D Sampler0 = sampler_state{ texture = (Texture0); MIPFILTER = LINEAR; MAGFILTER = LINEAR; MINFILTER = LINEAR; ADDRESSU = CLAMP; ADDRESSV = CLAMP;};texture Texture1:TEXTURE1;sampler2D Sampler1 = sampler_state{ texture = (Texture1); MIPFILTER = LINEAR; MAGFILTER = LINEAR; MINFILTER = LINEAR; ADDRESSU = CLAMP; ADDRESSV = CLAMP;};struct IN0{ float4 Position : POSITION; float2 UV : TEXCOORD0;};struct OUT0{ float4 Position : POSITION; float2 UV : TEXCOORD0;};OUT0 VS(IN0 IN){ OUT0 OUT; OUT.Position = IN.Position; OUT.UV = IN.UV; return OUT;}float4 PS(OUT0 IN) : COLOR{ float2 UV = IN.UV; float4 RGBA = tex2D(Sampler0, UV); float4 Blur = tex2D(Sampler1, IN.UV + BlurPixel); float2 BlurDistance = IN.UV - BlurCenter; float BlurStrength = min(4 * dot(BlurDistance, BlurDistance), 1); RGBA = lerp(RGBA, Blur, BlurStrength); RGBA = max(Blur - 0.95f, 0) * 1.0f + RGBA; float2 CenterDistance = IN.UV - float2(0.5f, 0.5f); float VignetteStrength = 1.0f - dot(CenterDistance, CenterDistance); RGBA *= VignetteStrength; return RGBA;}technique T0{ pass P0 { VertexShader = compile vs_2_0 VS(); PixelShader = compile ps_2_0 PS(); }}
Any ideas are appreciated :)