Dolphin, the GameCube and Wii emulator - Forums

Full Version: Dolphin Shaders
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Any news about 2xSal?
We are still wishing updates here Smile
hello, first post i know but ive following the threads a little while ago.

I Tried to experiment with the existing shaders to get better picture quality without MSAA / FSAA

i´ve tested with New Super Mario Bros. for Wii
and only Anisotropic Filter @ 1x everything else off

so here are the pictures which will give better quality without losing performance

Heres the Config:
[Image: myconfig.jpg]

Normally without Shader
[Image: withoutshader.jpg]

With Shader (based on "Bad Bloom" Shader)
[Image: withshader.jpg]


heres the Code :
Code:
uniform samplerRECT samp0 : register(s0);

void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0, in

float2 uv1 : TEXCOORD1)
{
  float4 c_center = texRECT(samp0, uv0.xy).rgba;

  float4 bloom_sum = float4(0.0, 0.0, 0.0, 0.0);
  uv0 += float2(0.2, 0.2);
  float radius1 = 0.1;
  bloom_sum += texRECT(samp0, uv0 + float2(-1.5, -1.5) * radius1);
  bloom_sum += texRECT(samp0, uv0 + float2(-2.5, 0)  * radius1);
  bloom_sum += texRECT(samp0, uv0 + float2(-1.5, 1.5) * radius1);
  bloom_sum += texRECT(samp0, uv0 + float2(0, 2.5) * radius1);
  bloom_sum += texRECT(samp0, uv0 + float2(1.5, 1.5) * radius1);
  bloom_sum += texRECT(samp0, uv0 + float2(2.5, 0) * radius1);
  bloom_sum += texRECT(samp0, uv0 + float2(1.5, -1.5) * radius1);
  bloom_sum += texRECT(samp0, uv0 + float2(0, -2.5) * radius1);

  float radius2 = 0.2;
  bloom_sum += texRECT(samp0, uv0 + float2(-1.5, -1.5) * radius2);
  bloom_sum += texRECT(samp0, uv0 + float2(-2.5, 0)  * radius2);
  bloom_sum += texRECT(samp0, uv0 + float2(-1.5, 1.5)  * radius2);
  bloom_sum += texRECT(samp0, uv0 + float2(0, 2.5)  * radius2);
  bloom_sum += texRECT(samp0, uv0 + float2(1.5, 1.5)  * radius2);
  bloom_sum += texRECT(samp0, uv0 + float2(2.5, 0)  * radius2);
  bloom_sum += texRECT(samp0, uv0 + float2(1.5, -1.5)  * radius2);
  bloom_sum += texRECT(samp0, uv0 + float2(0, -2.5)  * radius2);

  bloom_sum *= 0.061;
  bloom_sum -= float4(0.3, 0.3, 0.3, 0.3);
  bloom_sum = max(bloom_sum, float4(0,0,0,0));

  float2 vpos = (uv1 - float2(.5, .5)) * 2;
  float dist = (dot(vpos, vpos));
  dist = 1 - 0.3*(dist - (dist / 4.4));

  ocol0 = (c_center * 0.7 + bloom_sum) * dist;
}

Hope it is useful for anybody
2xsai and other filters won't work because wii renders mostly in 3d. No 2d sprites and such, so filters won't work. That's what msaa and aa is for. Since aa and msaa are broken, we'd have to increase internal resolution and scale it down to get the aa affect like pcsx2
(01-02-2010, 05:53 AM)boogerlad Wrote: [ -> ]2xsai and other filters won't work because wii renders mostly in 3d. No 2d sprites and such, so filters won't work. That's what msaa and aa is for. Since aa and msaa are broken, we'd have to increase internal resolution and scale it down to get the aa affect like pcsx2

What about applying filters to textures?
It's not as simple to code but makes games look a lot better, when there are no hi-res textures to load.
I normally don't do this, but this 2xSai and/or HQX shader for Dolphin thing would be way to cool, so… *clearthroat*

*BUMP* Angel

wdogg

[Not sure if this is right place to post it but I couldn't find a better place]

Here's my Bloom shader.
You can tweak around with the settings, right now I have them set to what I like best.

I would have done it differently with more than one shader and more than one texture, but I don't think Dolphin supports this as of yet.
Because of this I had to find a way to put it all in one shader and limited the Gaussian blur effect to 4px radius.
This will do for now.

[attachment=4342]
Pages: 1 2