05-21-2012, 05:57 AM
05-21-2012, 06:09 AM
Are you referring to the Microsoft.cpp.x64.User?
I don't have any of those folders in my project, how are they added?
![[Image: VS2010_3.PNG]](http://wiki.dolphin-emu.googlecode.com/git/build/VS2010_3.PNG)
I don't have any of those folders in my project, how are they added?
05-21-2012, 08:26 AM
You probably haven't "Open[ed] the Property Manager" (somewhere in the view menu maybe?).
05-21-2012, 08:43 AM
In Visual C++ 2010 Express it's "Project->Properties" or [ALT]+[F7]
05-21-2012, 09:17 AM
Found it in hiding in 'Other Windows':
View -> Other Windows -> Property Manager
Everything now builds absolutely fine with no errors (just warnings)
Thanks for taking the time to help out with this.
I'll look into the converting the shader when I get some spare time next weekend.
View -> Other Windows -> Property Manager
Everything now builds absolutely fine with no errors (just warnings)

Thanks for taking the time to help out with this.
I'll look into the converting the shader when I get some spare time next weekend.
05-29-2012, 08:26 AM
Can anyone get this to openGL shader to work with Dolphin?
I can get it to work outside of Dolphin (with HLSL and XNA) but no luck so far with GLSL. It is a simple as I could make for scanlines.
I know what the problem is....
Dolphin doesn't like all those uniform parameters. This will work:
Code:
// lerp = mix
// #define works correctly
#define PI 3.14159265f
uniform samplerRECT samp0 : register(s0);
uniform float ScanlineAmount = 2.0f;
uniform float ScanlineScale = 0.2f;
uniform float ScanlineBrightScale = 1.0f;
uniform float ScanlineBrightOffset = 1.0f;
uniform float ScanlineOffset = 0.0f;
uniform float ScanlineHeight = 1.0f;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
{
float4 BaseTexel = texRECT(samp0, uv0).rgba;
float RawHeight = 1080.0f;
float2 ScanCoord = uv0;
// -- Scanline Simulation --
float InnerSine = ScanCoord.y * RawHeight * ScanlineScale;
float ScanBrightMod = sin(InnerSine * PI + ScanlineOffset * RawHeight);
float3 ScanBrightness = mix(1.0f, (pow(ScanBrightMod * ScanBrightMod, ScanlineHeight) * ScanlineBrightScale + 1.0f) * 0.5f, ScanlineAmount);
float3 Scanned = BaseTexel.rgb * ScanBrightness;
// -- Color Compression (increasing the floor of the signal without affecting the ceiling) --
float3 Floor = float3(0.0f, 0.0f, 0.0f);
Scanned = Floor + (1.0f - Floor) * Scanned;
ocol0 = float4(Scanned, BaseTexel.a);
//ocol0 = BaseTexel;
}I can get it to work outside of Dolphin (with HLSL and XNA) but no luck so far with GLSL. It is a simple as I could make for scanlines.
I know what the problem is....
Dolphin doesn't like all those uniform parameters. This will work:
Code:
// lerp = mix
// #define works correctly
#define PI 3.14159265f
uniform samplerRECT samp0 : register(s0);
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
{
float4 BaseTexel = texRECT(samp0, uv0).rgba;
float RawHeight = 480.0f;
float2 ScanCoord = uv0;
float ScanlineAmount = 2.0f;
float ScanlineScale = 0.2f;
float ScanlineBrightScale = 1.0f;
float ScanlineBrightOffset = 1.0f;
float ScanlineOffset = 0.0f;
float ScanlineHeight = 1.0f;
// -- Scanline Simulation --
float InnerSine = ScanCoord.y * RawHeight * ScanlineScale;
float ScanBrightMod = sin(InnerSine * PI + ScanlineOffset * RawHeight);
float3 ScanBrightness = mix(1.0f, (pow(ScanBrightMod * ScanBrightMod, ScanlineHeight) * ScanlineBrightScale + 1.0f) * 0.5f, ScanlineAmount);
float3 Scanned = BaseTexel.rgb * ScanBrightness;
// -- Color Compression (increasing the floor of the signal without affecting the ceiling) --
float3 Floor = float3(0.0f, 0.0f, 0.0f);
Scanned = Floor + (1.0f - Floor) * Scanned;
ocol0 = float4(Scanned, BaseTexel.a);
//ocol0 = BaseTexel;
}05-30-2012, 09:01 AM
I just get a black screen when I use this shader.
05-31-2012, 05:08 AM
Try changing the following settings:
float ScanlineScale = 0.2f;
float ScanlineBrightScale = 1.0f;
float ScanlineBrightOffset = 1.0f;
float ScanlineHeight = 1.0f;
A sensible range for each one is [0, 1]
I can post screens of different settings at the weekend if that helps?
float ScanlineScale = 0.2f;
float ScanlineBrightScale = 1.0f;
float ScanlineBrightOffset = 1.0f;
float ScanlineHeight = 1.0f;
A sensible range for each one is [0, 1]
I can post screens of different settings at the weekend if that helps?