Jump to content
Sign in to follow this  
CaptKornDog

I thought BP=0/HIGHMEMFIX=1 was my silver bullet

Recommended Posts

Hello all,I was very ecstatic to see an improvement in FSX performance yesterday but unfortunately I'm finding myself just as flustered as ever trying to fly in FSX or FS9 this evening. I don't have REX or any other weather addons for FSX. I have a pure clean install of FSX/SP1/SP2 on Win7 64, only having installed FSDT JFK and the PMDG JS41 into FSX thus far. Loading the tutorial flight at KHPN with the JS41, looking down in the cockpit was relatively smooth; same with looking at the external view, down at the ground, averaging maybe 20-22 FPS. However, this changed the minute a cloud came into the picture; which the tutorial flight has maybe a scattered/broken cloud deck over KHPN. Looking at any cloud either internally or externally, would drive my FPS down to 2 with graphics spikes as I rotate around the aircraft. I would REALLY like to avoid using simple clouds (so I can actually see a thunderstorm instead of having rain come from a blue sky), but I'm seeing this behavior even with a cloud density on the bare minimum. My simulator seems to run fine with absolutely no weather and the remaining sliders (except water effects) cranked to maximum. I can even break 60-100+ FPS in external view with no weather and unlimited frames set.I have also been trying to mess with desktop themes vs windowed mode vs full-screen mode. I would very much like to run FSX in windowed mode so I can fly on VATSIM without FSInn or SB popping up as little black windows with glitched graphics, but I seem to have fallen into the vicious cycle where I lose 10 FPS by going into windowed mode, and even more if the window touches the taskbar. Even though I've been messing with disable desktop themes/composition, it seems windows ALWAYS kick the taskbar out of the aero theme into a non-transparent one. This, however, is not the case with my FS9, where I can happily run it in maximized windowed mode at 100+ FPS.Any chance anyone could suggest a cloud fix or provide some insight on the taskbar/window mode/desktop themes?Thanks!


Kyle Weber (Private Pilot, ASEL; Flight Test Engineer)
Check out my repaints and downloads, all right here on AVSIM

Share this post


Link to post
Share on other sites
Any chance anyone could suggest a cloud fix or provide some insight on the taskbar/window mode/desktop themes?
I suspect, your ATI has something to do with all this... however, I have an idea that might help you.. go to the ShadersHLSL folder, inside the misc folder, you'll see and swarmcloud.fx file, post it here, entirely, and I'll explain to you something that my be relevant to your situation on that file.

Share this post


Link to post
Share on other sites

*******, don't you ever sleep? ;)

//---------------------------------------------------------------------------// Flight Simulator X - Shader Effect Files// Copyright (c) 2006, Microsoft Corporation//---------------------------------------------------------------------------//// SwarmCloud.fx////// KEEP THE CALCULATIONS IN HERE CONSISTENT WITH// THE NON-SHADER PATH IN SWARMCLOUD.CPP!//#include <Common.fxh>#include <MaterialDecl.fxh>#include <D3D9Texture.fxh>#include <FuncLibrary.fxh>// Use the same shader constant naming convention as the 4.0 shaders.#define g_mWorld mWorld#define g_mWorldViewProj mFullProj#define g_vSunVectorWorld vSunVectorWorldconst bool EffectDeclaration<	string Name	 = "SwarmCloud";	string Class	= "Basic";	bool   NewMaterialUsage = true;> = true;//------------------------------------------------------------------------------// Swarm cloud parameters////// REVIEW: There are a lot of parameters here being// set for every single cloud. Is it worth creating// some custom parameters and setting them once per// frame instead?////// Lighting parameters//float   g_fMedianLine		   : CLOUDMATERIAL_MEDIANLINE;float   g_fMinIntensity		 : CLOUDMATERIAL_MININTENSITY;float   g_fMedianIntensity	  : CLOUDMATERIAL_MEDIANINTENSITY;float4  g_fCloudDirectional	 : CLOUDMATERIAL_DIRECTIONAL;float4  g_fCloudAmbient		 : CLOUDMATERIAL_AMBIENT;//// Fade in/out parameters//float   g_fAlpha				: CLOUDMATERIAL_ALPHA;float   g_fAlphaEdges		   : CLOUDMATERIAL_ALPHAEDGES;float   g_fRadius			   : CLOUDMATERIAL_RADIUS;//// Level band coloring parameters//#define MAX_COLOR_LEVELS 5float   g_rgColorLevelHeights[MAX_COLOR_LEVELS] : CLOUDMATERIAL_COLORLEVELHEIGHTS;float4  g_rgColorLevelColors[MAX_COLOR_LEVELS]  : CLOUDMATERIAL_COLORLEVELCOLORS;//------------------------------------------------------------------------------// Vertex shader////// REVIEW: This somewhat twisted set of input parameters// matches an existing vertex type - basically I didn't// want to add a new one just for this purpose then have// to plumb it all the way through G2D. I might go back// and do that though once I look at sprites.//struct VS_INPUT{	float4 spriteCenter : POSITION0;	float3 groupCenter  : NORMAL;	float4 packedUV	 : COLOR0;	float2 packedCorner : TEXCOORD0;};struct VS_OUTPUT{	float4 position	 : POSITION;	float4 diffuse	  : COLOR;	float2 uv		   : TEXCOORD;};VS_OUTPUT VS(VS_INPUT In){	VS_OUTPUT Out;		//		// Make a viewpoint oriented billboard matrix	//	// See SwarmCloud.cpp, ConstructFacingMatrix() - KEEP SHADER IN SYNC!	//		float4x4 mBillboard;		float4 scaledSpriteCenter = In.spriteCenter;	scaledSpriteCenter.x *= g_mWorld[0][0];	scaledSpriteCenter.y *= g_mWorld[1][1];	scaledSpriteCenter.z *= g_mWorld[2][2];		mBillboard[1] = float4(0,1,0,0);	mBillboard[2] = normalize(g_mWorld[3] + scaledSpriteCenter);	mBillboard[0] = normalize(float4(cross(mBillboard[1], mBillboard[2]), 0));	mBillboard[1] = float4(cross(mBillboard[2], mBillboard[0]), 0);	mBillboard[3] = In.spriteCenter;		//	// Get the corner position relative to the cloud center	//		float4 corner = float4(In.packedCorner.x, In.packedCorner.y, 0, 1);	corner = mul(corner, mBillboard);	//	// Get the transformed corner position	//	Out.position = mul(corner, g_mWorldViewProj);		//	// Sun lighting	//	// See bglfp.cpp, g2d_LightCloudFromNormal() - KEEP SHADER IN SYNC!	//		float3 cloudGroupNormal = normalize(corner - In.groupCenter);	float  fIntensity = dot(g_vSunVectorWorld, cloudGroupNormal);	if (fIntensity < -g_fMedianLine)	{		fIntensity = g_fMinIntensity +			(g_fMedianIntensity - g_fMinIntensity) *			((1 + fIntensity) / (1.0001 - g_fMedianLine));			// The "1.0001" in the line above is a hack to fix a bug			// observed on some nVidia hardware (a 7800). Even though			// the else branch of this if/else was taken a divide by			// zero in this branch (when g_fMedianLine is 1.0) caused			// the whole shader to go crazy.	}	else	{		fIntensity = g_fMedianIntensity +			(1 - g_fMedianIntensity) *			((fIntensity + g_fMedianLine) / (1 + g_fMedianLine));	}	float fRed   = fIntensity * g_fCloudDirectional.r + g_fCloudAmbient.r;	float fGreen = fIntensity * g_fCloudDirectional.g + g_fCloudAmbient.g;	float fBlue  = fIntensity * g_fCloudDirectional.b + g_fCloudAmbient.b;	fRed	= min(fRed, 1.0f);	fGreen  = min(fGreen, 1.0f);	fBlue   = min(fBlue, 1.0f);		//	// Height band lighting/coloring	//	// See SwarmCloud.cpp, GetColor() - KEEP SHADER IN SYNC!	//	float height = corner.y;	float4 baseColor;	float4 topColor;	float  baseHeight;	float  topHeight;		if (height <= g_rgColorLevelHeights[0])	{		baseColor  = g_rgColorLevelColors[0];		topColor   = g_rgColorLevelColors[0];		baseHeight = g_rgColorLevelHeights[0];		topHeight  = g_rgColorLevelHeights[0] + 1; // +1 to avoid division by zero below	}	else if (height <= g_rgColorLevelHeights[1])	{		baseColor  = g_rgColorLevelColors[0];		topColor   = g_rgColorLevelColors[1];		baseHeight = g_rgColorLevelHeights[0];		topHeight  = g_rgColorLevelHeights[1];	}	else if (height <= g_rgColorLevelHeights[2])	{		baseColor  = g_rgColorLevelColors[1];		topColor   = g_rgColorLevelColors[2];		baseHeight = g_rgColorLevelHeights[1];		topHeight  = g_rgColorLevelHeights[2];	}	else if (height <= g_rgColorLevelHeights[3])	{		baseColor  = g_rgColorLevelColors[2];		topColor   = g_rgColorLevelColors[3];		baseHeight = g_rgColorLevelHeights[2];		topHeight  = g_rgColorLevelHeights[3];	}	else if (height <= g_rgColorLevelHeights[4])	{		baseColor  = g_rgColorLevelColors[3];		topColor   = g_rgColorLevelColors[4];		baseHeight = g_rgColorLevelHeights[3];		topHeight  = g_rgColorLevelHeights[4];	}	else	{		baseColor  = g_rgColorLevelColors[4];		topColor   = g_rgColorLevelColors[4];		baseHeight = g_rgColorLevelHeights[4];		topHeight  = g_rgColorLevelHeights[4] + 1; // +1 to avoid division by zero below	}	float s = (height - baseHeight) / (topHeight - baseHeight);	float4 color = lerp(baseColor, topColor, s);	//	// Fade in/out alpha	//		float distance_from_center = length(corner);		if (g_fAlpha > 0)	{		// Fading in from or out to the edges		float fMagnitude = 1.3f * g_fRadius - distance_from_center;		fMagnitude = max(0, fMagnitude);		g_fAlpha = g_fAlpha - g_fAlphaEdges * (fMagnitude / g_fRadius);	}	else	{		// Fading out to the core		g_fAlpha = -g_fAlpha - g_fAlphaEdges * (distance_from_center / g_fRadius);	}		Out.diffuse = float4(fRed, fGreen, fBlue, g_fAlpha) * color;	Out.uv.x	= In.packedUV.b;	Out.uv.y	= In.packedUV.g;	return Out;}//------------------------------------------------------------------------------// Pixel shader//float4 PS(VS_OUTPUT In): COLOR{	return In.diffuse * tex2D(BaseSampler, In.uv);}//------------------------------------------------------------------------------// Technique//technique T0{	pass P0	{		NormalizeNormals			= TRUE;		ZWriteEnable				= FALSE;		ZEnable					 = TRUE;		ZFunc					   = LESSEQUAL;		AlphaBlendEnable			= TRUE;		SrcBlend					= SRCALPHA;		DestBlend				   = INVSRCALPHA;		SeparateAlphaBlendEnable	= FALSE;		AlphaTestEnable			 = FALSE;		StencilEnable			   = FALSE;		SpecularEnable			  = FALSE;		ColorWriteEnable			= RED | GREEN | BLUE;		FogEnable				   = TRUE;		CullMode					= CCW;		VertexShader				= compile vs_1_1 VS();		PixelShader				 = compile ps_1_1 PS();	}}

Kyle Weber (Private Pilot, ASEL; Flight Test Engineer)
Check out my repaints and downloads, all right here on AVSIM

Share this post


Link to post
Share on other sites
*******, don't you ever sleep? ;)
nope ;)Check in the file you send me what I changed. replace yours (please my a backup) and don't forget to delete the shader cache (so it gets rebuilt) with this new changes. try again and tell me if it changes anything. bool NewMaterialUsage = false; VertexShader = compile vs_2_0 VS(); PixelShader = compile ps_2_0 PS();

Share this post


Link to post
Share on other sites

Didn't seem to have much of an effect; my clouds look a bit different possibly (or maybe that's just power of suggestion) but still some graphics spikes and FPS hits (going from 30 FPS locked to about 4-5 when looking at a cloud) in full screen mode. Windowed mode removes the graphics spikes but doesn't get higher than 6-7 FPS.


Kyle Weber (Private Pilot, ASEL; Flight Test Engineer)
Check out my repaints and downloads, all right here on AVSIM

Share this post


Link to post
Share on other sites
Didn't seem to have much of an effect; my clouds look a bit different possibly (or maybe that's just power of suggestion) but still some graphics spikes and FPS hits (going from 30 FPS locked to about 4-5 when looking at a cloud) in full screen mode. Windowed mode removes the graphics spikes but doesn't get higher than 6-7 FPS.
Hmm.. those ATI's are really a problem with clouds... try to experiment reducing the sprites in [DISPLAY][DISPLAY]MaxSprites=1MaxSpriteSize=8play with those, what you are trying to do is see what affects clould performance (also make sure you are using DETAILED clouds for all this tests) ATI's are known for this problem (before the 5000 series) but probably there is a workaround.You can also (because I'm going to be now) check the display.cfg file in the fsx folder.That file, is meant to 'reduce' or disable some extended features on non-compliant cards.Check WHICH options, are common to ATI's cards. you'll see (in that file) things such as:RenderToTexture. DisableAGP, PanelAsTexure etc etc.. those, you can experiment with. they go in the [Display.YouCardHere] portion of your fsx.cfg file.Now, to bed.

Share this post


Link to post
Share on other sites

No real difference with Sprites, should I be adjusting these numbers up or down? FPS sticks around 12 when looking at a cloud but it stutters hard, freezing for about 2 seconds.I'll have a look at the display.cfg next.


Kyle Weber (Private Pilot, ASEL; Flight Test Engineer)
Check out my repaints and downloads, all right here on AVSIM

Share this post


Link to post
Share on other sites
No real difference with Sprites, should I be adjusting these numbers up or down? FPS sticks around 12 when looking at a cloud but it stutters hard, freezing for about 2 seconds.I'll have a look at the display.cfg next.
By the way, you don't need to modify the 'actual' display.cfg file!! you are just using it as reference to determine 'what' flags FSX recognize when disabling specific hardware/video features. All this 'flags' you find on the display.cfg file, will work in your fsx.cfg file, under the section that corresponds to your video card. [Display.Video Card Name] section. You'll see there things such as MipBias, FogTable, RenderToTexutre etc etc..I would play the the ones related to 'fog', remember, what you want is to 'disable' features, one by one, you want to know what the ATI is having problems with.

Share this post


Link to post
Share on other sites
By the way, you don't need to modify the 'actual' display.cfg file!! you are just using it as reference to determine 'what' flags FSX recognize when disabling specific hardware/video features. All this 'flags' you find on the display.cfg file, will work in your fsx.cfg file, under the section that corresponds to your video card. [Display.Video Card Name] section. You'll see there things such as MipBias, FogTable, RenderToTexutre etc etc..I would play the the ones related to 'fog', remember, what you want is to 'disable' features, one by one, you want to know what the ATI is having problems with.
Understood and will do ;)Thanks!

Kyle Weber (Private Pilot, ASEL; Flight Test Engineer)
Check out my repaints and downloads, all right here on AVSIM

Share this post


Link to post
Share on other sites

*******, qucik question re edit of SwarmCloud.fxChange the value of true; to false; under bool NewMaterial is another line, example: bool NewMaterialUsage = true;> = true;should we change both to =false;Thanks,


\Robert Hamlich/

 

Share this post


Link to post
Share on other sites
*******, qucik question re edit of SwarmCloud.fxChange the value of true; to false; under bool NewMaterial is another line, example: bool NewMaterialUsage = true;> = true;should we change both to =false;Thanks,
No, just the first one.. and by the way, this is like a 4 year old thing. No new discoveries, and it only prevents the clouds from flashing. The performance thing was the other lines (but, as you can see they do nothing) so, better to leave them be.

Share this post


Link to post
Share on other sites
No, just the first one.. and by the way, this is like a 4 year old thing. No new discoveries, and it only prevents the clouds from flashing. The performance thing was the other lines (but, as you can see they do nothing) so, better to leave them be.
I'm still experimenting but am not really seeing much of a noticeable difference. For the moment, I think I've conceded and will be using simple clouds since I seem to be able to run with 20-30 FPS and almost all other sliders maxed (including autogen scenery). I'll post back if I see any quantifiable results.

Kyle Weber (Private Pilot, ASEL; Flight Test Engineer)
Check out my repaints and downloads, all right here on AVSIM

Share this post


Link to post
Share on other sites

I used to have terrible performance with clouds on desktop (which has an ATI 3870X2) until I updated to the most recent drivers. Have you given 10.3 a try? as soon as I updated I was able to set high cloud coverage for the first time and have never looked back.Hope this helpsDavePS - ******* - thanks for the flashing cloud fix, I'll give that a go. I did try the highmem fix but I still get the odd white flash here and there and no overall improvement in performance (macbook pro, win7 x64, nvidia 9600GT)

Share this post


Link to post
Share on other sites
I used to have terrible performance with clouds on desktop (which has an ATI 3870X2) until I updated to the most recent drivers. Have you given 10.3 a try? as soon as I updated I was able to set high cloud coverage for the first time and have never looked back.Hope this helpsDavePS - ******* - thanks for the flashing cloud fix, I'll give that a go. I did try the highmem fix but I still get the odd white flash here and there and no overall improvement in performance (macbook pro, win7 x64, nvidia 9600GT)
My computer says I have the most up-to-date driver, 8.712.0.0.

Kyle Weber (Private Pilot, ASEL; Flight Test Engineer)
Check out my repaints and downloads, all right here on AVSIM

Share this post


Link to post
Share on other sites
My computer says I have the most up-to-date driver, 8.712.0.0.
That does indeed appear to be the driver included in Catalyst 10.3, which is the current version. I guess it works better with my 3870X2 :-(Kind regardsDave

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...