Remove some useless shaders

This commit is contained in:
Themaister 2010-11-13 13:20:33 +01:00
parent 51e81d9e1b
commit c21b6d1f7d
3 changed files with 1 additions and 53 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}