• There seems to be an uptick in Political comments in recent months. Those of us who are long time members of the site know that Political and Religious content has been banned for years. Nothing has changed. Please leave all political and religious comments out of the forums.

    If you recently joined the forums you were not presented with this restriction in the terms of service. This was due to a conversion error when we went from vBulletin to Xenforo. We have updated our terms of service to reflect these corrections.

    Please note any post refering to a politician will be considered political even if it is intended to be humor. Our experience is these topics have a way of dividing the forums and causing deep resentment among members. It is a poison to the community. We appreciate compliance with the rules.

    The Staff of SOH

  • Server side Maintenance is done. We still have an update to the forum software to run but that one will have to wait for a better time.

AnKor's Shaders

Frosty, I'll see if I can make a special version of the dll to diagnose the crash. WOFF/WOTR has a built-in feature that tells me exact place (in most cases) in the code that caused the crash. Perhaps I finally need to look up how it is done and add the same feature into CFS3 version of the shaders. Though it will likely take several days to do.

By the way, are you on Windows 7 or 10?
 
Thanks for the effort you put in this!

I am on Win7 x64 Home Edition.
But I also have a Win10 x64 laptop which I use during my lunchbreaks at work. I'll try and see this afternoon what the shaders do there. Off to work now!
 
It may not be optimal for anyone else, but here's what I currently have in d3d8.ini

[D3D8]


; Reflector Sight Setup Mode for Modders
; Set to 1 to be able to see reflector gunsight coordinates on screen, use CTRL or ALT + arrow keys to adjust the gunsight.
; Additionally use CTRL/SHIFT + D/W/S/A to adjust "target" distance/wingspan and relative scale for calibrating gunsight size.
;Use ctrl/shift + one of following keys:


;W – adjust target wingspan


;D – adjust target distance


;S – adjust reticle scale #1


;A – adjust reticle scale #2


;The target is drawn as a semi-transparent magenta square at specified distance in front of “camera” (so you have to align you view with reticle first).


;Adjusted values are not saved automatically, you have to type them in manually.
ReflectorSetupMode=0


ClickableSetupMode=0 ; Set to 1 to set part names and bounding boxes to aid in setting up the clickable cockpits.


MouseControlSpeed=5


; Since Win7 DirectX 9 can use new drivers enabling 'unlimited' GPU memory and much faster Alt-TAB.
; Set to 1 to enable these new drivers, but may have problems with older ATI/AMD cards
UseD3D9Ex=1


; Set to 1 to convert any fullscreen mode selected in cfs3config into windowed mode.
; If resolution is less than desktop res it will appear as a normal window, if matches - borderless.
; Many modern games use 'borderless fullscreen' which is actually a windowed mode.
WindowedMode=0


; Set to 1 to draw clouds sprites from both sides (normally only one side is visible)
; Slightly reduces cases of abruptly disappearing clouds when you fly past by but not much really.
DoubleSidedClouds=1


; How often cockpit reflections are updated (1 - fastest, 1000 - every 1000th frame, 0 - disabled)
; Note that the reflection consists of 6 sides of a cube, and this interval is for ONE side
; So even though the 1 is fastest it will still take 6 frames for full update.
CockpitReflectInterval=0


; Resolution of environment reflection cubemap.
; 1 = 128x128; 2 = 256x256; 3 = 512x512; 4 = 1024x1024
EnvMapSize=4


; Set to 1 to hide searlight beams pointing directly upwards for some time (as in WOTR)
HideInactiveSearchlights=0


; Terrain Lighting and Bump Mapping
TerrainDiffuse=1
TerrainDetailBump=0.2
TerrainDetailColor=0.75
TerrainSpecular=0.5,0.5,0.5
TerrainBumpFactor=0.125,0.125,0.125


; Scenery Lighting
SceneryDiffuse=0.5


; Facility Lighting - FacilityBrightness works as a multiplier for diffuse color of building. So if you have a texture pixel with RGB value = 200 and FacilityBrightness = 0.8 the result will appear as if RGB value was 200 * 0.8 = 160. It can also make objects brighter if you use value >1.0.
FacilityBrightness=0.825


; Should match PatchPixelDim in compositetexturebudgets.xml to get correct terrain bumpmapping
TerrainPatchPixelDim=256


; Change to NoMultisampling=1 for SweetFX compatibility, but it will disable ingame antialiasing.
NoMultisampling=1


; Aircraft shadows. 0 - No Shadows; 1 - Low; 2 - Medium; 3 - Good; 4 - High; 5 - Best
ShadowQuality=5


; Terrain shadows. 0 - Disabled; 1 - Low Quality; 2 - Medium; 3 - High
TerrainShadows=3


; 0 - Disabled; 1 - Enabled
TerrainBumpMapping=1


; 0 - No shadows; 1 - 10%; 2 - 20%; ...; 10 - 100%. Doesn't make much sense to go below 50%.
CloudShadowScale=10


; 0 - No shadows; 1 - 10%; 2 - 20%; ...; 10 - 100%. Smaller values cause brighter shadows.
CloudShadowDensity=5


; -1 - Off; 0 - Default; 1 - VSync On
VSyncMode=0


; 0 - Use default (which is 60 degrees); 1...180 - override FOV for external views.
ExternalFOV=30


; Sun glare and lens flares. 0 - Off. 1 - On.
SunGlare=1


; Weather tuning (might be overwritten by WOFF)
; Range 0...100 as percentage of sunlight reduction.
CloudShadowOvercast=10
CloudShadowHeavy=90


; Tweaks strength of environment reflection. 0 - off. 1 minimum, 9 maximum.
EnvReflection=5


; Tweak sharpness of sun and environment reflections. 1 dullest, 9 sharpest.
Glossiness=1


; Enable dynamic lights (gun flashes, etc) for scenery objects. 0 - Off. 1 - On.
SceneryDynamicLighting=1


; Adjust sprite (smoke, dust, etc) brightness according to time of day. 0 - Off (always bright). 1 - On.
SpriteLighting=1


; Ambient+sun light amount when night sprites are enabled
NightLightThreshold=0.35


AlphaToCoverage=0
UseRenderThreads=1
FakeDriverVersion=1
LegacySightAndLightControls=0


; Enables or disables (if set to 0) head movement due to G-forces in cockpit view (offset and rotation)
HeadShake=1


; Controls the magnitude of head movement. Default value is 100. Rotation is unaffected by this setting.
OffsetScale=100


; Controls XYZ offset speed. Low values have high inertia so the response will lag more. Typically 4 to 100 with higher restoring the head position faster. Default 12
OffsetSpring=9


; Offset Damping with low values being more damped, Default 6
OffsetResponse=9


; Controls rotation speed. Low values have high inertia so the response will lag more. Default 24
RotationSpring=9


; Range 0 to 10. Value of 0 disables mouse view entirely.
MouseLookSpeed=5


; Time in seconds before mouse look automatically returns to centered view
MouseLookResetDelay=5


; Controls MouseView zoom increment/decrement steps. Valid values from 1 to 50. 20 is exactly the default value for CFS3/WOFF.
ZoomInStep=20
ZoomOutStep=20


; Smooth zoom speed. Zoom still changes step-wise, but transition between steps is smooth now.Range of values 0 to 10. Set to 0 to disable smooth zoom.
ZoomSpeed=5


; Zoom Direction. Default behavior is wheel-up = zoom-in. To change it to wheel-down = zoom-in use InvertMouseZoom=1.
InvertMouseZoom=1


; Troubleshooting options
Enabled=1
ForceHardwareVertexProcessing=1
ForceRenderTargetTextures=1
EnumAllDisplayModes=1
AutoGenMipMaps=1
WriteLog=1
 
Joost, have you installed the 4gb patch to your cfs3.exe? It probably isn't it, but it's worth a shot. I was trying to think what might be different by default with WOTR/WOFF where this problem never surfaced over there, and this was what came to mind.
View attachment 4gb_patch.zip
 
The 4Gb patch read me wasn't clear to me. (It's not in your zip but a previous D/L i did).
1. Where do I put the app? I am assuming in the CFS3 main folder?
2. I then open it and choose CFS3.exe?
Here is the read me

http://www.ntcore.com/4gb_patch.php

4GB Patch
Current Version: 1.0.0.1

Download the 4GB Patch

I originally wrote this tool for a friend of mine who needed it. This very little tool patches x86 executables in order to let them have 4GB (instead of only 2) of virtual memory on x64 platforms. This tool comes very handy for applications which need a great amount of virtual memory like games, 3D renderization, multimedia etc. To gain these 2GB, you just have to use this tool to patch the executable (*.exe file) of the software you want to have these additional GBs of virtual memory. It can be used by clicking on it and choosing the file or through command line (e.g.: "4gb_patch file.exe"). It automatically creates a backup copy of the original executable.

Why things are this way on x64 is easy to explain. On x86 applications have 2GB of virtual memory out of 4GB (the other 2GB are reserved for the system). On x64 these two other GB can now be accessed by 32bit applications. In order to achieve this, a flag has to be set in the file's internal format. This is, of course, very easy for insiders who do it every day with the CFF Explorer. This tool was written because not everybody is an insider, and most probably a lot of people don't even know that this can be achieved. Even I wouldn't have written this tool if someone didn't explicitly ask me to.
 
Yes. Didn't realize the readme wasn't in there, just grabbed it out of my folder of vital add-ons never to lose. Thanks for posting that James.
 
Joost, have you installed the 4gb patch to your cfs3.exe? It probably isn't it, but it's worth a shot. I was trying to think what might be different by default with WOTR/WOFF where this problem never surfaced over there, and this was what came to mind.
View attachment 72090

I think I had that installed, but tried it anyway, to no avail - unfortunately. The file you sent me through email didn't work either :sorrow:
But on my laptop, even with just 17 FPS, both the shaders and the Spit work. So it's gotta be something with my Win7 x64 rig...
 
And I've already made a test version. It was easier than I expected.

Download here: https://1drv.ms/u/s!AvmtwF9vPtwVgcM5znXuECtvkaN-jA?e=a4nTW6

Only d3d8.dll in the archive, just use with the new shaders.

If it crashes, it will save "d3d8.dmp" in CFS3 folder. This file along with logs should help me investigate the cause.
I regret not implementing this feature earlier. Could have saved me some headache.
 
That is fast!

Here are the results: View attachment Shaders Log & Dump.zip

I started CFS3 ETO with TiR activated but without the Spit. I also did a memory check (which reported no faults) but that shouldn't be it, as ETO runs fine without the shaders.
Thanks very much for looking into this, Ankor :encouragement:.
 
Frosty, can you try this version: https://1drv.ms/u/s!AvmtwF9vPtwVgcM-0FafflnYMg3oDA?e=deCANi

The dump shows that an error is inside Direct3D code, so either it is a bug in a gfx driver or my code does something wrong that corrupts the runtime and causes a crash.
Unfortunately I'm on Win10 and DirectX 9 debugging is not supported since Win 8.1 so I can only hope that I'm not doing any stupid mistakes.

Anyway I made some (rather minor) changes that may fix the problem, but I need you to test this.

I've also found and fixed a couple of unrelated bugs that weren't noticed before: water animation is not smooth, and control options may show duplicate entries for the same command if it is added from multiple ini files.
 
Thanks Andrey! Can't confirm if it fixed Frosty's problem obviously, since I never had it, but this version is working well for me, and the smoother animation of the water is nice!
 
... Anyway I made some (rather minor) changes that may fix the problem, but I need you to test this. ...

Thanks!! I'll give it a go (but I am not sure I can find the time today).
If you say 'Direct3D code' and/or gfx driver', would reinstalling DirectX or updating/changing my graphics card drivers help?
 
Reinstalling DirectX is unlikely to change anything, but a different graphics card driver may help.

And it just occurred to me that my wife's old notebook still has Windows 7! :)
It is 11" i3 from 2011 and can barely run my shaders, but at least I'll be able to verify that they don't do anything invalid.
 
Here is a new version (again): https://1drv.ms/u/s!AvmtwF9vPtwVgcNAHdHQnWR1TVz6uw?e=WmsYlK

This time I've used Win7 to debug and immediately found a bug with in-cockpit reflections code which is very likely the culprit.

Frosty, please ignore the yesterday's (Nov 07) build and try this one :)

Yes, yes and triple YESS!! That seems to have done the trick!!
I now have the shaders working and the new clickable cockpit-Spit fired up! That is just great work! :encouragement: :applouse: :loyal:.

I do have one question about the setting up of joystick buttons with the clickable cockpit and I don't know if this one should be adressed to you, Ankor, or to Daniel. There is the following text in the "controlassigments.ini" -file:

"Joystick buttons can be assigned as well. The naming convention is XJoyY, where Y is the Joystick number and X is the button number. If you have a single controller plugged in, Y will always be 1. If you have multiple controllers plugged in you may need to try several joystick numbers to find the correct joystick number for your desired button. For example, if you want to assign the Brake Control to button 6 on your joystick, but you also have a set of rudder pedals and a separate throttle quadrant, start by trying 1Joy6, and if that doesn't work, 2Joy6, and so on until the button works"

I read the quote as "The naming convention is XJoyY. X is a button on controller Y. If you have two or more controllers and you want button 6 assigned to the Brake function, you have to try switching controller numbers to find the correct controller while keeping the button number the same (= 6)". I could be misunderstanding things, but shouldn't I try 6Joy1, 6Joy2 and 6Joy3 if I wanted to find button 6 on one of 3 different controllers?
BTW, is the button number the same as the DirectX button number? (Yes, I can't find the Brake function on my controllers... :biggrin-new:)
 
Frosty, glad you are enjoying it :)
Regarding joysticks, it is indeed a question to Daniel, but for me it also looks like it should be 6Joy1, 6Joy2, 6Joy3 as you say.

gecko, since the latest dll works well, I think you can just add it to shaders package and reupload it.
Changes are:
- fixed possible Win7 crash;
- water animation is smooth (as it was in 2018 version);
- Numpad0Switch=1 can be used again (if you really need it);
- dll writes a dump file if the game crashes.
 
You don't need to do anything to the ini file. That file is used only if you don't have the shaders installed. It is unnecessary with the shaders installed because all key configuration is handled through the normal in game key configuration menus.

I'll get the updated shaders together and reupload the complete package soon.
 
My apologies, but a lot of this is over my head, so I have to ask if the issues being addressed in this thread have been ironed out and if a revised package is going to be uploaded? The 'fake driver' thing has always been key for me.
 
Yes, it appears everything has been corrected. I hope to have time to put up an official revision tonight or tomorrow night.
 
Back
Top