Dolphin, the GameCube and Wii emulator - Forums

Full Version: New feature: Post processing shaders
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
SpiderTECH there are enough shaders already(In the newer revisions)
Plus anyone can make them if they wanted to Tongue

Oh yeah here is the mad world shader inverted
Code:
uniform samplerRECT samp0 : register(s0);

void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
{
float4 emboss = (texRECT(samp0, uv0+1).rgba - texRECT(samp0, uv0-1).rgba)*2.0f;
emboss -= (texRECT(samp0, uv0+float2(1,-1)).rgba - texRECT(samp0, uv0+float2(-1,1)).rgba);
float4 color = texRECT(samp0, uv0).rgba;
if (color.r > 0.8 && color.b + color.b < 0.2)
ocol0 = float4(1,0,0,0);
else {
color += emboss;
if (dot(color.rgb, float3(0.3, 0.5, 0.2)) < 0.5)
ocol0 = float4(1,1,1,1);
else
ocol0 = float4(0,0,0,0);
}
}
Yep that worked. I'll have to do a little tweakin of my own with that code to get it to look right with Prime. As far as the shaders in the new revisions. yes they are cool I especially thought the stereoscopic one was an interesting idea if only we can get the depth info to make it actually work. But new ones are always welcome. especially for those who cant make them like me. I know enough to tinker but not enough to know what most of it means.
There's several ways to get depth info:

* Create a depth render target and gather the information from there (or gather the information from the depth attachment to a FBO)
* Use a RGB565 to depth component shader. And then process.
Well find time to look into dealing the depth, so I can finish the stereoscopic shader Smile.
(Hmm, I wrote this in the wrong thread before I guess, so I'm copying it again here, sorry ! Smile

Hi !
I was wondering something... Would it be possible to get the stereoscopic filter to work with different kinds of glasses ? For instance, the cheap transparent disposable glasses ("real3D") given in the movie theatres for Avatar ? (there were 2 distinct technologies, I'm refering to the ones people could keep afterwards)..
Bye !
I tried with svn 5168,it does the same result like svn3380
Pages: 1 2 3 4