diff --git a/config.h b/config.h index 6e2bfa40a1..fb2c0e1a11 100644 --- a/config.h +++ b/config.h @@ -64,7 +64,7 @@ static const bool vsync = true; static const bool video_smooth = true; // Path to custom Cg shader. If using custom shaders, it is recommended to disable video_smooth. -static const char *cg_shader_path = "hqflt/hq2x.cg"; +static const char *cg_shader_path = "hqflt/cg/hq2x.cg"; // On resize and fullscreen, rendering area will stay 4:3 static const bool force_aspect = true; diff --git a/hqflt/cg/HDR-TV.cg b/hqflt/cg/HDR-TV.cg deleted file mode 100755 index 581a8267ac..0000000000 --- a/hqflt/cg/HDR-TV.cg +++ /dev/null @@ -1,15 +0,0 @@ -struct output -{ - float4 color : COLOR; -}; - - output main(uniform sampler2D rubyTexture : TEXUNIT0, float2 texCoord : TEXCOORD0) - { - float4 rgb = tex2D(rubyTexture, texCoord); - float4 intens = smoothstep(0.2,0.8,rgb) + normalize(float4(rgb.xyz, 1.0)); - - if(fract(texCoord.y * 0.5) > 0.5) intens = rgb * 0.8; - output OUT; - OUT.color = intens; - return OUT; - } diff --git a/hqflt/cg/pixellate.cg b/hqflt/cg/pixellate.cg deleted file mode 100755 index 60b490f9bf..0000000000 --- a/hqflt/cg/pixellate.cg +++ /dev/null @@ -1,37 +0,0 @@ -struct output -{ - float4 color : COLOR; -}; - - output main(uniform sampler2D rubyTexture : TEXUNIT0, float2 gl_TexCoord : TEXCOORD0) { - float2 rubyTextureSize = float2(256.0, 224.0); - float2 texelSize = 1.0 / rubyTextureSize; - - float2 range; - range.x = dFdx(gl_TexCoord.x) / 2.0 * 0.99; - range.y = dFdy(gl_TexCoord.y) / 2.0 * 0.99; - - float left = gl_TexCoord.x - range.x; - float top = gl_TexCoord.y + range.y; - float right = gl_TexCoord.x + range.x; - float bottom = gl_TexCoord.y - range.y; - - float4 topLeftColor = tex2D(rubyTexture, (floor(float2(left, top) / texelSize) + 0.5) * texelSize); - float4 bottomRightColor = tex2D(rubyTexture, (floor(float2(right, bottom) / texelSize) + 0.5) * texelSize); - float4 bottomLeftColor = tex2D(rubyTexture, (floor(float2(left, bottom) / texelSize) + 0.5) * texelSize); - float4 topRightColor = tex2D(rubyTexture, (floor(float2(right, top) / texelSize) + 0.5) * texelSize); - - float2 border = clamp(round(gl_TexCoord / texelSize) * texelSize, float2(left, bottom), float2(right, top)); - - float totalArea = 4.0 * range.x * range.y; - - float4 averageColor; - averageColor = ((border.x - left) * (top - border.y) / totalArea) * topLeftColor; - averageColor += ((right - border.x) * (border.y - bottom) / totalArea) * bottomRightColor; - averageColor += ((border.x - left) * (border.y - bottom) / totalArea) * bottomLeftColor; - averageColor += ((right - border.x) * (top - border.y) / totalArea) * topRightColor; - - output OUT; - OUT.color = averageColor; - return OUT; - }