Skip to content

Commit

Permalink
Version 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterTh committed Oct 21, 2012
1 parent 1598e4b commit fdd8e34
Show file tree
Hide file tree
Showing 21 changed files with 2,382 additions and 80 deletions.
6 changes: 5 additions & 1 deletion Actions.def
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@ ACTION(takeHudlessScreenshot, RSManager::get().enableTakeScreenshot())

// Graphics Actions

ACTION(toggleSMAA, RSManager::get().toggleSmaa())
ACTION(toggleAA, RSManager::get().toggleAA())
ACTION(toggleVSSAO, RSManager::get().toggleVssao())
ACTION(toggleDofGauss, RSManager::get().toggleDofGauss())

ACTION(toggleHUD, RSManager::get().toggleHideHud())
ACTION(toggleHUDChanges, RSManager::get().toggleChangeHud())

ACTION(toggle30FPSLimit, Settings::get().toggle30FPSLimit())

// Development Actions

ACTION(reloadSSAOEffect, RSManager::get().reloadVssao())
ACTION(reloadGAUSSEffect, RSManager::get().reloadGauss())
ACTION(reloadAAEffect, RSManager::get().reloadAA())

ACTION(singleFrameFullCapture, RSManager::get().enableSingleFrameCapture())
ACTION(userTrigger, SDLOG(0, "================================================================= USER TRIGGER ===\n"))
ACTION(reloadHUDVertices, RSManager::get().reloadHudVertices());
8 changes: 6 additions & 2 deletions DATA/DSfix.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
renderWidth 1920
renderHeight 1080

# SMAA1x toggle and quality setting
# AA toggle and quality setting
# 0 = off (best performance, worst IQ)
# 1 = low
# 2 = medium
# 3 = high
# 4 = ultra (worst performance, best IQ)
smaaQuality 0
aaQuality 0

# AA type
# either "SMAA" or "FXAA"
aaType SMAA

# Enable and set the strength of the SSAO effect (all 3 settings have the same performance impact!)
# 0 = off
Expand Down
5 changes: 4 additions & 1 deletion DATA/DSfixKeys.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ toggleBorderlessFullscreen VK_F8

#takeHudlessScreenshot VK_NEXT
toggleHUD VK_RCONTROL
#toggleHUDChanges VK_RSHIFT
toggleHUDChanges VK_RSHIFT

#toggleSMAA VK_NUMPAD1
#toggleVSSAO VK_NUMPAD2
#toggleDofGauss VK_NUMPAD3

toggle30FPSLimit VK_BACK

#reloadAAEffect VK_NUMPAD4
#reloadSSAOEffect VK_NUMPAD5
#reloadGAUSSEffect VK_NUMPAD6
#reloadHUDVertices VK_NUMPAD9
Expand Down
7 changes: 7 additions & 0 deletions DATA/VERSIONS.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
21-10-1012 -- version 1.8 beta
==============================
- Added FXAA option for AA
- Added 30 FPS limit toggle
- Greatly improved SSAO depth usage, removed thickness model hack


29-09-1012 -- version 1.7 beta
==============================
- Re-implemented the FPS limiter. It's quite exact now and also performed at a better point in time
Expand Down
116 changes: 116 additions & 0 deletions DATA/dsfix/FXAA.fx
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
texture2D frameTex2D;

#define FXAA_PC 1
#define FXAA_HLSL_3 1

#ifndef FXAA_QUALITY__PRESET
#define FXAA_QUALITY__PRESET 26
#endif

#include "FXAA.h"

sampler frameSampler = sampler_state
{
texture = <frameTex2D>;
AddressU = CLAMP;
AddressV = CLAMP;
MINFILTER = LINEAR;
MAGFILTER = LINEAR;
};

struct VSOUT
{
float4 vertPos : POSITION;
float2 UVCoord : TEXCOORD0;
};

struct VSIN
{
float4 vertPos : POSITION0;
float2 UVCoord : TEXCOORD0;
};

VSOUT FrameVS(VSIN IN)
{
VSOUT OUT;
OUT.vertPos = IN.vertPos;
OUT.UVCoord = IN.UVCoord;
return OUT;
}

float4 calcLuma(VSOUT IN) : COLOR0
{
float4 color = tex2D(frameSampler, IN.UVCoord);
color.a = dot(color.rgb, float3(0.299, 0.587, 0.114));
//return float4(color.a,color.a,color.a,color.a);
return color;
}

float4 applyFXAA(VSOUT IN) : COLOR0
{
return FxaaPixelShader(IN.UVCoord, float4(0,0,0,0), frameSampler, frameSampler,
frameSampler, PIXEL_SIZE, float4(0,0,0,0), float4(0,0,0,0), float4(0,0,0,0),
//
// Only used on FXAA Quality.
// This used to be the FXAA_QUALITY__SUBPIX define.
// It is here now to allow easier tuning.
// Choose the amount of sub-pixel aliasing removal.
// This can effect sharpness.
// 1.00 - upper limit (softer)
// 0.75 - default amount of filtering
// 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
// 0.25 - almost off
// 0.00 - completely off
0.75,
//
// Only used on FXAA Quality.
// This used to be the FXAA_QUALITY__EDGE_THRESHOLD define.
// It is here now to allow easier tuning.
// The minimum amount of local contrast required to apply algorithm.
// 0.333 - too little (faster)
// 0.250 - low quality
// 0.166 - default
// 0.125 - high quality
// 0.063 - overkill (slower)
0.125,
//
// Only used on FXAA Quality.
// This used to be the FXAA_QUALITY__EDGE_THRESHOLD_MIN define.
// It is here now to allow easier tuning.
// Trims the algorithm from processing darks.
// 0.0833 - upper limit (default, the start of visible unfiltered edges)
// 0.0625 - high quality (faster)
// 0.0312 - visible limit (slower)
// Special notes when using FXAA_GREEN_AS_LUMA,
// Likely want to set this to zero.
// As colors that are mostly not-green
// will appear very dark in the green channel!
// Tune by looking at mostly non-green content,
// then start at zero and increase until aliasing is a problem.
0.0312,
8.0, 0.125, 0.05, float4(0,0,0,0) );
}

technique t0
{
pass P0
{
VertexShader = compile vs_3_0 FrameVS();
PixelShader = compile ps_3_0 calcLuma();
ZEnable = false;
SRGBWriteEnable = false;
AlphaBlendEnable = false;
AlphaTestEnable = false;
ColorWriteEnable = RED|GREEN|BLUE|ALPHA;
}

pass P1
{
VertexShader = compile vs_3_0 FrameVS();
PixelShader = compile ps_3_0 applyFXAA();
ZEnable = false;
SRGBWriteEnable = false;
AlphaBlendEnable = false;
AlphaTestEnable = false;
}
}
Loading

0 comments on commit fdd8e34

Please sign in to comment.