; extended config (currently loaded prior to cam.cfg)
;
; contains defaults to enable enhancements and other settings to run nicely on modern systems
; (remove/rename file to go old school)

; ------------
; display mode
; ------------

; enable Direct3D 9 based display system (instead of the legacy DirectX 6 one)
use_d3d_display

; use a single resolution for both menu system and in-game, with normal double buffering (in fullscreen)
single_display_mode 2

; same as above but with triple buffering
;single_display_mode 3
; alternative buffering mode that uses blitting instead of buffer flipping in fullscreen, the same method
; as windowed mode uses (vsync may sporadically miss frame starts on some systems)
;single_display_mode

; scale menu system to fit screen (in "single_display_mode") using 3D HW for best quality
; (if you're having trouble like a black screen when starting the game try mode 0 or 1)
; when "use_d3d_display" is enabled, 3D HW is always used, this only sets the scale mode to fit screen
ui_scale_mode 2

; display refresh synchronization mode (in "single_display_mode"), default is 3 which means enabled
; in-game and in menu screens. To disable synch, set mode 0.
; NOTE: certain graphics driver settings may override synch behavior of the game
; NOTE2: synch support in windowed mode with "use_d3d_display", may depend on Windows version and settings
;vsync_mode 0
; for displays with really high refresh rates (like 120 Hz) the game might be running too fast,
; try following mode to make the game update every second display refresh (if supported by the card/driver)
;vsync_mode 7

; software based framerate limiter (in "single_display_mode")
framerate_cap 100.0

; use 32-bit rendering for everything (also filters out 16-bit video modes)
; (this is automatically enabled with "use_d3d_display", which doesn't support 16-bit modes)
force_32bit

; force game to run in windowed mode
;force_windowed

; for graphics cards that support it, limit buffering of GPU commands to 1 frame in menu screens, to keep
; input lag to a minimum (for older cards where this has no effect, it should also work to reduce lag by
; setting "SlowFrameUI" to a value that corresponds to the refresh rate or slightly below)
d3d_disp_limit_gpu_frames 1
; enabling limiting in-game can have a positive effect by reducing framerate unevenness, stuttering and/or
; mouse lag, at potentially some framerate loss, which may not be an issue if the framerate is high anyway
; (should probably be avoided for CrossFire/SLI type of setups)
;d3d_disp_limit_gpu_frames 1 1

; enable scaling of in-game 2D overlay (HUD), makes the things like current item/weapon text, or SS2
; HUD/panels, larger at resolutions of 1280x960 or higher with pixel perfect scaling (requires "use_d3d_display")
; NOTE: Enabling scaling may actually improve performance, especially at high resolutions.
;d3d_disp_scaled_2d_overlay 64
; alternatively a fixed 2D resolution can be defined, which is aspect ratio corrected and scaled up
; to the current resolution, without enforcing pixel perfectness (ie. filtering makes it a bit less crisp)
;d3d_disp_scaled_2d_overlay 640 480

; force scaled menu and 2D overlay graphics to always use bilinear filtering, even when scaled an even multiple
; (smoothness/fuzziness vs pixel perfectness)
;d3d_disp_force_filter_scale2d

; lock horizontal FOV to be the same in widescreen modes as in 4:3 (compensates vertical FOV instead)
;widescreen_lock_hfov

; FOV, specified for reference 4:3 aspect ratio, widescreen automatically adjusts this value
; (default is 90)
;fov 90

; up to 8 user defined display modes, if you want some resolution that isn't supported by default
; format: <width> <height> [ <bitsPerPixel> [ <aspectX> <aspectY> ] ]
; NOTE: resolutions exceeding 2048 only work with "use_d3d_display" (because DirectX 6 doesn't support larger)
;
; 1600x768 32bpp 25:12 (skipping "32  25 12" would also work because default is 32-bit and aspect would be auto)
;user_mode1 1600 768  32  25 12
; 2880x900 32bpp 16:5
;user_mode2 2880 900  32  16 5
; 6144x1536 32bpp - three 4:3 monitors at 2048x1536 each, gives an aspect ratio of 4*3:3
;user_mode3 6144 1536  32  12 3
; 3840x1024 32bpp - three 4:3 monitors at 1280x1024 each gives an aspect ratio of 4*3:3
;user_mode4 3840 1536  32  12 3
; 3200×2048 32bpp 25:16 (WQSXGA)
;user_mode5 3200 2048  32  25 16

; enabling this option allows the UI (menus, map/objectives, readables) screens to have its own gamma setting
; useful if you get blinded everytime you open the map or read a book
;gamma_ui 0.7

; --------------
; movie playback
; --------------

; display movie within the UI area instead of maximizing (only meaningful when "ui_scale_mode 1" is specified)
;scale_movie_to_ui

; crop movies to fill out widescreen displays better (does NOT work in combination with "scale_movie_to_ui")
; the original shock cutscenes are letterboxed so this works well there, for thief it's a judgement call to
; lose some of the bottom and top parts of the image in favor of covering more of the monitor (the default
; crop rect, when not supplying a custom one, is optimized for SS2 and is 0 70 640 340)
;crop_movies
; alternatively a custom crop rect (left, top, width, height) can be specified with the "crop_movies" var
; in virtual 640x480 space, meaning regardless of what resolution the movie is the crop rect is still
; specified as if the movie were 640x480
;crop_movies 0 70 640 340

; filter quality used during internal processing of movie, default is 4, if you have performance issues
; you can try lowering the quality
;movie_sw_scale_quality 2

; (thief) list of movies to exclude from cropping (only used if "crop_movies" is enabled)
movie_crop_exclude credits.avi+success.avi+death.avi
; (shock) list of movies to exclude from cropping (only used if "crop_movies" is enabled)
;movie_crop_exclude intro.avi+credits.avi

; gamma setting for movie playback (default is 1.0)
;gamma_movie 0.7

; keep ffmpeg dll loaded to reduce technical issues
no_unload_ffmpeg

; ---------------
; texture quality
; ---------------

; load/create all textures as 32-bit and enable other 32-bit rendering path for some other subsystems
force_32bit_textures

; enable hardware mipmaps (mode 1 may be faster but may or may not be at lower quality, depends on driver/HW)
; NOTE: on less powerful machines this may cause temporary framerate drops as textures are cached in to gfx mem,
; try disabling mipmaps by removing the option or setting it to 0.
mipmap_mode 2

; mipmap generation mode for lightmaps (only used when hardware mipmaps are enabled), disabled in an attempt
; to reduce occasional light bleeding artifacts (YMMV)
; 0 disabled, 1 fastest, 2 use same method as mipmap_mode (default when no mode is explicitly set)
lm_mipmap_mode 0

; clear lightmap texture surfaces (reduces occurrences of light bleeding artifacts)
lm_init_texmem 2

; 1 pixel spacing between cached lightmaps to reduce light bleeding artifacts (requires "lm_init_texmem 2")
lm_filter_margin 1

; enable 16 sample anisotropic texture filtering (modes: 0 none, 1 linear, 2/4/8/16 anisotropic)
tex_filter_mode 16

; enable trilinear texture filtering
tex_filter_trilinear

; adjust the distance factor at which lower mip maps are selected by HW (a value between -16.0 and 16.0)
;mipmap_bias -1.0

; use linear filtering for lightmaps (not using anisotropic combined with other lm_ settings may help reduce
; light bleeding artifacts)
lm_filter_mode 1

; enable edge padding of alpha textures (that are no larger than 256) to get rid of purple outlines (this
; will add some extra processing while loading texture)
tex_edge_padding 2

; edge padding size can be adjusted to increase quality of lower mipmaps (larger pad size) or to reduce the
; amount of processing during load (smaller pad size)
;tex_max_edge_padding 8

; --------------
; render options
; --------------

; render objects with 1-bit alpha (/chroma key) as opaque objects (alpha test support must not be disabled)
; this is not enabled by default as it may have some side effects like z-fighting on overlapping decal objects,
; but it probably fixes more than it breaks so it's enabled here
alpha_test_as_opaque

; render square particles as disks
square_parts_as_disks

; render pixel particles as (small) disks
pixel_parts_as_disks

; render (new sky) stars with a resolution independent size (default always renders stars as 3x3 pixel polygons)
;fixed_star_size 0.5

; increased max view distance (default is 256) so z-buffering works correctly on missions with large areas
; (individual missions may set an even larger view distance if the mission requires it)
z_far 512

; enable z-compare during level geometry rendering, this allows somewhat more optimal level geometry rendering
; (missions that weren't built with new sky support in mind, may have visual glitches in locations that have
; "impossible geometry" when this option is enabled)
wr_render_zcomp

; -------------------
; D3D9 render options
; -------------------

; NOTE: these options can only have any effect when "use_d3d_display" is enabled

; by default it will try to use an enhanced 32-bit precision display mode, if the driver supports it, but
; there may be instances (like with integrated intel GPUs) where the driver does support it but it may not
; work correctly (such as gamma not working), this option will disable the use of enhanced precision
; (due to enhanced precision often causing trouble on Windows 10, the default here will now be to disable it)
d3d_disp_no_rgb10_buf

; multisampling (anti-aliasing) level
; IMPORTANT: some integrated graphics HW may not work correctly with multisampling and you will be left with a
;            black screen, if that happens disable this option again
;multisampletype 8

; enable 16-bit floating point render buffer (for improved rendering and postprocessing quality, at the
; expense of video memory and performance, note that it doesn't enable actual HDR rendering)
;d3d_disp_enable_hdr
; enable 32-bit floating point render buffer (if you don't know what else to do with your memory and GPU time)
; NOTE: some driver version(s) may have a bug where running 32-bit FP also requires multisampling to be enabled
;       or things can break (like a black screen)
;d3d_disp_enable_hdr 32


; enable software (ie. shader) based gamma and color processing (improves quality at the expense of performance,
; and also enables in-game gamma to be applied in windowed mode)
;d3d_disp_sw_cc

; optional saturation setting when "d3d_disp_sw_cc" is enabled, 0 is black and white, 1 is normal color
; (does not affect menu screens)
;d3d_disp_sw_cc_sat 0.25

; optional color filter when "d3d_disp_sw_cc", RGB values are between 0 and 1, default is "1 1 1" (white)
; (does not affect menu screens)
;d3d_disp_sw_cc_rgbfilter 1 0.7 0.3


; enable postprocessing (bloom)
;postprocess 1

; bloom intensity factor, default is 5
;bloomscale 5

; bloom/"glow" radius defined as percentage of the screen's diagonal, default is 2 (the larger values
; require more GPU processing)
;bloom_range 2

; bloom saturation, 0 completely desaturated, 1 is fully colored, default is 0.7
;bloom_saturation 0.7

; min value required (for R, G and B) in order for a pixel to be included in bloom processing, default is 0.6
; (with a low value a lot of surfaces will glow, with a high value only the really bright surfaces will glow)
; for SS2 you might want to consider increasing this slightly, as the game is generally brighter
;bloom_threshold 0.7


; enable screen distortion effects, like chipped glass or heat distortion from fire arrows
d3d_disp_enable_distortionfx

; enable alpha-to-coverage functionality, for smoother edges and less aliasing on alpha tested surfaces,
; if the graphics card supports it (requires multisampling to be enabled)
;d3d_disp_enable_atoc 1
; for nVidia cards that support SSAA this can be enabled instead (slightly better quality at the expense of
; performance)
;d3d_disp_enable_atoc 2
; if "d3d_disp_enable_atoc" is enabled and the graphics card supports it you may also want to enable this to
; make the edges even smoother (WARNING: if atoc isn't supported or "tex_edge_padding" isn't enabled, enabling
; this will make things look worse)
;default_alphatest_ref 1

; alpha for 2D overlay (HUD text, bitmaps), default is 1 (opaque)
;d3d_disp_2d_overlay_alpha 0.7

; --------------
; update timings
; --------------

; use high resolution timers (preferable but disabled by default for best compatibility, as it may not work
; correctly on older OS versions, such as some XP systems where hi-res timer implementation uses RDTSC, which can
; result in movement speeds going crazy and more)
;use_hi_res_timer

; lock physics updates to a fixed frequency, this ensures that player movement speed is constant and framerate
; independent. not necessary if vsync is enabled, however for high refresh rates player movement would still be
; faster than originally intended, uncomment this in that case
; (vsync method is preferable)
;phys_freq 60

; framerate cap for menu system (specified as minimum frame time in ms), reduces GPU and CPU load in menus
SlowFrameUI 10

; set minimum frame time value to 1ms to avoid speedups at high framerates, this does NOT cap the framerate
; it only sets the lower frame time limit so that if a frame is shorter than this, the engine will pretend
; that it was this long
min_frame_time 1

; cap engine update frequency to 250 Hz (specified as min updated time in ms), for a software framerate cap when
; using "single_display_mode" it's probably better to use "framerate_cap", this is just a last resort cap
SlowFrame 4

; -------------
; sound options
; -------------

; if EAX is enabled and sounds sound too direct when under water (the same or almost the same as above)
; then try enabling one of these (or experiment with custom values)
;submerged_sound_occlusion 0.1 0.5 0.88
;submerged_sound_occlusion 0.3 0.1

; force the use of UnderWater reverb/EAX environment when the player is under water
;force_underwater_reverb

; when using the OpenAL sound driver the default AL device may sometimes cause problems, in particular for
; on-board sound controllers. In those instances you can try an alternative AL device. Which other AL devices
; are available can be seen in the log file (when AL is enabled). It seems that usually the "Generic Software"
; device is available, which is a good one to try as an alternative.
;snd_oal_device Generic Software

; set a non-default speaker configuration (not all devices support this, especially with OpenAL only the
; "OpenAL Soft" (soft_oal) device driver currently supports it.
; (0 = default, 2 = stereo, 4 = quadraphonic, 5 = surround, 6 = '5.1', 7 = '6.1', 8 = '7.1', 9 = '5.1' side,
; 10 = '7.1' center l+r)
;snd_speaker_config 6

; ------------
; misc options
; ------------

; enable more elaborate tracing for rain/snow impacts so it also hits more things than just terrain
; (the calculations are a bit more expensive, if you're running on a slow machine and experience an
; unusual slowdown with rain/snow you could try to disable this and see if it helps)
enhanced_precip_trace

; enable more elaborate visibility tracing for coronas so that objects/characters also obstruct line of sight
; (the calculations are a bit more expensive, if you're running on a slow machine and experience an
; unusual slowdown with coronas you could try to disable this and see if it helps)
enhanced_corona_trace

; enable more elaborate tracing for AI footstep sounds so it hits objects and not just terrain
; (the calculations are a bit more expensive, if you're running on a slow machine and experience performance
; problems you could try to disable this and see if it helps)
enhanced_aifootstep_trace

; enable more elaborate tracing for AI body and suspicious obj detection so it hits objects and not just terrain,
; this will for example prevent AIs from seeing bodies through closed doors
; (the calculations are a bit more expensive, if you're running on a slow machine and experience performance
; problems, in missions with a larger amount of bodies, you could try to disable this and see if it helps)
enhanced_aidetect_trace

; enable sun light to be affected by objects that have runtime object shadowing, in the same way that they affect
; regular light sources
sun_runtime_obj_shadows

; screenshot format (default is BMP), other options are PNG or PCX (note that PNG shots will take longer
; due to the compression process)
screenshot_format png

; use a date/time based numeric suffix, instead of sequential numbering, for screenshot filenames
;screenshot_timestamp

; skip CD check
skip_starting_checks

ddf_tex_override

; enable extended keyboard language detection to allow the game to more accurately detect supported layouts,
; it also adds support for detection of UK and French Canadian keyboards. NOTE: if the game previously failed
; to detect the layout, so it used the default English-US, the key bindings may have to be redone
;ext_kb_country_check

; -------------
; game specific
; -------------

; enable new mantling code
;new_mantle


; render particle effects attached to weapons (i.e. fire arrows before being fired)
render_weapon_particles

; disable "force matching unrefs" when loading old SS2/T1 particle data so "render_weapon_particles" can handle
; rendering instead (to avoid issues like particles randomly disappearing)
legacy_force_match_unrefs 0


; enable z-buffer use when rendering the player arm/weapon, to get rid of the sword and blackjack being drawn
; on top of the hand
dark_zcomp_arm

; scale bitmap based inventory icons/objects at higher screen resolutions (like body carry icon)
;scaled_inv_bitmaps

; open last viewed map page if no automap location is found for current player location
dark_map_remember_last

; alternative shading of visited/current map areas
;dark_map_decal_scheme 1
;dark_map_decal_scheme 1  -0.2 -0.3 -0.5  -0.2 -0.2 0.2
; original look
;dark_map_decal_scheme 1  -0.3 -0.3 1.1  1.3 1.3 0.2
; original look with swapped colors for visited and current
;dark_map_decal_scheme 1  1.3 1.3 0.2  -0.3 -0.3 1.1

; left align map notes
;dark_map_lalign_notes


; use a single bind file in shock (user2.bnd is ignored)
shock_single_bind_set

; use a regular save slot for quicksaves, instead of the original behaviour of simply saving to the default
; autosave/current slot. Specify 0-14 to use a regular save slot, or -1 for the default behaviour of using
; the default autosave/current slot
shock_quicksave_slot 14

; similar to above 'shock_quicksave_slot' except for autosaves (which are saved during level transfer)
;shock_autosave_slot 13


; head bob scale factor (a value between 0 and 1), useful if the head bobbing is causing motion sickness
;bob_factor 0.3

; weapon bob scale factor in shock (a value between 0 and 1), also useful against motion sickness
;shock_gun_bob_factor 0.2
