does AA affect cpu load in GTA IV or other games?

Fel

Limp Gawd
Joined
Jan 14, 2006
Messages
322
5770 Sapphire and X2 5600+ 1080p reso, my gpu load is a whole lot less than my cpu's, and i was wondering if it will actually hurt my performance if i enable AA. I've heard not to trust the benchmark tool.
 
Give it a try?

GTA IV really likes quad cores and up. So only way to really find out is to apply the AA and compare the results.

what FPS do you normally get?
 
Your CPU is bottlenecking your GPU a lot actually if the GPU usage is really low and the CPU really high.

AA usually affects Vram I think, so it shouldn't hurt your CPU much.
 
Your CPU is bottlenecking your GPU a lot actually if the GPU usage is really low and the CPU really high.

AA usually affects Vram I think, so it shouldn't hurt your CPU much.

Yeah i know, its a pretty bad bottleneck. that's what im thinking i just wanna make sure.


Give it a try?

GTA IV really likes quad cores and up. So only way to really find out is to apply the AA and compare the results.

what FPS do you normally get?
34 on the benchmark
 
You can enable it through control panel can't you?

Only MLAA for AMD owners, or a hack for SGSSA for Nvidia owners. Regular MSAA does not work with this engine.

There is also a mod called ENB that will give you SSAA, but will bring most cards to their knees.
 
There is also a mod called ENB that will give you SSAA, but will bring most cards to their knees.

Yes, partially, cause its not real AA, its doubles your resolution and downscales it.
GTA 4 does not support any form of AA in engine, nor can you force it.
 
its a shitty console engine that doesnt!

actually it's a limitation of your shitty PC graphics API / hardware. in deferred style renderers, hardware MSAA doesn't work outside of driver hacks in DX9.

it's not even a particularly good idea in DX10/11 for performance reasons, even though it can be given a faster implementation there.
 
That's all "real" AA is doing. It's just smart enough to limit the extra samples to the edges, for performance's sake.

Actually, no. It literally doubles the res, see below.

GTAIV2010-08-0401-29-42-57.jpg


Its a hack, not real AA at all.
(BTW, that was downscaling to 1368x768)
 
The difference between regular SSAA and ENB is that one is done by the driver(RGSAA/SGSAA) while the other is controlled by the game. The end result is th same, with all polygons and textures being rendered much higher than displayed. Even the performance hit is near identical according to a GTX 580 owners who's tried both ways.
 
Anti Aliasing is basically GPU intensive, there's a few things to keep in mind. AA can use a lot of VRAM space which can cause bad frame rate drops if you exceed your VRAM capacity, GTA IV is a monster when it comes to texture budget, which means that you might have to drop texture size to balance it out, depends on how much VRAM you have.

The other thing to keep in mind is that GTA IV is really CPU hungry, most people tend to be CPU limited with this game, it's entirely possible you can turn on lower levels of AA and not even see a frame rate drop, if you're currently CPU limited.
 
With 3d Vision AA isn't really as important and GTA4 looks fucking amazing in 3d. :D

actually it's a limitation of your shitty PC graphics API / hardware. in deferred style renderers, hardware MSAA doesn't work outside of driver hacks in DX9.

it's not even a particularly good idea in DX10/11 for performance reasons, even though it can be given a faster implementation there.

QFT

At times I wish that there were a rep button here.

Actually, no. It literally doubles the res, see below.


Its a hack, not real AA at all.
(BTW, that was downscaling to 1368x768)

How did you get that working? I have to ask since the ENB series doesn't really work properly with the latest patch.
 
Only MLAA for AMD owners, or a hack for SGSSA for Nvidia owners. Regular MSAA does not work with this engine.

There is also a mod called ENB that will give you SSAA, but will bring most cards to their knees.
I don't think SG-SSAA can work with GTAIV even with a driver hack, because SG-MSAA can't.

I know that OG-SSAA (where the internal resoulution is increased) can work with GTAIV, but half the edges are unaffected.
 
There is actually an FXAA shader (a port of Timothy Lottes' FXAA algorithm) for GTA4 ENBseries. It works on both Nvidia and AMD cards and looks pretty good, almost as good as ENB SSAA. The new IceEnhancer 1.2.5 uses the FXAA shader, but you can use it with any settings by pasting the code snippet in your effects.txt.

Code:
/*============================================================================
  FXAA3 QUALITY - PC
 NVIDIA FXAA III.8 by TIMOTHY LOTTES
============================================================================*/

  #define FXAA_LINEAR 0
  #define FXAA_QUALITY__EDGE_THRESHOLD (1.0/16.0)
  #define FXAA_QUALITY__EDGE_THRESHOLD_MIN (1.0/16.0)
  #define FXAA_QUALITY__SUBPIX_CAP (3.0/4.0)
  #define FXAA_QUALITY__SUBPIX_TRIM (1.0/4.0)
  #define FXAA_QUALITY__SUBPIX_TRIM_SCALE  (1.0/(1.0 - FXAA_QUALITY__SUBPIX_TRIM))
  #define FXAA_SEARCH_STEPS     8
  #define FXAA_SEARCH_THRESHOLD (1.0/4.0)

float4 FxaaPixelShader(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{  

#define FxaaTexTop(t, p) tex2Dlod(t, float4(p, 0.0, 0.0))
#define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(p + (o * r), 0, 0))

float2 pos = IN.txcoord.xy;

float2 rcpFrame = float2(1/ScreenSize, ScreenScaleY/ScreenSize);
float4 rcpFrameOpt = float4(2/ScreenSize, 2*ScreenScaleY/ScreenSize, 0.5/ScreenSize, 0.5*ScreenScaleY/ScreenSize);

float lumaN = dot(FxaaTexOff(SamplerColor, pos.xy, float2(0, -1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));
float lumaW = dot(FxaaTexOff(SamplerColor, pos.xy, float2(-1, 0), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));


float4 rgbyM;
rgbyM.xyz = FxaaTexTop(SamplerColor, pos.xy).xyz;
rgbyM.w = dot(rgbyM.xyz, float3(0.299, 0.587, 0.114));
float lumaE = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 1, 0), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));
float lumaS = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 0, 1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));
float lumaM = rgbyM.w;


float rangeMin = min(lumaM, min(min(lumaN, lumaW), min(lumaS, lumaE)));
float rangeMax = max(lumaM, max(max(lumaN, lumaW), max(lumaS, lumaE)));
float range = rangeMax - rangeMin;

if(range < max(FXAA_QUALITY__EDGE_THRESHOLD_MIN, rangeMax * FXAA_QUALITY__EDGE_THRESHOLD)) return rgbyM;


float lumaNW = dot(FxaaTexOff(SamplerColor, pos.xy, float2(-1,-1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));
float lumaNE = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 1,-1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));
float lumaSW = dot(FxaaTexOff(SamplerColor, pos.xy, float2(-1, 1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));
float lumaSE = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 1, 1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));



float lumaL = (lumaN + lumaW + lumaE + lumaS) * 0.25;
float rangeL = abs(lumaL - lumaM);
float blendL = saturate((rangeL / range) - FXAA_QUALITY__SUBPIX_TRIM) * FXAA_QUALITY__SUBPIX_TRIM_SCALE;
blendL = min(FXAA_QUALITY__SUBPIX_CAP, blendL);

float edgeVert = abs(lumaNW + (-2.0 * lumaN) + lumaNE) + 2.0 * abs(lumaW  + (-2.0 * lumaM) + lumaE ) + abs(lumaSW + (-2.0 * lumaS) + lumaSE);
   float edgeHorz = abs(lumaNW + (-2.0 * lumaW) + lumaSW) + 2.0 * abs(lumaN  + (-2.0 * lumaM) + lumaS ) + abs(lumaNE + (-2.0 * lumaE) + lumaSE);
   bool horzSpan = edgeHorz >= edgeVert;

float lengthSign = horzSpan ? -rcpFrame.y : -rcpFrame.x;
if(!horzSpan) lumaN = lumaW;
if(!horzSpan) lumaS = lumaE;
float gradientN = abs(lumaN - lumaM);
float gradientS = abs(lumaS - lumaM);
lumaN = (lumaN + lumaM) * 0.5;
lumaS = (lumaS + lumaM) * 0.5;

bool pairN = gradientN >= gradientS;
if(!pairN) lumaN = lumaS;
if(!pairN) gradientN = gradientS;
if(!pairN) lengthSign *= -1.0;
float2 posN;
posN.x = pos.x + (horzSpan ? 0.0 : lengthSign * 0.5);
posN.y = pos.y + (horzSpan ? lengthSign * 0.5 : 0.0);


gradientN *= FXAA_SEARCH_THRESHOLD;

float2 posP = posN;
float2 offNP = horzSpan ?
float2(rcpFrame.x, 0.0) :
float2(0.0f, rcpFrame.y);
float lumaEndN;
float lumaEndP;
bool doneN = false;
bool doneP = false;
posN += offNP * (-1.5);
posP += offNP * ( 1.5);
for(int i = 0; i < FXAA_SEARCH_STEPS; i++)
{
lumaEndN = dot(FxaaTexTop(SamplerColor, posN.xy).xyz, float3(0.299, 0.587, 0.114));
lumaEndP = dot(FxaaTexTop(SamplerColor, posP.xy).xyz, float3(0.299, 0.587, 0.114));
bool doneN2 = abs(lumaEndN - lumaN) >= gradientN;
bool doneP2 = abs(lumaEndP - lumaN) >= gradientN;
if(doneN2 && !doneN) posN += offNP;
if(doneP2 && !doneP) posP -= offNP;
if(doneN2 && doneP2) break;
doneN = doneN2;
doneP = doneP2;
if(!doneN) posN -= offNP * 2.0;
if(!doneP) posP += offNP * 2.0;
}

float dstN = horzSpan ? pos.x - posN.x : pos.y - posN.y;
float dstP = horzSpan ? posP.x - pos.x : posP.y - pos.y;

bool directionN = dstN < dstP;
lumaEndN = directionN ? lumaEndN : lumaEndP;

if(((lumaM - lumaN) < 0.0) == ((lumaEndN - lumaN) < 0.0))
lengthSign = 0.0;

float spanLength = (dstP + dstN);
dstN = directionN ? dstN : dstP;
float subPixelOffset = 0.5 + (dstN * (-1.0/spanLength));
subPixelOffset += blendL * (1.0/8.0);
subPixelOffset *= lengthSign;
float3 rgbF = FxaaTexTop(SamplerColor, float2(pos.x + (horzSpan ? 0.0 : subPixelOffset), pos.y + (horzSpan ? subPixelOffset : 0.0))).xyz;

  #if (FXAA_LINEAR == 1)
lumaL *= lumaL;
  #endif
  float lumaF = dot(rgbF, float3(0.299, 0.587, 0.114)) + (1.0/(65536.0*256.0));
  float lumaB = lerp(lumaF, lumaL, blendL);
  float scale = min(4.0, lumaB/lumaF);
  rgbF *= scale;

  return float4(rgbF, lumaM);
}



Best of all it has very little impact on the FPS. (2 or 3 fps at most)

Here's a screen showing it off in IceEnhancer 1.2.5
GTAIV2011-07-1517-24-32-95.jpg





On the topic of CPU load, until I got a second GTX 480 I had no idea the game was this cpu-bound. My cpu, despite being a 3.8ghz C2Q, holds back my 480's by quite a margin in this game. My gpu usage in the city is barely above 50% while my framerate stays in the mid 20's to low 30's and even dropping into the teens at times. When I'm away from the population (airport runway or out in the sea) my 480's are free to flex their muscles, and flex they do as my framerate skyrockets to the 60's and 70's. I'm hoping that my upgrade to Sandy Bridge later this year will help out with this problem...
 
Last edited:
so you guys are saying it is possible to achieve aa on gta4?
 
so you guys are saying it is possible to achieve aa on gta4?

Of course. Their are several ways to do it which have been mentioned so far.

GTAIV is one of the few PC games out their that is heavily CPU bound. It needs a lot of cpu throughput. However all current forms of AA that can be implemented with it's engine do not effect cpu load at all, including SSAA, MLAA, FXAA, ENB mod, etc.
 
no way the game is going to be all that smooth with a 5600 X2 and only 2gb of system ram. btw do you really only have an 80gb HD? :eek:
 
Back
Top