;------------------------------------------------------------------------------------------------------
; Logging options. 
; Comment line or set value to 0 for no logging.
; 3DMigoto v.0.99.35
;------------------------------------------------------------------------------------------------------
[Logging]

; Log all API usage
calls=0

; Log Input key actions
input=1

; Super verbose massive log
debug=0

; Unbuffered logging to avoid missing anything at file end
unbuffered=0

; Force the CPU affinity to use only a single CPU for debugging multi-threaded
force_cpu_affinity=0

; Log NVAPI convergence modifications
convergence=0
; Log NVAPI separation modifications
separation=0

; ------------------------------------------------------------------------------------------------------
; Constants to pass directly to shaders as IniParams
; ------------------------------------------------------------------------------------------------------
; If you change any values here be sure to delete all the ".bin" files in ShaderFixes Folder!
[Constants]
x = 0.15		// HUD depth, 0.8=in screen, 0=screen depth, -0.2=popout
y = 0.0		// Not used
z = 0.0		// SLI FOG correction!!! If set to 1.0 SLI correction is enabled!
w = 0.0		// Surround!!! If set to 1.0 Surround correction is enabled!	


; ------------------------------------------------------------------------------------------------------
; Key Binds
; ------------------------------------------------------------------------------------------------------
[Key1]
Key=z
Convergence=0.9879216
Type=toggle

;------------------------------------------------------------------------------------------------------
; Chain load other wrapper DLLs instead of system DLLs.
;------------------------------------------------------------------------------------------------------
[System]

;proxy_d3d9=d3d9_helix.dll
;proxy_d3d11=d3d11_helix.dll


;------------------------------------------------------------------------------------------------------
; Settings to force display device to a specific mode.
; Uncomment a value to force the specific setting.
;------------------------------------------------------------------------------------------------------
[Device]

; overrides screen resolution.
;width=1280
;height=720

; overrides refresh rate set by game.
;refresh_rate=60

; filters available video modes to those providing given refresh rates.
; some games don't explicitely set the refresh rate, but use the video mode.
; use this if setting refresh_rate doesn't work.
;filter_refresh_rate=24,59,60

; forces creation of full screen devices and swap chains. 
; use this for 3dtvplay if game won't active stereo mode.
; a value of 0 doesn't deactivate this option like on the others but
; forces the application into windowed mode.
;full_screen=1

; some games explicitely disable stereo, prohibiting any stereo attempts.
; settings this to 1 ignores all stereo disabling calls and also calls NvAPI_Stereo_Enable to force stereo on.
;force_stereo=1

; almost all DX11 games deactivate window message handling. 
; setting this to 1 reenables print screen handling, alt-tab key handling etc.
;allow_windowcommands=1


;------------------------------------------------------------------------------------------------------
; Settings for NVidia stereo driver.
;------------------------------------------------------------------------------------------------------
[Stereo]

; games which have their own stereo renderer disable the NVidia automatic 
; stereo mode and render themselves into stereo buffers (Crysis 3 for example). 
; Setting this to 1 disables the game stereo renderer and enables NVidia auto stereo mechanism.
automatic_mode=0

; games without predefined profiles can't save stereo settings. 
; enabling this options automatically creates a profile for unknown games.
create_profile=0

; sets the global surface creation heuristic for NVidia stero driver.
; 0 = NVAPI_STEREO_SURFACECREATEMODE_AUTO - use driver registry profile settings for surface creation mode. 
; 1 = NVAPI_STEREO_SURFACECREATEMODE_FORCESTEREO - Always create stereo surfaces.
; 2 = NVAPI_STEREO_SURFACECREATEMODE_FORCEMONO - Always create mono surfaces. 
;surface_createmode=1

; overrides surface creation mode for square surfaces.
;surface_square_createmode=1


;------------------------------------------------------------------------------------------------------
; Settings for GPU manipulations.
; Render settings override
;------------------------------------------------------------------------------------------------------
[Rendering]

; GPU program manipulations.
;
; Shaders in game will be replaced by these custom shaders.
override_directory=ShaderFixes

; Automatically patched shaders will be written here if caching is enabled.
cache_directory=ShaderCache

; Shaders that are directly compiled by the game, instead of binary, go here.
storage_directory=ShaderFromGame

; cache all compiled .txt shaders into .bin. this removes loading stalls.
cache_shaders=1

; preload all patched shaders. there's a bug in NVidia auto stereoization if stereo shaders
; are being loaded during the game on some HW/SW combinations, which turns off auto patching
; for those stereo shaders (results in partial mono rendering). this is a workaround for this case.
preload_shaders=0

; thread save data structure access. required on multithreaded rendering.
use_criticalsection=1

; Setting this option disables scissor limits
rasterizer_disable_scissor=1

;------------------------------------------------------------------------------------------------------
; Analyzation options.
;
; save all autofixed shaders as HLSL
export_fixed=0

; save all shaders sent to DX11 as ASM, or as HLSL text files if compiled by game.
export_shaders=0

; save all shaders seen as HLSL code, autofixed or not. 1= HLSL only, 2=HLSL+OriginalASM, 3=HLSL+OriginalASM+RecompiledASM
;export_hlsl=3

; store _original_ shaders as binary files. Useful for caching.
export_binary=0

; stores a ShaderUsage.txt file on any marking button press.
;dump_usage=1

;------------------------------------------------------------------------------------------------------
; Automatic shader fixes. Those settings here apply only on newly read shaders.
; All existing *_replace.txt or *_replace.bin files are not tampered with.
; If you change settings here, the best workflow is to delete all shaders in
; the shader cache directory and let them be fixed again.

; Stereoize all shader parameters with position semantic.
fix_sv_position=0

; Pixel depth evaluation.
;fix_ZRepair_DepthTexture1=SceneDepthTexture.x
;fix_ZRepair_Dependencies1=MinZ_MaxZRatio
;fix_ZRepair_ZPosCalc1=zTex * MinZ_MaxZRatio.z - MinZ_MaxZRatio.w
;fix_ZRepair_DepthTexture2=SceneDepthTexture.x
;fix_ZRepair_Dependencies2=
;fix_ZRepair_ZPosCalc2=zTex
;fix_ZRepair_PositionTexture=PositionTexture
;fix_ZRepair_PositionCalc=1024 * %s

; Inject depth texture if other depth sources are unavailable.
;fix_ZRepair_DepthTextureHash=8a19f087b004598f

; Correct inverse transformations in pixel shaders using evaluated depth.
;fix_InvTransform=ScreenToLight,InverseTranslatedViewProjectionMatrix

; Back projection coordinate fix. 
; 
; Available variables in expressions:
; stereoParams.x = Separation value in range [0..1] or [-0..-1] dependent on active eye
; stereoParams.y = Convergence value in w coordinates (1/z)
; stereoParams.z = -1/1 for left/right eye
; stereoParams.w = Separation value without eye separation
; stereoTune.x = tune value 1 (default is 1)
; stereoTune.y = tune value 2 (default is 1)
; stereoTune.z = tune value 3 (default is 1)
; stereoTune.w = tune value 4 (default is 1)
; stereoScreenRes.x = Primary swap chain backbuffer horizontal resolution
; stereoScreenRes.y = Primary swap chain backbuffer vertical resolution
; zpos = current pixel z position in pixel shader
; wpos = current pixel w position in pixel shader

; Send inverse transformations from vertex shaders to pixel shaders.
;fix_BackProjectionTransform1=ScreenToTranslatedWorldMatrix._m00,ScreenToTranslatedWorldMatrix._m02,ScreenToTranslatedWorldMatrix._m01
;fix_BackProjectionTransform2=ScreenToWorld._m00,ScreenToWorld._m02,ScreenToWorld._m01

; Position variables to correct in pixel shaders.
;fix_ObjectPosition1=PointPositionAndInverseRadius
;fix_ObjectPosition1Multiplier=1, (stereoScreenRes.x/stereoScreenRes.y)*0.5, -0.5
;fix_ObjectPosition2=SpotPositionAndInverseRadius
;fix_ObjectPosition2Multiplier=1, (stereoScreenRes.x/stereoScreenRes.y)*0.5, -0.5

; Matrix multiplications to correct in pixel shaders.
;fix_MatrixOperand1=TranslatedWorldToShadowMatrix
;fix_MatrixOperand1Multiplier=1, (stereoScreenRes.x/stereoScreenRes.y)*0.5 - viewDirection.z*0.05 + (0.02791946-stereoParams.x/stereoParams.w), 0

; autofix shader option: recompiles all vertex shaders. fixes minor differences in deferred rendering.
;recompile_all_vs=0
 
;------------------------------------------------------------------------------------------------------
; Shader hunting options. 
; Default setup is to use keyboard similar to Helix presets
;------------------------------------------------------------------------------------------------------
[Hunting]

; Release mode is with shader hunting disabled, optimized for speed.
hunting=0

; Highlight mode of currently selected shader / rendertarget.
; "skip" = skip shader. don't render anything using the currently selected shader.
; "original" = fall back to original shader if the currently selected shader was patched.
; "mono" = disable stereo for the selected shader / rendertarget.
; "zero" = shader output is all zero. NOTE: this has a big performance impact.
marking_mode=skip

; Key bindings: For A-Z and 0-9 on the number row, just use that single
; character. For everything else (including mouse buttons), use the virtual key
; name (with or without the VK_ prefix) or hex code from this article:
; http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx

; rotate through all VISIBLE pixel shaders at the current scene.
next_pixelshader=VK_NUMPAD2
previous_pixelshader=VK_NUMPAD1
mark_pixelshader=VK_NUMPAD3

; rotate through all VISIBLE vertex shaders at the current scene.
next_vertexshader=VK_NUMPAD5
previous_vertexshader=VK_NUMPAD4
mark_vertexshader=VK_NUMPAD6

; rotate through all USED index buffers at the current scene.
next_indexbuffer=VK_NUMPAD8
previous_indexbuffer=VK_NUMPAD7
mark_indexbuffer=VK_NUMPAD9

; rotate through all USED render targets at the current scene.
next_rendertarget=VK_MULTIPLY
previous_rendertarget=VK_DIVIDE
mark_rendertarget=VK_SUBTRACT

; Re-enable shaders once done with hunting:
done_hunting=VK_ADD

; Screenshot as pns
take_screenshot=VK_SNAPSHOT

; reload all fixes from ShaderFixes folder
reload_fixes=VK_F10

; tunable parameter to use in modified shaders as variable (StereoParams.Load(int3(1,0,0)).xyzw)
; enabling tuning results in a small performance hit because the parameter texture
;tune1_up=VK_INSERT
;tune1_down=VK_DELETE


;------------------------------------------------------------------------------------------------------
; Shader manipulations without patches.
;------------------------------------------------------------------------------------------------------
;[ShaderOverride1]
;Hash=69732c4f23cb6c48
; Custom stereo separation value while rendering objects using this shader.
;Separation=0
; don't draw anything using this shader.
;Handling=skip
; advanced option: use this to override only specific render iterations.
;Iteration=1,3,5
; advanced option: use this to override only if this shader is used rendering the given index buffer.
;IndexBufferFilter=b3e56ebcb0d20c32


;------------------------------------------------------------------------------------------------------
; texture / render target manipulations
;------------------------------------------------------------------------------------------------------
;[TextureOverride1]
;Hash=c3e55ebdb0d20c35
; NVidia stores surface creation mode heuristics in the game profile. setting
; this option overrides the creation mode for a given texture / buffer.
; 0 = NVAPI_STEREO_SURFACECREATEMODE_AUTO - use driver registry profile settings. 
; 1 = NVAPI_STEREO_SURFACECREATEMODE_FORCESTEREO - create stereo surface.
; 2 = NVAPI_STEREO_SURFACECREATEMODE_FORCEMONO - create mono surface.
;StereoMode=2
; advanced option: use this to only override specific iterations of this texture.
;Iteration=1,3,5

;[TextureOverride2]
;...

;------------------------------------------------------------------------------------------------------
; Custom stereo settings override
;------------------------------------------------------------------------------------------------------
[OverrideSettings]

; Example of settings override by mouse button configuration
;Input=Mouse
;Action=Button 1
;Convergence=0
;Separation=0

; Example of settings override by keyboard configuration
;Input=Keyboard
;Action=Ctrl
;Convergence=5.0
;Separation=10

; Example of settings override by XBOX360 joypad button presses
;XInputDevice=0
;Action=LeftTrigger
;Convergence=5.0
;Separation=10

; Example of settings override by generic joystick/joypad configuration
;Input=WingMan Cordless Gamepad
;DeviceNr=0
;Action=Button9
;Convergence=5.0
;Separation=10


;------------------------------------------------------------------------------------------------------
; Example of settings override by mouse button configuration
; Mapping of from game provided hard coded convergence values to custom values
; Those are values for L.A. Noir
; Example of settings override by mouse button configuration
;------------------------------------------------------------------------------------------------------
;[ConvergenceMap]

;Map1=from 3e99999a to 0.3
;Map2=from 3f800000 to 1.0
;Map3=from 3f666666 to 0.9

