HDR-TV. Bright as shit, lol.

This commit is contained in:
Themaister 2010-11-13 02:13:18 +01:00
parent daa0e611a6
commit ea4aad7b07
2 changed files with 16 additions and 1 deletions

View File

@ -65,7 +65,7 @@ static const bool vsync = true;
static const bool video_smooth = false;
// Path to custom Cg shader. If using custom shaders, it is recommended to disable video_smooth and VIDEO_FILTER.
static const char *cg_shader_path = "hqflt/pixellate.cg";
static const char *cg_shader_path = "hqflt/HDR-TV.cg";
// On resize and fullscreen, rendering area will stay 4:3
static const bool force_aspect = true;

15
hqflt/HDR-TV.cg Executable file
View File

@ -0,0 +1,15 @@
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;
}