Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2022
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.79 KB | None | 0 0
  1. ; ------------------------------------------------------------------------------------------------------
  2. ; Additional configuration files
  3. ; ------------------------------------------------------------------------------------------------------
  4. [Include]
  5. ; If you were using 3DMigoto as a full modding platform for a given game
  6. ; instead of just a single stand-alone mod (e.g. facilitating mesh/texture
  7. ; replacements or other graphics mods), you can include an entire directory
  8. ; where users can extract third party mods created by others and 3DMigoto will
  9. ; include every .ini file and any external files referred to by CustomShader /
  10. ; Resource sections (Replaced shaders in these mods should still go in
  11. ; ShaderFixes for now, unless the modders want to use CustomShaders or
  12. ; ShaderRegex to keep them standalone).
  13. ;include_recursive = Mods
  14. exclude_recursive = DISABLED*
  15.  
  16. ; Uncomment to enable a custom shader that allows the stereo output mode to be
  17. ; upscaled. NOTE: uncomment only if 'upscaling' and resolution are not zero in
  18. ; the [Device] section.
  19. ;include = ShaderFixes\upscale.ini
  20.  
  21. ; Uncomment to enable a custom shader that implements a software mouse cursor.
  22. ; Use in games that use a hardware cursor if you want to be able to adjust the
  23. ; stereo depth of the mouse, or to work with the below 3DVision2SBS shader.
  24. ; Note that this shader has a higher latency than the hardware cursor!
  25. ;include = ShaderFixes\mouse.ini
  26.  
  27. ; Uncomment to enable a custom shader that allows the stereo output mode to be
  28. ; changed to Side-by-Side or Top-and-Bottom via the F11 key. If you are using
  29. ; SLI and this isn't working properly (partially blank or stuck image) you may
  30. ; need to also set StereoFlagsDX10 = 0x00000008 in the [Profile] section. You
  31. ; can set a default mode by altering $\ShaderFixes\3dvision2sbs.ini\mode in the
  32. ; [Constants] section:
  33. ;include = ShaderFixes\3dvision2sbs.ini
  34.  
  35.  
  36. ;------------------------------------------------------------------------------------------------------
  37. ; Logging options.
  38. ; Comment line or set value to 0 for no logging.
  39. ;------------------------------------------------------------------------------------------------------
  40. [Logging]
  41.  
  42. ; Log all API usage
  43. calls=1
  44.  
  45. ; Log Input key actions
  46. input=1
  47.  
  48. ; Super verbose massive log
  49. debug=0
  50.  
  51. ; Unbuffered logging to avoid missing anything at file end
  52. unbuffered=0
  53.  
  54. ; Force the CPU affinity to use only a single CPU for debugging multi-threaded
  55. force_cpu_affinity=0
  56.  
  57. ; Log NVAPI convergence modifications
  58. convergence=0
  59.  
  60. ; Log NVAPI separation modifications
  61. separation=0
  62.  
  63. ; Enable 3DMigoto's deadlock detection algorithm. If you get hangs (not
  64. ; crashes) this might help find out why.
  65. debug_locks=0
  66.  
  67. ; Enable 3DMigoto's crash handler to flush the log and write out a minidump
  68. ; file in the event the game crashes. If the game hangs rather than crashes you
  69. ; can manually invoke the handler by holding down Ctrl+Alt+F11 until you hear
  70. ; the SOS tones:
  71. crash=0
  72.  
  73. ; ------------------------------------------------------------------------------------------------------
  74. ; Command list to run on launch / after config reload.
  75. ; ------------------------------------------------------------------------------------------------------
  76. [Constants]
  77. ; Declare named global variables here to use them from other command lists,
  78. ; [Key] bindings and [Preset]s. Named variables are namespaced so that any
  79. ; included ini files can use their own without worrying about name clashes:
  80. ;global $my_named_variable = 0.0
  81.  
  82. ; Mark a variable as persist[ent] to automatically save it to the
  83. ; d3dx_user.ini on exit or F10 (config_reload). Use Ctrl+Alt+F10
  84. ; (wipe_user_config) to discard persistent values:
  85. ;global persist $some_persistent_variable = 1
  86.  
  87. ; Set the initial value of "IniParams" variables, which are accessible from
  88. ; within shaders, but they are not namespaced and too many can become unwieldy:
  89. ;x = 0.8
  90. ;y = 1.0
  91. ;z = 1.2
  92. ;w = 2.0
  93. ;y1 = 3
  94.  
  95. ;depthTargetIndicator
  96. x111=0.0
  97.  
  98. ; This is used by the 3DVision2SBS custom shader. To use, find the [Include]
  99. ; section above and uncomment the 'include = ShaderFixes\3dvision2sbs.ini'
  100. ; line. F11 will cycle between these modes while playing, and the current
  101. ; value will be automatically saved to the d3dx_user.ini on exit / F10:
  102. ; 0 = Regular 3D Vision
  103. ; 1 = Reversed 3D Vision
  104. ; 2 = Side by Side
  105. ; 3 = Reversed Side by Side
  106. ; 4 = Top and Bottom
  107. ; 5 = Reversed Top and Bottom
  108. ; 6 = Line interlacing
  109. ; 7 = Reversed Line interlacing
  110. ;$\ShaderFixes\3dvision2sbs.ini\mode = 0
  111.  
  112.  
  113. ;------------------------------------------------------------------------------------------------------
  114. ; Custom settings override for any of [convergence, separation, x, y, z, w]
  115. ;
  116. ; Four types are supported - by default the bindings will simply load the
  117. ; configured settings, but type=hold can be specified to have a preset
  118. ; active while the button is held, type=toggle can be used to make a simple
  119. ; on/off toggle, and type=cycle can be used to cycle forwards and/or backwards
  120. ; between several presets.
  121. ;
  122. ; Delays (type=hold only) and linear or cosine trasition periods (any key type)
  123. ; can be used to better synchonrise setting changes to the game's animations,
  124. ; or to smoothly adjust UI elements over a short period of time.
  125. ;
  126. ; Key bindings: For A-Z and 0-9 on the number row, just use that single
  127. ; character. For everything else (including mouse buttons), use the virtual key
  128. ; name (with or without the VK_ prefix) or hex code from this article:
  129. ; http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
  130. ;
  131. ; Key combinations can be specified by separating key names with spaces, e.g.
  132. ; "Shift Q". It is also possible to indicate that a key must *not* be held for
  133. ; the binding to activate, e.g. "NO_ALT F1" would prevent the binding from
  134. ; activating when taking a 3D Screenshot with Alt F1. "NO_MODIFIERS" may be
  135. ; used as a shorthand for excluding all standard modifiers (Ctrl, Alt, Shift,
  136. ; Windows).
  137. ;
  138. ; Keys can also be from XBox controllers using:
  139. ; XB_LEFT_TRIGGER, XB_RIGHT_TRIGGER,
  140. ; XB_LEFT_SHOULDER, XB_RIGHT_SHOULDER,
  141. ; XB_LEFT_THUMB, XB_RIGHT_THUMB,
  142. ; XB_DPAD_UP, XB_DPAD_DOWN, XB_DPAD_LEFT, XB_DPAD_RIGHT,
  143. ; XB_A, XB_B, XB_X, XB_Y, XB_START, XB_BACK, XB_GUIDE
  144. ; By default all attached controllers are used - to associate a binding with a
  145. ; specific controller add the controller number 1-4 to the prefix, like
  146. ; XB2_LEFT_TRIGGER, though this may be more useful for hunting than playing.
  147. ;
  148. ; Multiple keys may be set in a single [Key] section to allow keyboard and xbox
  149. ; controller toggles and cycles to share the same state as each other.
  150. ;------------------------------------------------------------------------------------------------------
  151.  
  152. ; Example for changing default settings
  153. ;[KeyBasicExample]
  154. ;Key = z
  155. ;separation = 100.0
  156. ;convergence = 4.0
  157. ;x = 0.98
  158. ; Named variables declared in [Constants] can be set here:
  159. ;$my_named_variable = 2
  160.  
  161. ; Example to support momentary hold type overrides, like aiming. Shows how to
  162. ; bind two separate buttons to the same action.
  163. ;[KeyMomentaryHoldExample]
  164. ;Key = RBUTTON
  165. ;Key = XB_LEFT_TRIGGER
  166. ;convergence = 0.1
  167. ;type = hold
  168.  
  169. ; Example for a toggle override that remembers the previous value and restores
  170. ; it automatically when pressed a second time.
  171. ;[KeyToggleExample]
  172. ;Key = q
  173. ;separation = 0.1
  174. ;type = toggle
  175. ;y = 0.0
  176.  
  177. ; Example for using a smart cycle type instead of a toggle. Smart is now the
  178. ; default for cycles, and when activated it will quickly check if the current
  179. ; values match its current cycle preset and resynchronise if necessary. This is
  180. ; better than type=toggle if you always want to toggle between exactly two
  181. ; values specified here, while type=toggle is better if you want to remember
  182. ; some arbitrary current value and return to it:
  183. ;[KeySmartCycleExample]
  184. ;Key = w
  185. ;type = cycle
  186. ;smart = true
  187. ;$some_variable = 0, 1
  188.  
  189. ; Example for a momentary hold, but with a delay followed by a smooth
  190. ; transition (ms) on hold and release to sync better with the game. Note that
  191. ; delay only works with type=hold (for now), while transitions will work with
  192. ; all types.
  193. ;[KeyDelayAndTransitionExample]
  194. ;Key = RBUTTON
  195. ;Key = XB_LEFT_TRIGGER
  196. ;type = hold
  197. ;y = 0.25
  198. ;delay = 100
  199. ;transition = 100
  200. ;transition_type = linear
  201. ;release_delay = 0
  202. ;release_transition = 500
  203. ;release_transition_type = cosine
  204.  
  205. ; Example of a cycle transition that might be used to provide several presets
  206. ; that set both convergence and UI depth to suit different scenes in a game.
  207. ; Cosine transitions are used to smooth the changes over 1/10 of a second.
  208. ; Both keyboard and Xbox controller buttons are bound to this same cycle, so
  209. ; that they can be used interchangeably and remember the same position in the
  210. ; preset list. A second key is used to cycle backwards through the presets, and
  211. ; wrapping from one end of the list to the other is disabled.
  212. ;[KeyCycleExample]
  213. ;Key = E
  214. ;Key = XB_RIGHT_SHOULDER
  215. ;Back = Q
  216. ;Back = XB_LEFT_SHOULDER
  217. ;type = cycle
  218. ;wrap = false
  219. ;convergence = 1.45, 1.13, 0.98
  220. ;z = 0.25, 0.5, 0.75
  221. ;transition = 100
  222. ;transition_type = cosine
  223.  
  224. ; Keys can only directly set variables to simple values. If you want to do
  225. ; something more advanced, you may need to call a command list from the key
  226. ; binding. type=hold/toggle keys will run the post phase of the command list on
  227. ; release.
  228. ;[KeyCommandListExample]
  229. ;key = f
  230. ;run = CommandListF
  231. ;[CommandListF]
  232. ;if $foo == 0 && cursor_showing
  233. ; $foo = $bar * 3.14 / rt_width
  234. ;else
  235. ; $foo = 0
  236. ;endif
  237.  
  238. ; Example of a preset override that can be referenced by one or more [ShaderOverride*]
  239. ; sections which can be activated / deactivated automatically when one of the shader
  240. ; overrides is activated / deactivated. This is useful for setting automatic
  241. ; convergence for specific scene.
  242. ;[PresetExample]
  243. ;convergence = 0
  244. ;$some_variable = 1
  245. ;transition = 100
  246. ;transition_type = linear
  247.  
  248.  
  249. ;------------------------------------------------------------------------------------------------------
  250. ; Shader hunting options.
  251. ; Default setup is to use keyboard similar to Helix presets
  252. ;------------------------------------------------------------------------------------------------------
  253. [Hunting]
  254.  
  255. ; 0: Release mode is with shader hunting disabled, optimized for speed.
  256. ; 1: Hunting mode enabled
  257. ; 2: Hunting mode "soft disabled" - can be turned on via the toggle_hunting key
  258. hunting=1
  259.  
  260. ; Highlight mode of currently selected shader / rendertarget.
  261. ; "skip" = skip shader. don't render anything using the currently selected shader.
  262. ; "original" = fall back to original shader if the currently selected shader was patched.
  263. ; "pink" = make the output hot pink to make it standout.
  264. ; "mono" = disable stereo for the selected shader / rendertarget.
  265. marking_mode=skip
  266.  
  267. ; Cycle through available marking modes. VK_DECIMAL VK_NUMPAD0
  268. ; means hold the dot on the number pad while pressing numpad 0:
  269. next_marking_mode = no_modifiers VK_DECIMAL VK_NUMPAD0
  270.  
  271. ; What action(s) to take when marking a selected shader/buffer
  272. ; "hlsl" = decompile shader to HLSL and copy to ShaderFixes
  273. ; "asm" = disassemble shader and copy to ShaderFixes (if hlsl is disabled or failed)
  274. ; "regex" = output ShaderRegex patched shader if applicable (NOTE: Will lose associated command list)
  275. ; "clipboard" = copy shader/buffer hash to clipboard
  276. ; "mono_snapshot" = take mono screenshot (previously called mark_snapshot=1)
  277. ; "stereo_snapshot" = take stereo screenshot (previously called mark_snapshot=2)
  278. ; "snapshot_if_pink" = limit mono/stereo_snapshot to when marking_mode=pink
  279. marking_actions = clipboard regex hlsl asm stereo_snapshot snapshot_if_pink
  280.  
  281. ; Key bindings: For A-Z and 0-9 on the number row, just use that single
  282. ; character. For everything else (including mouse buttons), use the virtual key
  283. ; name (with or without the VK_ prefix) or hex code from this article:
  284. ; http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
  285. ;
  286. ; XBox controllers are supported using the same bindings as the [Key] sections
  287. ; (see above). If the game already uses the first controller you might try
  288. ; using the second controller for hunting with e.g. XB2_LEFT_SHOULDER
  289.  
  290. ; rotate through all VISIBLE pixel shaders at the current scene.
  291. previous_pixelshader = no_modifiers NO_VK_DECIMAL VK_NUMPAD1
  292. next_pixelshader = no_modifiers NO_VK_DECIMAL VK_NUMPAD2
  293. mark_pixelshader = no_modifiers NO_VK_DECIMAL VK_NUMPAD3
  294.  
  295. ; rotate through all VISIBLE vertex shaders at the current scene.
  296. previous_vertexshader = no_modifiers NO_VK_DECIMAL VK_NUMPAD4
  297. next_vertexshader = no_modifiers NO_VK_DECIMAL VK_NUMPAD5
  298. mark_vertexshader = no_modifiers NO_VK_DECIMAL VK_NUMPAD6
  299.  
  300. ; rotate through all USED index buffers at the current scene.
  301. previous_indexbuffer = no_modifiers NO_VK_DECIMAL VK_NUMPAD7
  302. next_indexbuffer = no_modifiers NO_VK_DECIMAL VK_NUMPAD8
  303. mark_indexbuffer = no_modifiers NO_VK_DECIMAL VK_NUMPAD9
  304.  
  305. ; rotate through all USED vertex buffers at the current scene.
  306. previous_vertexbuffer = no_modifiers NO_VK_DECIMAL VK_DIVIDE
  307. next_vertexbuffer = no_modifiers NO_VK_DECIMAL VK_MULTIPLY
  308. mark_vertexbuffer = no_modifiers NO_VK_DECIMAL VK_SUBTRACT
  309.  
  310. ; rotate through all USED render targets at the current scene.
  311. ;previous_rendertarget = no_modifiers VK_INSERT
  312. ;next_rendertarget = no_modifiers VK_HOME
  313. ;mark_rendertarget = no_modifiers VK_PAGEUP
  314.  
  315. ; rotate through all USED compute shaders at the current scene.
  316. previous_computeshader = no_modifiers VK_DECIMAL VK_NUMPAD1
  317. next_computeshader = no_modifiers VK_DECIMAL VK_NUMPAD2
  318. mark_computeshader = no_modifiers VK_DECIMAL VK_NUMPAD3
  319.  
  320. ; rotate through all VISIBLE geometry shaders at the current scene.
  321. previous_geometryshader = no_modifiers VK_DECIMAL VK_NUMPAD4
  322. next_geometryshader = no_modifiers VK_DECIMAL VK_NUMPAD5
  323. mark_geometryshader = no_modifiers VK_DECIMAL VK_NUMPAD6
  324.  
  325. ; rotate through all VISIBLE domain shaders at the current scene.
  326. previous_domainshader = no_modifiers VK_DECIMAL VK_NUMPAD7
  327. next_domainshader = no_modifiers VK_DECIMAL VK_NUMPAD8
  328. mark_domainshader = no_modifiers VK_DECIMAL VK_NUMPAD9
  329.  
  330. ; rotate through all VISIBLE hull shaders at the current scene.
  331. previous_hullshader = no_modifiers VK_DECIMAL VK_DIVIDE
  332. next_hullshader = no_modifiers VK_DECIMAL VK_MULTIPLY
  333. mark_hullshader = no_modifiers VK_DECIMAL VK_SUBTRACT
  334.  
  335. ; Re-enable shaders once done with hunting:
  336. done_hunting = NO_MODIFIERS NO_VK_DECIMAL VK_ADD
  337.  
  338. ; Screenshot as pns
  339. take_screenshot = no_modifiers VK_SNAPSHOT
  340.  
  341. ; reload all fixes from ShaderFixes folder
  342. reload_fixes = no_modifiers VK_F10
  343.  
  344. ; Key to turn hunting itself on/off. This will also show/hide overlay.
  345. ; Hunting must be set to either 1 or 2 to enable this toggle.
  346. toggle_hunting = no_modifiers NO_VK_DECIMAL VK_NUMPAD0
  347.  
  348. ; Key to reload the settings from the d3dx.ini without restarting. This can
  349. ; be the same key as reload_fixes for convenience, or a different key may be
  350. ; used to avoid resetting the ini parameters every time the shaders are
  351. ; reloaded. Note that not all settings can be reloaded, so if something doesn't
  352. ; work as expected you may still have to restart the game:
  353. reload_config = no_modifiers VK_F10
  354.  
  355. ; Deletes the d3dx_user.ini file and reloads settings to get a "clean slate"
  356. wipe_user_config = ctrl alt no_shift VK_F10
  357.  
  358. ; Hold this key to temporarily disable the fix - useful to quickly check what
  359. ; an effect looked like in the original game.
  360. show_original = no_modifiers VK_F9
  361.  
  362. ; Shows the CPU utilisation and performance impact of every active command list
  363. monitor_performance = ctrl no_shift no_alt F9
  364.  
  365. ; Freeze the current performance monitor display and log to the d3d11_log.txt
  366. freeze_performance_monitor = no_ctrl shift no_alt F9
  367.  
  368. ; Sets how often the performance monitor updates
  369. monitor_performance_interval = 2.0
  370.  
  371. ; Auto-repeat key rate in events per second.
  372. repeat_rate=10
  373.  
  374. ; Enabling this makes the overlay show the hashes of the currently selected
  375. ; shaders and index buffer during hunting. We don't actually recommend this,
  376. ; because writing down the hash from the screen is a bad habbit that tends to
  377. ; be very error prone - the recommended workflow is to dump the shaders to disk
  378. ; and check the most recently modified file in ShaderFixes, but advanced users
  379. ; can enable this if they want it:
  380. verbose_overlay=1
  381.  
  382. ; tunable parameter to use in modified shaders as variable (StereoParams.Load(int3(1,0,0)).xyzw)
  383. ; enabling tuning results in a small performance hit because the parameter texture
  384. ;tune_enable=1
  385. ;tune_step=0.1
  386. ;tune1_up=VK_INSERT
  387. ;tune1_down=VK_DELETE
  388. ;tune2_up=X
  389. ;tune2_down=Z
  390.  
  391.  
  392. ; Dumps out a flight log of DirectX state changes and the contents of each
  393. ; render target after every immediate draw call for the next frame. Takes up a
  394. ; large amount of space, so disabled by default.
  395. ;analyse_frame = no_modifiers VK_F8
  396.  
  397. ; analyse_options specifies options for the frame analysis feature. Options can
  398. ; be combined by separating them with a space.
  399. ;
  400. ; Dumping selection (also refer to the "dump" command described below):
  401. ; dump_rt: Dumps render targets and UAVs
  402. ; dump_depth: Dumps depth/stencil targets
  403. ; dump_tex: Dumps shader resources (textures)
  404. ; dump_cb: Dumps constant buffers
  405. ; dump_vb: Dumps vertex buffers
  406. ; dump_ib: Dumps index buffers
  407. ;
  408. ; Texture2D format selection:
  409. ; jpg/jps: Dumps out 2D/stereo resources as .jps files. These are the easiest
  410. ; to work with and don't take up as much space as DDS files, but
  411. ; they are not dumped for every resource and are missing some data.
  412. ; dds: Dumps out 2D/stereo resources as .dds files. WARNING: This option
  413. ; may require hundreds of gigabytes and a long time! Only use it if
  414. ; you absolutely need more information than you can get otherwise.
  415. ; jps_dds: Dumps out .jps when possible, .dds otherwise (default).
  416. ; desc: Dumps out DirectX resource descriptions to .dsc files.
  417. ;
  418. ; Buffer format selection:
  419. ; buf: Dumps out buffers as binary .buf files
  420. ; txt: Decodes buffers as text, and includes some extra metadata not
  421. ; found in the .buf files. May not correctly decode all buffers.
  422. ; Default if dump_cb/vb/ib was specified.
  423. ; desc: Dumps out DirectX resource descriptions to .dsc files.
  424. ;
  425. ; Misc options:
  426. ; hold: Continue analysing subsequent frames while the key is held
  427. ; clear_rt: Clears each render target the first time they are used in the
  428. ; frame. Makes it easier to see what is being drawn if the game
  429. ; doesn't clear them, but might cause some effects not to render.
  430. ; filename_reg: Normally the draw number is the first part of the filename so
  431. ; that the files will be sorted in the order they were used in
  432. ; the game. Sometimes it is more desirable to examine how a
  433. ; specific output changed through the frame and this option will
  434. ; place the register number first in the filename to allow that.
  435. ; mono: Dump out mono textures instead of stereo. To dump both, specify
  436. ; 'mono stereo'. If neither are specified, defaults to stereo.
  437. ; dump_on_unmap: Dumps buffers/textures whenever the game maps them to the CPU
  438. ; with the Map() / Unmap() calls. Typically used to update
  439. ; constant buffers.
  440. ; dump_on_update: Dumps buffers/textures whenever the game updates them with
  441. ; the UpdateSubresource() call. Alternative method used to
  442. ; update constant buffers.
  443. ; share_dupes: Use a folder that is shared with subsequent frame analysis
  444. ; dumps for de-duplicating dumped resources. Makes future frame
  445. ; analysis dumps faster and use less disk space if there are a
  446. ; lot of identical textures, but less trivial to delete
  447. ; individual dump folders to reclaim disk space (i.e. all or
  448. ; nothing). Individual frame analysis folders are still
  449. ; de-duplicated regardless of this setting.
  450. ; symlink: Try to use symbolic links when de-duplicating files in a
  451. ; frame analysis dump. Requires developer mode to be enabled in
  452. ; Windows 10, and will fall back to hard links or shortcuts
  453. ; when not possible. Useful to see the relationship between
  454. ; deduplicated files, especially when working with cygwin, but
  455. ; some Windows applications may behave worse when using these.
  456. ;
  457. ; Experimental Deferred Context (multi-threaded rendering) Frame Analyis Support:
  458. ; deferred_ctx_immediate: Dumps resources from deferred contexts using the
  459. ; immediate context. Not suitable for dump_rt or other
  460. ; resources altered during the frame (by the GPU or CPU). May
  461. ; be ok for static unchanging resources, such as collecting HUD
  462. ; textures for filtering. Not thread safe - potential to crash.
  463. ; Recommended (not enforced) to use in conjunction with 'mono'.
  464. ; deferred_ctx_accurate: Delays dumping resources from deferred contexts
  465. ; until after the GPU has updated them. Copies of *all*
  466. ; resources being dumped are held in memory, so it may run out
  467. ; - try to restrict using this option to specific resources
  468. ; where it is needed - preferably via the "dump" command rather
  469. ; than the global analyse_options. Works with 'stereo'.
  470. ;
  471. ; analyse_options can also be specified in [ShaderOverride*] sections (or other
  472. ; command lists) to set up triggers to change the options mid-way through a
  473. ; frame analysis, either for a single draw call (default), or permanently (by
  474. ; adding the 'persist' keyword).
  475. ;
  476. ; Alternatively, "dump" can be specified in a [ShaderOverride*] section (or
  477. ; any other command list) to dump specific resources with per-resource options
  478. ; (e.g. "dump = dump_tex dds share_dupes mono ps-t0"), dump resources at a
  479. ; specific point in time (e.g. "pre dump = o0") or dump a custom resource that
  480. ; frame analysis cannot otherwise see (e.g. "dump = ResourceDepthBuffer"). Use
  481. ; additional "dump" commands to dump multiple resources.
  482. ;
  483. ;analyse_options = dump_rt jps clear_rt
  484.  
  485.  
  486.  
  487. ;------------------------------------------------------------------------------------------------------
  488. ; Chain load other wrapper DLLs instead of system DLLs.
  489. ;------------------------------------------------------------------------------------------------------
  490. [System]
  491.  
  492. ;proxy_d3d9=d3d9_helix.dll
  493. ;proxy_d3d11=d3d11_helix.dll
  494.  
  495. ; We force all LoadLibrary calls back to the game folder, because games
  496. ; and nvidia both break the loading chain by going directly to System32.
  497. ; load_library_redirect=0 for off, allowing all through unchanged.
  498. ; load_library_redirect=1 for nvapi.dll override only, forced to game folder.
  499. ; load_library_redirect=2 for both d3d11.dll and nvapi.dll forced to game folder.
  500. load_library_redirect=2
  501.  
  502. ; Only enable key input processing when the game is in the foreground:
  503. check_foreground_window=1
  504.  
  505. ; Options to use hooking instead of wrapping. Used in MGSV. Possible objects to hook include:
  506. ; deferred_contexts
  507. ; immediate_context
  508. ; device
  509. ; all - all of the above
  510. ; recommended - settings currently recommended by the 3DMigoto developers
  511. ;hook=recommended
  512.  
  513. ; Options to allow ID3D11Device to be created and wrapped. We have typically had good
  514. ; luck with returning an error for all non-dx11 requests, but some games error out
  515. ; with these checks in place.
  516. ; The allow_create_device allows D3D10 Device creation and is needed for some games.
  517. ; It has two options, allow_create_device=1, which will allow anything to go through
  518. ; without returning an error, and allow_create_device=2, which will force all requests
  519. ; to become D3D11 Devices, no matter what was passed in.
  520. ; The allow_platform_update option allows the D3D11Device1 and D3D11Context1
  521. ; interfaces introduced in Windows 8 and the platform update of Windows 7.
  522. ;
  523. ; Start with allow_check_interfaces, if that doesn't work
  524. ; then try allow_create_device=2, lastly try allow_create_device=1
  525. ;
  526. allow_check_interface=1
  527. allow_create_device=1
  528. allow_platform_update=1
  529.  
  530. ;------------------------------------------------------------------------------------------------------
  531. ; Settings used by the external 3DMigoto Loader
  532. ;------------------------------------------------------------------------------------------------------
  533. [Loader]
  534. ; Target process to load into. You can optionally include part of the directory
  535. ; structure in case the game's executable name is generic.
  536. target = re2.exe
  537.  
  538. ; This tells the loader where to find 3DMigoto. This DLL must be located
  539. ; in the same directory as 3DMigoto Loader.exe and will be loaded in the target
  540. ; process under the same name. If d3d11.dll doesn't work try 3dmigoto.dll
  541. module = d3d11.dll
  542.  
  543. ; Uncomment to always elevate the loader to support games that run as admin.
  544. ; This will display a UAC prompt so only enable it if you actually need it.
  545. require_admin = true
  546.  
  547. ; Automatically launch the game from the loader. If you put the executable name
  548. ; here than the loader will need to be located in the game directory. You can
  549. ; use the full path, but that is not recommended to ship any fixes with since
  550. ; it will vary on a user's system. If the game is on Steam you can use the
  551. ; steam browser protocol to launch it, optionally passing it any command line
  552. ; arguments you need (unfortunately Steam pops a dialog to confirm command line
  553. ; parameters, which tends to end up behind other windows):
  554. ;launch = DOA6.exe
  555. launch = steam://run/883710/
  556. ;launch = steam://run/237850//-window-mode exclusive/
  557.  
  558. ; Delay this many extra seconds after confirming that 3DMigoto was loaded in
  559. ; the target process. For games that respawn themselves or have multiple
  560. ; executables of the same name when the first process we see may not be the
  561. ; actual one we need. Set to -1 to disable automatic shut down.
  562. delay = 20
  563.  
  564. ;------------------------------------------------------------------------------------------------------
  565. ; Settings to force display device to a specific mode.
  566. ; Uncomment a value to force the specific setting.
  567. ;------------------------------------------------------------------------------------------------------
  568. [Device]
  569.  
  570. ; (0) - disable upscaling
  571. ; (1) - enable upscaling and allows the game to disable and enable fullscreen mode
  572. ; (2) - enable upscaling and don't allow the game to switch fullscreen mode
  573. ; (always force fullscreen). Try this if you get issues with the mouse cursor.
  574. ; Note if you enable upscaling please do not forget to:
  575. ; 1) Uncomment "run = CustomShaderUpscale" in the [Present] section,
  576. ; otherwise you will see only a black window (with game sound).
  577. ; 2) Set a custom resolution here for width and height that the game will see.
  578. ; 3) Uncomment upscale_mode here.
  579.  
  580. ; Will now auto-upscale to desktop display resolution, unless overriden by the
  581. ; width/height below.
  582. upscaling = 0
  583.  
  584. ; Force override the screen resolution.
  585. ; If upscaling is on, the resizing functionality is disabled.
  586. ; If upscaling is on, then you MUST specify the resolution the game will be upscaled to.
  587. ; To achieve the best visual result use the native resolution of your tv or monitor.
  588. ;width = 2560
  589. ;height = 1440
  590.  
  591. ; upscale_mode = 0: 3Dmigoto creates a texture and pushes it as the back buffer for the game.
  592. ; Seems to work with only few games but everything seems to run a bit smoother.
  593. ; upscale_mode = 1: 3Dmigoto creates a second swap chain and pushes the game to use it.
  594. ; Seems to work with most games. dont forget to activate upscaling shader in [present] section
  595. ;upscale_mode = 1
  596.  
  597.  
  598. ; overrides refresh rate set by game.
  599. ;refresh_rate=60
  600.  
  601. ; filters available video modes to those providing given refresh rates.
  602. ; some games don't explicitely set the refresh rate, but use the video mode.
  603. ; use this if setting refresh_rate doesn't work.
  604. ;filter_refresh_rate=24,59,60
  605.  
  606. ; full_screen=1 forces creation of full screen devices and swap chains.
  607. ; use this for 3dtvplay if game won't active stereo mode.
  608. ; full_screen=2 will also disable SetWindowPos which might help in some games.
  609. full_screen=1
  610.  
  611. ; This attempts to force exclusive full screen when this key is pressed, and
  612. ; may be useful in games where full_screen doesn't work or has undesirable side
  613. ; effects:
  614. ;force_full_screen_on_key = no_modifiers VK_F7
  615.  
  616. ; This toggles forcing the full screen mode on and off. It will not take effect
  617. ; immediately, but will change what happens the next time the game tries to
  618. ; change the fullscreen mode. This is a specific hack to workaround a bug in
  619. ; Unity games, which crash when alt+tabbing out from exclusive mode fullscreen.
  620. ;
  621. ; To switch out of a Unity game without it crashing:
  622. ; Enable this option, Press F7, Alt+Enter, Alt+Tab
  623. ;toggle_full_screen = no_modifiers VK_F7
  624.  
  625. ; some games explicitely disable stereo, prohibiting any stereo attempts.
  626. ; Setting this to 1 ignores all stereo disabling calls and also calls
  627. ; NvAPI_Stereo_Enable to force stereo on.
  628. ; Setting this to 2 sets 3Dmigoto to use 3D Vision Direct Mode
  629. force_stereo = 2
  630.  
  631. ; almost all DX11 games deactivate window message handling.
  632. ; setting this to 1 reenables print screen handling, alt-tab key handling etc.
  633. allow_windowcommands=1
  634.  
  635. ; Indicates where the resolution is obtained for texture hashes. Comment this
  636. ; out to never special case hashes that match the resolution or a multiple.
  637. ; Possible values are swap_chain and depth_stencil. Recommended to test which
  638. ; works for a given game (e.g. CryEngine always creates a swap chain that
  639. ; matches the native resolution so has to use depth_stencil).
  640. get_resolution_from = large_2d_depth_stencil_if_swap_chain_native
  641. ;depth_stencil_if_swap_chain_native
  642. ;get_resolution_from = swap_chain
  643.  
  644. ; This will hide the hardware mouse cursor, and will be automatically enabled
  645. ; if the software mouse configuration file is included at the top of this file.
  646. ; The hardware mouse cursor cannot be moved to depth and cannot be used in
  647. ; conjunction with the side-by-side or top-and-bottom output modes, so using a
  648. ; software mouse cursor is recommended in those cases.
  649. ; NOTE: IT IS RECOMMENDED TO RESTART THE GAME AFTER CHANGING THIS SETTING!
  650. hide_cursor = 0
  651.  
  652. fps_monitor_interval = 1
  653. show_fps_monitor = true
  654. fps_show_hide = no_modifiers VK_F5
  655.  
  656. ;------------------------------------------------------------------------------------------------------
  657. ; Settings for NVidia stereo driver.
  658. ;------------------------------------------------------------------------------------------------------
  659. [Stereo]
  660.  
  661. ; games which have their own stereo renderer disable the NVidia automatic
  662. ; stereo mode and render themselves into stereo buffers (Crysis 3 for example).
  663. ; Setting this to 1 disables the game stereo renderer and enables NVidia auto stereo mechanism.
  664. ; This also forces 'false' as a return for any request for NvAPI_Stereo_IsEnabled.
  665. automatic_mode=0
  666.  
  667. ; Some games (CryEngine games, for example) lock the separation & convergence
  668. ; to a specific value, which can be undesirable. Set this to 1 to ignore these
  669. ; requests from the game to unlock the separation:
  670. unlock_separation=0
  671. unlock_convergence=0
  672.  
  673. ; games without predefined profiles can't save stereo settings.
  674. ; enabling this options automatically creates a profile for unknown games.
  675. ; Note that there is now a more flexible means to alter the game's profile -
  676. ; refer to the [Profile] section.
  677. create_profile=0
  678.  
  679. ; sets the global surface creation heuristic for NVidia stero driver.
  680. ; 0 = NVAPI_STEREO_SURFACECREATEMODE_AUTO - use driver registry profile settings for surface creation mode.
  681. ; 1 = NVAPI_STEREO_SURFACECREATEMODE_FORCESTEREO - Always create stereo surfaces.
  682. ; 2 = NVAPI_STEREO_SURFACECREATEMODE_FORCEMONO - Always create mono surfaces.
  683. surface_createmode=0
  684.  
  685. ; overrides surface creation mode for square surfaces.
  686. ;surface_square_createmode=1
  687.  
  688. ; Force the NvAPI_Initialize to return an error so that games think stereo and NVidia is unavailable.
  689. force_no_nvapi=0
  690.  
  691.  
  692. ;------------------------------------------------------------------------------------------------------
  693. ; Settings for GPU manipulations.
  694. ; Render settings override
  695. ;------------------------------------------------------------------------------------------------------
  696. [Rendering]
  697.  
  698. ; GPU program manipulations.
  699.  
  700. ; Type of shader hashes in use:
  701. ; 3dmigoto = Traditional hash used by 3DMigoto (unseeded software FNV-1)
  702. ; embedded = Use the first half of the MD5-like hash embedded within the
  703. ; shaders to skip the hash calculation altogether.
  704. ; bytecode = Only hash bytecode and signatures with hardware accelerated
  705. ; CRC32C. Used to minimise duplicate shaders in certain games, but
  706. ; potentially carries a higher risk of hash collisions between
  707. ; unrelated shaders in some games (e.g. that only differ in
  708. ; variable names). May occasionally avoid hash changes on game
  709. ; updates due to changes in the game developer's build environment
  710. ; (shader compiler version, build path embedded in debug info,
  711. ; constants renamed, etc). Will not avoid hash changes if the
  712. ; shader code, constant values, etc are changed.
  713. shader_hash = 3dmigoto
  714.  
  715. ; Switch to newer texture hashes that are less susceptible to corruption and
  716. ; don't have collisions if part of the image matches. May have a slight
  717. ; performance penalty since more of the image is hashes. Do not enable if
  718. ; upgrading an existing fix!
  719. texture_hash=0
  720.  
  721. ; Shaders in game will be replaced by these custom shaders.
  722. override_directory=ShaderFixes
  723.  
  724. ; Automatically patched shaders will be written here if caching is enabled.
  725. cache_directory=ShaderCache
  726.  
  727. ; Shaders that are directly compiled by the game, instead of binary, go here.
  728. storage_directory=ShaderFromGame
  729.  
  730. ; cache all compiled .txt shaders into .bin. this removes loading stalls.
  731. cache_shaders=1
  732.  
  733. ; Indicates whether scissor clipping should be disabled by default. A restart
  734. ; is required for this to take effect. If you need to do this on a per shader
  735. ; basis, you can use "run = BuiltInCustomShaderEnableScissorClipping" or "run =
  736. ; BuiltInCustomShaderDisableScissorClipping" from a [ShaderOverride], or define
  737. ; your own [CustomShader] section to change whatever render state you need and
  738. ; use "handling = skip" and "draw = from_caller" to transfer the draw call to
  739. ; them.
  740. rasterizer_disable_scissor=0
  741.  
  742. ; Tracks copies and updates to textures which may cause their hash to become
  743. ; out of sync with their contents - enable if texture hashes seem unreliable.
  744. ; You can also set this to 2 to disable hash contamination detection for better
  745. ; performance in hunting mode, but only do that if you are certain you won't
  746. ; be needing this in the game in question.
  747. track_texture_updates=0
  748.  
  749. ; Registers where the StereoParams and IniParams textures will be assigned -
  750. ; change if the game already uses these registers. Newly decompiled shaders
  751. ; will use the new registers, but existing shaders will not be updated - best
  752. ; workflow is to remove ShaderCache after changing these and run a search and
  753. ; replace on all shaders in ShaderFixes. Set to -1 to disable if not required.
  754. stereo_params = 125
  755. ini_params = 120
  756.  
  757. ; Set to 1 to assemble the Input / Output / Patch Constant signature comments
  758. ; in shader assembly to allow them to be changed for passing new values between
  759. ; pipeline stages. Be careful with these comments if this is enabled - treat
  760. ; them like code! If set to 0 the assembler will use the old behaviour and
  761. ; re-use the sections from the unmodified shaders.
  762. assemble_signature_comments = 1
  763.  
  764. ; Include raw "undecipherable custom data" when disassembling shaders for
  765. ; ShaderRegex - leaving this out is for backwards compatibility with patterns
  766. ; that may not expect to see it since we didn't used to include it. Shaders
  767. ; dumped via export or hunting always include any undecipherable data.
  768. disassemble_undecipherable_custom_data=0
  769.  
  770. ; Replace constant buffer offsets with indices & components in the comment
  771. ; blocks when disassembling shaders so they match up with how they are accessed
  772. ; in the code, making things easier to follow and simplifying ShaderRegex.
  773. patch_assembly_cb_offsets=0
  774.  
  775. ; Enables more sensible behaviour when including HLSL files from subdirectories
  776. ; that themselves include other files. Also disables backwards compatibility
  777. ; where files could be specified relative to the game's working directory (i.e.
  778. ; use #include "hud.hlsl" instead of #include "ShaderFixes/hud.hlsl"). Requires
  779. ; two config reloads and a cache invalidation for changes to take effect
  780. recursive_include = 1
  781.  
  782. ;------------------------------------------------------------------------------------------------------
  783. ; Analyzation options.
  784. ;
  785. ; save all autofixed shaders as HLSL
  786. export_fixed=0
  787.  
  788. ; save all shaders sent to DX11 as ASM, or as HLSL text files if compiled by game.
  789. export_shaders=0
  790.  
  791. ; save all shaders seen as HLSL code, autofixed or not. 1= HLSL only, 2=HLSL+OriginalASM, 3=HLSL+OriginalASM+RecompiledASM
  792. export_hlsl=0
  793.  
  794. ; stores a ShaderUsage.txt file on any marking button press.
  795. dump_usage=0
  796.  
  797. ;------------------------------------------------------------------------------------------------------
  798. ; Automatic shader fixes. Those settings here apply only on newly read shaders.
  799. ; All existing *_replace.txt or *_replace.bin files are not tampered with.
  800. ; If you change settings here, the best workflow is to delete all shaders in
  801. ; the shader cache directory and let them be fixed again.
  802.  
  803. ; Stereoize all shader parameters with position semantic.
  804. fix_sv_position=0
  805.  
  806. ; Pixel depth evaluation.
  807. ;fix_ZRepair_DepthTexture1=SceneDepthTexture.x
  808. ;fix_ZRepair_Dependencies1=MinZ_MaxZRatio
  809. ;fix_ZRepair_ZPosCalc1=zTex * MinZ_MaxZRatio.z - MinZ_MaxZRatio.w
  810. ;fix_ZRepair_DepthTexture2=SceneDepthTexture.x
  811. ;fix_ZRepair_Dependencies2=
  812. ;fix_ZRepair_ZPosCalc2=zTex
  813. ;fix_ZRepair_PositionTexture=PositionTexture
  814. ;fix_ZRepair_PositionCalc=1024 * %s
  815.  
  816. ; Inject depth texture if other depth sources are unavailable.
  817. ;fix_ZRepair_DepthTextureHash=8a19f087b004598f
  818.  
  819. ; Correct inverse transformations in pixel shaders using evaluated depth.
  820. ;fix_InvTransform=ScreenToLight,InverseTranslatedViewProjectionMatrix
  821.  
  822. ; Back projection coordinate fix.
  823. ;
  824. ; Available variables in expressions:
  825. ; stereoParams.x = Separation value in range [0..1] or [-0..-1] dependent on active eye
  826. ; stereoParams.y = Convergence value in w coordinates (1/z)
  827. ; stereoParams.z = -1/1 for left/right eye
  828. ; stereoParams.w = Separation value without eye separation
  829. ; stereoTune.x = tune value 1 (default is 1)
  830. ; stereoTune.y = tune value 2 (default is 1)
  831. ; stereoTune.z = tune value 3 (default is 1)
  832. ; stereoTune.w = tune value 4 (default is 1)
  833. ; stereoScreenRes.x = Primary swap chain backbuffer horizontal resolution
  834. ; stereoScreenRes.y = Primary swap chain backbuffer vertical resolution
  835. ; zpos = current pixel z position in pixel shader
  836. ; wpos = current pixel w position in pixel shader
  837.  
  838. ; Send inverse transformations from vertex shaders to pixel shaders.
  839. ;fix_BackProjectionTransform1=ScreenToTranslatedWorldMatrix._m00,ScreenToTranslatedWorldMatrix._m02,ScreenToTranslatedWorldMatrix._m01
  840. ;fix_BackProjectionTransform2=ScreenToWorld._m00,ScreenToWorld._m02,ScreenToWorld._m01
  841.  
  842. ; Position variables to correct in pixel shaders.
  843. ;fix_ObjectPosition1=PointPositionAndInverseRadius
  844. ;fix_ObjectPosition1Multiplier=1, (stereoScreenRes.x/stereoScreenRes.y)*0.5, -0.5
  845. ;fix_ObjectPosition2=SpotPositionAndInverseRadius
  846. ;fix_ObjectPosition2Multiplier=1, (stereoScreenRes.x/stereoScreenRes.y)*0.5, -0.5
  847.  
  848. ; Matrix multiplications to correct in pixel shaders.
  849. ;fix_MatrixOperand1=TranslatedWorldToShadowMatrix
  850. ;fix_MatrixOperand1Multiplier=1, (stereoScreenRes.x/stereoScreenRes.y)*0.5 - viewDirection.z*0.05 + (0.02791946-stereoParams.x/stereoParams.w), 0
  851.  
  852. ; autofix shader option: recompiles all vertex shaders. fixes minor differences in deferred rendering.
  853. ;recompile_all_vs=0
  854.  
  855. ;------------------------------------------------------------------------------------------------------
  856. ; Shader manipulations without patches + shader filtering.
  857. ;------------------------------------------------------------------------------------------------------
  858. ;[ShaderOverride1]
  859. ;Hash=69732c4f23cb6c48
  860. ; Custom stereo separation value while rendering objects using this shader.
  861. ;Separation=0
  862. ; Custom stereo convergence value while rendering objects using this
  863. ; shader (e.g. convergence=0 will move an object to infinity).
  864. ;Convergence=0
  865. ; don't draw anything using this shader.
  866. ;Handling=skip
  867. ; Use replaced shader only when there is/is not an active depth buffer (for UI filtering)
  868. ; Deprecated: use 'x = oD' instead, and test for negative zero in the shader with
  869. ; if (asint(IniParams[0].x) == asint(-0.0)) { /* depth inactive */ } else { /* depth active */ }
  870. ;depth_filter = depth_inactive
  871. ;depth_filter = depth_active
  872. ; Override a value from [Constants] when this shader is used:
  873. ;x=2.0
  874. ; Pass the dimensions of the active render target and resolution (obtained with
  875. ; get_resolution_from) into the shader:
  876. ;x1=rt_width
  877. ;y1=rt_height
  878. ;z1=res_width
  879. ;w1=res_height
  880. ; Use t0 from active pixel shader for texture filtering. Will be 0 if no
  881. ; [TextureOverride*] section exists for the texture or 1 if one does. For
  882. ; advanced filtering, set a value for filter_index in the [TextureOverride]
  883. ; section. This also works with other slot types (like o0, oD, ib, etc). Will
  884. ; be -0.0 (needs a special test) if no resource bound in this slot:
  885. ;x2 = ps-t0
  886. ; Match the partner shader (any of vs/hs/ds/gs/ps/cs). Works in much the same
  887. ; way as texture filtering - set a filter_index in the [ShaderOverride] or
  888. ; [ShaderRegex] for the partner shader you want to match and it will be set in
  889. ; this variable, or 1 = ShaderOverride/Regex matched with no filter_index, 0 =
  890. ; No ShaderOverride/Regex matched, -0.0 = No shader bound. The filter_index
  891. ; from a ShaderOverride always takes priority over any matching ShaderRegex.
  892. ;local $partner = vs
  893. ; Override the shader model to allow using newer features like Texture2DMS:
  894. ;model=vs_5_0
  895. ; Activate a preset section when this shader override is in use.
  896. ;preset = PresetExample
  897. ; Enable/disable scissor clipping for this specific shader. This is an alias
  898. ; for "run = BuiltInCustomShaderDisableScissorClipping"
  899. ; or "run = BuiltInCustomShaderEnableScissorClipping"
  900. ;disable_scissor = 1
  901. ; There's also support for copying textures, constant buffers, depth buffers,
  902. ; etc. from one shader to another. This is a complex topic - see this page:
  903. ; https://github.com/bo3b/3Dmigoto/wiki/Resource-Copying
  904.  
  905.  
  906. ;------------------------------------------------------------------------------------------------------
  907. ; On the fly regular expression shader patching engine
  908. ;------------------------------------------------------------------------------------------------------
  909. ;
  910. ; These sections define regular expressions to match against shaders and apply
  911. ; certain classes of fixes on the fly. Only assembly shaders are supported by
  912. ; this method for reliability and performance reasons.
  913. ;
  914. ; Every pattern must have a main section prefixed with ShaderRegex:
  915. ;
  916. ;[ShaderRegex1]
  917. ; shader_model is required and must be set to the types of shaders that this
  918. ; pattern will be applied against. Multiple shader models can be specified to
  919. ; match the pattern against multiple types. There are some differences in
  920. ; instructions between shader model 4 and 5 (such as in resource load
  921. ; instructions), so in some cases you may need separate patterns for each.
  922. ;shader_model = ps_4_0 ps_5_0
  923. ;
  924. ; temps is used to give names to temporary registers that you will use in the
  925. ; pattern. 3DMigoto will identify free register numbers and automatically
  926. ; adjust dcl_temps as required.
  927. ;temps = stereo tmp1
  928. ;
  929. ; This main section also acts as a command list so that you can define actions
  930. ; that will be applied on every matching shader, just as you would on any other
  931. ; command list enabled section, such as ShaderOverride, Present, etc.
  932. ;
  933. ;
  934. ; The next section of interest is the regular expression pattern. If this
  935. ; section is omitted than every shader of with matching shader_model will be
  936. ; matched (and have the command lists and InsertDeclarations processed). The
  937. ; first part of the section name must match the main ShaderRegex section you
  938. ; defined above, and it ends with ".Pattern". The regular expression grammar
  939. ; that we support is PCRE2, which is largely compatible with the powerful Perl
  940. ; and Python grammars. You can find the syntax reference here, but generally
  941. ; speaking any regular expression tutorial will give you a good primer:
  942. ;
  943. ; http://www.pcre.org/current/doc/html/pcre2syntax.html
  944. ;
  945. ; Note that since this is parsed in an ini file that blank lines and ini
  946. ; comments are ignored, and preceding and trailing whitespace from each line
  947. ; will be stripped, so if you need to match an indented line you will need to
  948. ; explicitly match the whitespace at the start of the line with \s*
  949. ; You should also use \n to match the newline character at the end of each
  950. ; line. This should not be confused with extended mode activated by the (?x)
  951. ; switch, which will ignore *all* whitespace to allow complex patterns to be
  952. ; broken up for clarity.
  953. ;
  954. ; Multiline matching is enabled by default, as is case insensitivity (due to
  955. ; differences in the capitalisation produced by different versions of the
  956. ; disassembler), but PCRE2 provides switches for most of these options if you
  957. ; need something else.
  958. ;
  959. ; This is an example of how you might match a matrix multiply in a shader, and
  960. ; uses Python style named capture groups to pull out the registers and swizzles
  961. ; of the X and Z coordinates, and another named capture group to verify that
  962. ; the register used in the div instruction matches the one used in the multiply:
  963. ;
  964. ;[ShaderRegex1.Pattern]
  965. ;mul r\d+\.xyzw, r\d+\.yyyy, cb0\[28\]\.xyzw\n
  966. ;mad r\d+\.xyzw, (?P<pos_x>r\d+)\.(?P<swizzle_x>[xyzw])[xyzw]{3}, cb0\[27\]\.xyzw, r\d+\.xyzw\n
  967. ;mad r\d+\.xyzw, (?P<pos_z>r\d+)\.(?P<swizzle_z>[xyzw])[xyzw]{3}, cb0\[29\]\.xyzw, r\d+\.xyzw\n
  968. ;add (?P<result>r\d+)\.xyzw, r\d+\.xyzw, cb0\[30\]\.xyzw\n
  969. ;div r\d+\.[xyzw]{2}, (?P=result)\.[xyzw]{4}, r\d+\.wwww\n
  970. ;
  971. ;
  972. ; The next section specifies how to modify the matched pattern. Again the name
  973. ; must begin with the same name as the main section, and end in
  974. ; ".Pattern.Replace" (there is a reason the replacement is associated with the
  975. ; pattern, but that's coming soon). You can (and I highly encourage that you
  976. ; do) use named capture groups in the above pattern and substitute them in
  977. ; here. Temporary registers that you defined in the main ShaderRegex section
  978. ; are also available here with the same syntax as named capture groups. Use
  979. ; ${0} to indicate where the matched pattern goes, allowing you to insert code
  980. ; before and/or after it, or use additonal capture groups to insert code in the
  981. ; middle. Extended substitution is enabled in PCRE2, which among other things
  982. ; makes \n insert a newline.
  983. ;
  984. ;[ShaderRegex1.Pattern.Replace]
  985. ;\n
  986. ;// UE4 shadow correction:\n
  987. ;ld_indexable(texture2d)(float,float,float,float) ${stereo}.xyzw, l(0, 0, 0, 0), t125.xyzw\n
  988. ;add ${tmp1}.x, ${pos_z}.${swizzle_z}, -${stereo}.y\n
  989. ;mad ${pos_x}.${swizzle_x}, -${tmp1}.x, ${stereo}.x, ${pos_x}.${swizzle_x}\n
  990. ;\n
  991. ;${0}
  992. ;
  993. ;
  994. ; The final section allows you to insert new declarations into the shader, and
  995. ; 3DMigoto will check that this declaration has not already been inserted
  996. ; first. Typically this is used to get access to StereoParams in t125:
  997. ;
  998. ;[ShaderRegex1.InsertDeclarations]
  999. ;dcl_resource_texture2d (float,float,float,float) t125
  1000.  
  1001.  
  1002. ;------------------------------------------------------------------------------------------------------
  1003. ; texture / render target manipulations
  1004. ;------------------------------------------------------------------------------------------------------
  1005. ;
  1006. ; NOTE: If you are trying to match a texture the same size as the resolution (or
  1007. ; a /2, x2, x4 or x8 multiple), you should confirm that the same hash is used
  1008. ; on different resolutions, and adjust get_resolution_from if necessary.
  1009. ;
  1010. ; NOTE: If you find a texture hash seems to change inconsistently, try enabling
  1011. ; track_texture_updates in the [Rendering] section.
  1012. ;
  1013. ;[TextureOverride1]
  1014. ;Hash=c3e55ebd
  1015. ; NVidia stores surface creation mode heuristics in the game profile. setting
  1016. ; this option overrides the creation mode for a given texture / buffer.
  1017. ; 0 = NVAPI_STEREO_SURFACECREATEMODE_AUTO - use driver registry profile settings.
  1018. ; 1 = NVAPI_STEREO_SURFACECREATEMODE_FORCESTEREO - create stereo surface.
  1019. ; 2 = NVAPI_STEREO_SURFACECREATEMODE_FORCEMONO - create mono surface.
  1020. ;StereoMode=2
  1021.  
  1022. ;[TextureOverride2]
  1023. ;Hash = e27b9d07
  1024. ; Prevent the game reading from this texture - will give the game a blank
  1025. ; buffer instead. Used to prevent CryEngine games falsely culling objects. Use
  1026. ; the frame analysis log and look for MapType:1 to identify possible hashes.
  1027. ;deny_cpu_read=1
  1028. ; Expand the region copied to this texture with CopySubresourceRegion (similar
  1029. ; issue to rasterizer_disable_scissor). Used to solve issues with transparent
  1030. ; refraction effects (like glass) in CryEngine games.
  1031. ;expand_region_copy=1
  1032.  
  1033. ;[TextureOverrideUAVNotRT]
  1034. ; Example of fuzzy matching based on attributes instead of hash. Provides an
  1035. ; alternative to driver heuristics that we have more precise control over.
  1036. ;match_type = Texture2D
  1037. ;match_width = height * 16 / 9
  1038. ;match_height = !res_height
  1039. ;match_msaa = >1
  1040. ;match_bind_flags = +unordered_access -render_target
  1041. ;match_priority = -1
  1042. ;StereoMode = 2
  1043.  
  1044. ;------------------------------------------------------------------------------------------------------
  1045. ; Example of settings override by mouse button configuration
  1046. ; Mapping of from game provided hard coded convergence values to custom values
  1047. ; Those are values for L.A. Noir
  1048. ; Example of settings override by mouse button configuration
  1049. ;------------------------------------------------------------------------------------------------------
  1050. ;[ConvergenceMap]
  1051.  
  1052. ;Map1=from 3e99999a to 0.3
  1053. ;Map2=from 3f800000 to 1.0
  1054. ;Map3=from 3f666666 to 0.9
  1055.  
  1056.  
  1057. ;------------------------------------------------------------------------------------------------------
  1058. ; Updates the game's driver profile on launch.
  1059. ;
  1060. ; Any changes here will require the user to OK a UAC prompt the first time they
  1061. ; run the game, but the DLL tries to only do that if it is actually required.
  1062. ;------------------------------------------------------------------------------------------------------
  1063. [Profile]
  1064. ; This setting should always be added to a profile - it is required for a
  1065. ; number of other settings to work, as well as allowing the convergence to be
  1066. ; saved. If you are customising a profile you should **always uncomment this**:
  1067. StereoProfile = 1
  1068. ;
  1069. ; This setting enables stereo compute shaders (0x00004000), which is required
  1070. ; to fix a lot of "one eye" type rendering issues in many DX11 games, and
  1071. ; allows stereo2mono and the side-by-side / top-and-bottom output modes to work
  1072. ; in SLI (0x00000008):
  1073. ;StereoFlagsDX10 = 0x00004008
  1074. ;
  1075. ; This sets the default convergence in the profile. Note that 3DMigoto will
  1076. ; happily override the default value from the driver, but will only override
  1077. ; the user's custom convergence if it has another reason to update the profile,
  1078. ; such as a change to another setting (adding a version tag to the Comments
  1079. ; setting would be one way to force an update):
  1080. ;StereoConvergence = 0.5
  1081. ;
  1082. ; This changes the green text that the driver displays, and is a good place to
  1083. ; put any reminders to display to the user or just take some credit:
  1084. ;Comments = "Such and such 3D fix by an awesome modder. Disable motion blur!"
  1085. ;
  1086. ; Change the rating: "0": 3D Vision Ready, "1": Excellent, "2": Good,
  1087. ; "3": Fair, "4": Not Recommended
  1088. ;Compat = "0"
  1089. ;
  1090. ; If you have added some comments, you probably want to force the green text to
  1091. ; show up when the game is next run. Note that like convergence, 3DMigoto will
  1092. ; only override a user setting here if something else has also been updated
  1093. ; (such as Comments), so this will usually only show up the first time a user
  1094. ; runs the game after installing the fix (be sure to enable StereoProfile).
  1095. ;StereoMemoEnabled = 1
  1096. ;
  1097. ; Disable compatibility mode to make sure users are seeing the real deal. Like
  1098. ; convergence, 3DMigoto will respect the users custom settings here:
  1099. ;Disable2DD = 1
  1100. ;
  1101. ; Put a reminder in the green text of compatibility mode that they are not
  1102. ; seeing the real deal:
  1103. ;2DD_Notes = "Compatibility mode is enabled. To use the fix, please disable it with Ctrl+Alt+F11"
  1104. ;
  1105. ; These two options change which constant buffers the driver uses to pass the
  1106. ; separation and convergence to any Vertex and Domain shaders it has modified.
  1107. ; The default value is 12, and you may need to change it if the game already
  1108. ; uses that constant buffer for any purpose, which should be apparent as you
  1109. ; will see 2D geometry on any shader that uses this. You should avoid using
  1110. ; these constant buffers yourself unless you understand the nuances involved.
  1111. ;DX10VSCBNumber = 12
  1112. ;DX10DSCBNumber = 12
  1113. ;
  1114. ; Workaround crashes and hangs in games that violate DirectX threading
  1115. ; constraints (e.g. Resident Evil 2/7, Devil May Cry 5). Set to 1 to always
  1116. ; enable workaround or 2 to only enable workaround with 3D Vision:
  1117. APP_COMPAT_SHIM = 1
  1118. ;
  1119. ; If a setting doesn't have a name or you don't know what it is (check the
  1120. ; d3d11_log.txt for the names of all settings in this profile, or use the name
  1121. ; from Nvidia Profile Inspector), you can use the hex ID (in fact, you can even
  1122. ; paste a complete profile from Geforce Profile Manager - just be sure to
  1123. ; delete any corrupt string settings if you do):
  1124. ;0x1033cec2 = 0x00000002
  1125. ;
  1126. ; There are many more options, and we have tried to document them here -
  1127. ; *please* edit this page if you figure out anything new:
  1128. ; http://wiki.bo3b.net/index.php?title=Driver_Profile_Settings
  1129.  
  1130.  
  1131. ;------------------------------------------------------------------------------------------------------
  1132. ; This section defines a shortcut for unbinding all render and depth targets,
  1133. ; which is commonly needed in [CustomShader] sections since all bound render
  1134. ; and depth targets *must* be the same size, and leaving something else bound
  1135. ; is a sure way for things to go weirdly wrong. Call it from any section that
  1136. ; supports a command list with 'run = CommandListUnbindAllRenderTargets' after
  1137. ; you have copied any state you need from these and before binding your own.
  1138. ;------------------------------------------------------------------------------------------------------
  1139. [CommandListUnbindAllRenderTargets]
  1140. run = BuiltInCommandListUnbindAllRenderTargets
  1141.  
  1142. ;------------------------------------------------------------------------------------------------------
  1143. ; Commands to run from the Present call at the start/end of each frame
  1144. ;
  1145. ; Useful to clear custom resources or ini params at the start of each frame, or
  1146. ; to run a custom shader to do whatever you can dream up. The post keyword will
  1147. ; make an action run at the start of a frame instead of the end - as general
  1148. ; guideline you want overlays drawn at the end of a frame and resources cleared
  1149. ; at the start of a new frame.
  1150. ;------------------------------------------------------------------------------------------------------
  1151. [Present]
  1152. ; Example: Clear an ini param at the start of each frame:
  1153. ;post x = 0
  1154. ; Example: Undefine a custom resource until something is copied into it:
  1155. ;post ResourceDepthBuffer = null
  1156. ; Example: Clear a custom resource with black/zero at the start of each frame
  1157. ; (beware that driver bugs may mean only one eye is cleared in some cases):
  1158. ;post clear = ResourceFoo
  1159.  
  1160. ; If you are looking for CustomShader3DVision2SBS, CustomShaderSoftwareMouse or
  1161. ; CustomShaderUpscale, these are now enabled in the [Include] section at the
  1162. ; top of this file instead. The other options related to these are still in
  1163. ; the same place.
  1164.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement