3Dmigoto now open-source...
  92 / 143    
[quote="masterotaku"][quote="lefuneste"]how do I fix the cb0[] calls ? [/quote] Copy it from another shader if it's available. If not, try copying this above "void main": [code] cbuffer cb0 : register(b0) { float4 cb0[121]; } [/code] If 121 is a too high value, try 96 or something, but it has to be at least one number higher than the highest cb0 use in the shader (IIRC). I think you won't have this problem in ASM anyway, unless you absolutely need/want to use the HLSL code.[/quote] No, that approach won't work here. The shader HLSL is fairly busted for this output. Normally it will replace every cb0[] entry with the proper name from the header of the file. This is the main advantage of the HLSL code. In this case, it looks like the Decompiler went off the rails for some reason, and left them all cb0 format. I don't see any easy way to fix that manually, so best bet is to use ASM for this shader.
masterotaku said:
lefuneste said:how do I fix the cb0[] calls ?


Copy it from another shader if it's available. If not, try copying this above "void main":

cbuffer cb0 : register(b0)
{
float4 cb0[121];
}


If 121 is a too high value, try 96 or something, but it has to be at least one number higher than the highest cb0 use in the shader (IIRC).


I think you won't have this problem in ASM anyway, unless you absolutely need/want to use the HLSL code.

No, that approach won't work here. The shader HLSL is fairly busted for this output. Normally it will replace every cb0[] entry with the proper name from the header of the file. This is the main advantage of the HLSL code.

In this case, it looks like the Decompiler went off the rails for some reason, and left them all cb0 format.


I don't see any easy way to fix that manually, so best bet is to use ASM for this shader.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 06/19/2017 12:24 AM   
Thanks for your answer, but I have a stupid question: I didn't know that ASM shader can be used, I though that only HLSL shaders were working in 3dmigoto. Should I comment the HLSL part and uncomment the ASM part in the replace.txt file in order to use it ?
Thanks for your answer, but I have a stupid question: I didn't know that ASM shader can be used, I though that only HLSL shaders were working in 3dmigoto.
Should I comment the HLSL part and uncomment the ASM part in the replace.txt file in order to use it ?

Posted 06/19/2017 08:34 PM   
[quote="lefuneste"]Thanks for your answer, but I have a stupid question: I didn't know that ASM shader can be used, I though that only HLSL shaders were working in 3dmigoto. Should I comment the HLSL part and uncomment the ASM part in the replace.txt file in order to use it ?[/quote] In versions of 3Dmigoto for about the last 9 months, you can also now use ASM source files. I hooked up Flugan's assembler, and DarkStarSword debugged the problems with it to make it mostly functional. It still has some hostile behavior, no error checking, no error reporting, and can generate bogus files without notification. So if you get bad results you might need to tweak things in your text. The gotchas that relate to HelixMod also relate to Flugan's assembler. Best way to use it, is to generate the ASM files directly, using the export_shaders=1, which will generate ShaderCache ASM versions. Hex hash code will be the same, but file name is different. We hooked it up for scenarios like this where the HLSL is too broken or cannot be hand-fixed. It's also worth noting that ASM fixed files will be more accurate in terms of their processing. In HLSL some variables get converted to float and back to int, and there can be errors introduced in some conversions. Because of that, for some things, DarkStarSword prefers to use ASM. You use it the same way, just drop the ASM file into the ShaderFixes, and it will be automatically picked up and replace the game version with the assembled code. Start with a clean file, no changes, and make sure it's all working first, before adding changes. Look at some of DarkStarSword's usages to get examples of how to use it.
lefuneste said:Thanks for your answer, but I have a stupid question: I didn't know that ASM shader can be used, I though that only HLSL shaders were working in 3dmigoto.
Should I comment the HLSL part and uncomment the ASM part in the replace.txt file in order to use it ?

In versions of 3Dmigoto for about the last 9 months, you can also now use ASM source files. I hooked up Flugan's assembler, and DarkStarSword debugged the problems with it to make it mostly functional.

It still has some hostile behavior, no error checking, no error reporting, and can generate bogus files without notification. So if you get bad results you might need to tweak things in your text. The gotchas that relate to HelixMod also relate to Flugan's assembler.

Best way to use it, is to generate the ASM files directly, using the export_shaders=1, which will generate ShaderCache ASM versions. Hex hash code will be the same, but file name is different.

We hooked it up for scenarios like this where the HLSL is too broken or cannot be hand-fixed.

It's also worth noting that ASM fixed files will be more accurate in terms of their processing. In HLSL some variables get converted to float and back to int, and there can be errors introduced in some conversions. Because of that, for some things, DarkStarSword prefers to use ASM.


You use it the same way, just drop the ASM file into the ShaderFixes, and it will be automatically picked up and replace the game version with the assembled code.

Start with a clean file, no changes, and make sure it's all working first, before adding changes.

Look at some of DarkStarSword's usages to get examples of how to use it.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 06/19/2017 09:27 PM   
I'm trying to fix Hollow Knight (I bought it today) with the Unity scripts. All were extracted, fixed (in theory, using the cmd_Decompiler.exe and its d3dcompiler_46.dll) and automatically placed in ShaderFixes. Also d3dx.ini got updated. However, every time I boot the game I get LOTS of errors and boops. I guess it's because of this type of warnings: [code] [ShaderOverride_1f65e0def573c0b9] Hash=1f65e0def573c0b9 WARNING: Unrecognised entry: ps-cb11=resource_unityperdraw WARNING: Unrecognised entry: resource_cameradepthtexture=ps-t0 WARNING: Unrecognised entry: resource_unitypercamera=ps-cb1 [/code] Does anyone know about that error? I have to go to bed now :(.
I'm trying to fix Hollow Knight (I bought it today) with the Unity scripts. All were extracted, fixed (in theory, using the cmd_Decompiler.exe and its d3dcompiler_46.dll) and automatically placed in ShaderFixes. Also d3dx.ini got updated.

However, every time I boot the game I get LOTS of errors and boops.

I guess it's because of this type of warnings:

[ShaderOverride_1f65e0def573c0b9]
Hash=1f65e0def573c0b9
WARNING: Unrecognised entry: ps-cb11=resource_unityperdraw
WARNING: Unrecognised entry: resource_cameradepthtexture=ps-t0
WARNING: Unrecognised entry: resource_unitypercamera=ps-cb1


Does anyone know about that error? I have to go to bed now :(.

CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: MSI GeForce RTX 2080Ti Gaming X Trio
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com

Posted 06/20/2017 10:17 PM   
@masterotaku, post the d3dx.ini. I think is the same issue in the .ini than Yooka-Laylee: [url]https://forums.geforce.com/default/topic/1003407/3d-vision/yooka-laylee/post/5127923/#5127923[/url]
@masterotaku, post the d3dx.ini.
I think is the same issue in the .ini than Yooka-Laylee: https://forums.geforce.com/default/topic/1003407/3d-vision/yooka-laylee/post/5127923/#5127923

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

Like my fixes? you can donate to Paypal: dhr.donation@gmail.com

Posted 06/20/2017 11:17 PM   
After writing this manually, I don't get boop errors: [code] ; Custom resource declarations [Resource_UnityPerCameraRare] max_copies_per_frame = 1 [Resource_CameraDepthTexture] max_copies_per_frame = 1 [Resource_UnityPerCamera] max_copies_per_frame = 1 [Resource_UnityPerDraw] max_copies_per_frame = 1 [/code] Here is the ini anyway: [code] ;------------------------------------------------------------------------------------------------------ ; Logging options. ; Comment line or set value to 0 for no logging. ;------------------------------------------------------------------------------------------------------ [Logging] ; Log all API usage calls=1 ; 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=1 ; Log NVAPI separation modifications separation=1 ; ------------------------------------------------------------------------------------------------------ ; Default constants to pass directly to shaders as IniParams ; ------------------------------------------------------------------------------------------------------ [Constants] ; x = 0.8 ; y = 1.0 ; z = 1.2 ; w = 2.0 ; x7 is used by the 3DVision2SBS custom shader. To use, find the [Present] ; section below and uncomment the 'run = CustomShader3DVision2SBS' line. ; 0 = Regular 3D Vision ; 1 = Reversed 3D Vision ; 2 = Side by Side ; 3 = Reversed Side by Side ; 4 = Top and Bottom ; 5 = Reversed Top and Bottom x7 = 0 ;------------------------------------------------------------------------------------------------------ ; Custom settings override for any of [convergence, separation, x, y, z, w] ; ; Four types are supported - by default the bindings will simply load the ; configured settings, but type=hold can be specified to have a preset ; active while the button is held, type=toggle can be used to make a simple ; on/off toggle, and type=cycle can be used to cycle between several presets. ; ; Delays (type=hold only) and linear or cosine trasition periods (any key type) ; can be used to better synchonrise setting changes to the game's animations, ; or to smoothly adjust UI elements over a short period of time. ; ; 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 ; ; Key combinations can be specified by separating key names with spaces, e.g. ; "Shift Q". It is also possible to indicate that a key must *not* be held for ; the binding to activate, e.g. "NO_ALT F1" would prevent the binding from ; activating when taking a 3D Screenshot with Alt F1. "NO_MODIFIERS" may be ; used as a shorthand for excluding all standard modifiers (Ctrl, Alt, Shift, ; Windows). ; ; Keys can also be from XBox controllers using: ; XB_LEFT_TRIGGER, XB_RIGHT_TRIGGER, ; XB_LEFT_SHOULDER, XB_RIGHT_SHOULDER, ; XB_LEFT_THUMB, XB_RIGHT_THUMB, ; XB_DPAD_UP, XB_DPAD_DOWN, XB_DPAD_LEFT, XB_DPAD_RIGHT, ; XB_A, XB_B, XB_X, XB_Y, XB_START, XB_BACK, XB_GUIDE ; By default all attached controllers are used - to associate a binding with a ; specific controller add the controller number 1-4 to the prefix, like ; XB2_LEFT_TRIGGER, though this may be more useful for hunting than playing. ;------------------------------------------------------------------------------------------------------ ; Example for changing default settings ;[Key1] ;Key = z ;separation = 100.0 ;convergence = 4.0 ;x = 0.98 ; Example to support momentary hold type overrides, like aiming. ;[Key2] ;Key = RBUTTON ;convergence = 0.1 ;type = hold ; Example for a toggle override. ;[Key3] ;Key = q ;separation = 0.1 ;type = toggle ;y = 0.0 ; Example for a momentary hold, but with a delay followed by a smooth ; transition (ms) on hold and release to sync better with the game. Note that ; delay only works with type=hold (for now), while transitions will work with ; all types. ;[Key4] ;Key = XB_LEFT_TRIGGER ;type = hold ;y = 0.25 ;delay = 100 ;transition = 100 ;transition_type = linear ;release_delay = 0 ;release_transition = 500 ;release_transition_type = cosine ; Example of a cycle transition that might be used to provide several presets ; that set both convergence and UI depth to suit different scenes in a game. ; Cosine transitions are used to smooth the changes over 1/10 of a second. ;[Key5] ;Key = Q ;type = cycle ;convergence = 1.45, 1.13, 0.98 ;z = 0.25, 0.5, 0.75 ;transition = 100 ;transition_type = cosine [Key1] Key = F1 type = cycle convergence = 15, 24, 0 transition = 150 transition_type = cosine ;------------------------------------------------------------------------------------------------------ ; Shader hunting options. ; Default setup is to use keyboard similar to Helix presets ;------------------------------------------------------------------------------------------------------ [Hunting] ; 0: Release mode is with shader hunting disabled, optimized for speed. ; 1: Hunting mode enabled ; 2: Hunting mode "soft disabled" - can be turned on via the toggle_hunting key hunting=2 ; 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. ; "pink" = make the output hot pink to make it standout. ; "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 ; ; XBox controllers are supported using the same bindings as the [Key] sections ; (see above). If the game already uses the first controller you might try ; using the second controller for hunting with e.g. XB2_LEFT_SHOULDER ; rotate through all VISIBLE pixel shaders at the current scene. previous_pixelshader = no_modifiers VK_NUMPAD1 next_pixelshader = no_modifiers VK_NUMPAD2 mark_pixelshader = no_modifiers VK_NUMPAD3 ; rotate through all VISIBLE vertex shaders at the current scene. previous_vertexshader = no_modifiers VK_NUMPAD4 next_vertexshader = no_modifiers VK_NUMPAD5 mark_vertexshader = no_modifiers VK_NUMPAD6 ; rotate through all USED index buffers at the current scene. previous_indexbuffer = no_modifiers VK_NUMPAD7 next_indexbuffer = no_modifiers VK_NUMPAD8 mark_indexbuffer = no_modifiers VK_NUMPAD9 ; rotate through all USED render targets at the current scene. previous_rendertarget = no_modifiers VK_DIVIDE next_rendertarget = no_modifiers VK_MULTIPLY mark_rendertarget = no_modifiers VK_SUBTRACT ; rotate through all VISIBLE geometry shaders at the current scene. ; This is disabled since these keys are commonly pressed while alt+tabbed out ;previous_geometryshader = no_modifiers < ;next_geometryshader = no_modifiers > ;mark_geometryshader = no_modifiers / ; rotate through all VISIBLE domain shaders at the current scene. ; This is disabled since these keys are commonly pressed while alt+tabbed out ;previous_domainshader = no_modifiers [ ;next_domainshader = no_modifiers ] ;mark_domainshader = no_modifiers \ ; rotate through all VISIBLE hull shaders at the current scene. ; This is disabled only because it is rarely needed ;previous_hullshader = no_modifiers MINUS ;next_hullshader = no_modifiers EQUALS ;mark_hullshader = no_modifiers BACKSPACE ; rotate through all USED compute shaders at the current scene. ; Disabling compute shaders may cause crashes, so these are ; not enabled by default: ;previous_computeshader = no_modifiers PAGE_UP ;next_computeshader = no_modifiers PAGE_DOWN ;mark_computeshader = no_modifiers HOME ; Re-enable shaders once done with hunting: done_hunting = no_modifiers VK_ADD ; Screenshot as pns take_screenshot = no_modifiers VK_SNAPSHOT ; reload all fixes from ShaderFixes folder reload_fixes = no_modifiers VK_F10 ; Key to turn hunting itself on/off. This will also show/hide overlay. ; Hunting must be set to either 1 or 2 to enable this toggle. toggle_hunting = no_modifiers VK_NUMPAD0 ; Key to reload the settings from the the d3dx.ini without restarting. This can ; be the same key as reload_fixes for convenience, or a different key may be ; used to avoid resetting the ini parameters every time the shaders are ; reloaded. Note that not all settings can be reloaded, so if something doesn't ; work as expected you may still have to restart the game: reload_config = no_modifiers VK_F10 ; Hold this key to temporarily disable the fix - useful to quickly check what ; an effect looked like in the original game. show_original = no_modifiers VK_F9 ; snapshots to be made upon any shader Mark. These give you snapshot when the ; shader is disabled, as a way to correlate image to shader hash. ; mark_snapshot=0 // none ; mark_snapshot=1 // mono, simple snapshot ; mark_snapshot=2 // stereo snapshot mark_snapshot=2 ; Auto-repeat key rate in events per second. repeat_rate=6 ; 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 ;tune_enable=1 ;tune_step=0.1 ;tune1_up=VK_INSERT ;tune1_down=VK_DELETE ;tune2_up=X ;tune2_down=Z ; Dumps out the contents of each render target after every immediate draw call ; for the next frame. Takes up a large amount of space, so disabled by default. ;analyse_frame = no_modifiers VK_F8 ; Specifies options for the frame analysis feature. Options can be combined by ; separating them with a space. ; log: Log draw calls and state changes (one log file per context) ; hold: Continue analysing subsequent frames while the key is held ; dump_rt_jps: Dumps out render targets as JPS files. These are the easiest to ; work with and don't take up as much space as DDS files, but they ; are not dumped for every render target and are missing some data. ; dump_rt_dds: Dumps out render targets as DDS files. WARNING: This option may ; require hundreds of gigabytes and a long time! Only use it if ; you absolutely need more information than you can get otherwise. ; Will also dump buffer type render targets & UAVs as .buf files. ; dump_rt: Dumps render targets as JPS files when possible, or DDS when not. ; clear_rt: Clears each render target the first time they are used in the ; frame. Makes it easier to see what is being drawn if the game ; doesn't clear them, but might cause some effects not to render. ; dump_depth: Dumps depth/stencil targets as DDS files ; dump_tex_jps: Dumps textures as JPS files ; dump_tex_dds: Dumps textures as DDS files (Same warning as for dump_rt_dds) ; Will also dump buffer type shader resource views as .buf files. ; dump_tex: Dumps textures as JPS files when possible, or DDS when not. ; dump_cb: Dumps constant buffers as binary .buf files ; dump_cb_txt: Decodes constant buffers as an array of float4s ; dump_vb: Dumps vertex buffers as binary .buf files ; dump_vb_txt: Decodes vertex buffers as an array of float4s ; dump_ib: Dumps index buffers as binary .buf files ; dump_ib_txt: Decodes index buffers ; filename_reg: Normally the draw number is the first part of the filename so ; that the files will be sorted in the order they were used in ; the game. Sometimes it is more desirable to examine how a ; specific output changed through the frame and this option will ; place the register number first in the filename to allow that. ; mono: Dump out mono textures instead of stereo. To dump both, specify ; 'mono stereo'. If neither are specified, defaults to stereo. ;dump_on_unmap: Dumps buffers/textures whenever the game maps them to the CPU ; with the Map() / Unmap() calls. Typically used to update ; constant buffers. ; analyse_options can also be specified in [ShaderOverride*] and ; [TextureOverride*] sections to set up triggers to change the options mid-way ; through a frame analysis, either for a single draw call (default), or ; permanently (by adding the 'persist' keyword). analyse_options = log dump_rt_jps clear_rt ;------------------------------------------------------------------------------------------------------ ; Chain load other wrapper DLLs instead of system DLLs. ;------------------------------------------------------------------------------------------------------ [System] ;proxy_d3d9=d3d9_helix.dll ;proxy_d3d11=d3d11_helix.dll ; Options to use hooking instead of wrapping. Used in MGSV. Possible objects to hook include: ; deferred_contexts ; immediate_context ; device ; all - all of the above ; crash/hang workarounds: ; except_set_shader_resources - work around crash on Win 7 with evil update ; except_set_samplers - work around crash on Win 10 ; except_set_rasterizer_state - work around crash on Win 7 without evil update ; skip_dxgi_factory - hack for MGSV, not recommended for other games as it ; may disable core 3DMigoto functionality in some cases ; skip_dxgi_device - hack for MGSV on Win10 anniversary update ; recommended - hook supported objects, safe workarounds enabled, skips not enabled ;hook=recommended ; Options to allow IDXGIFactory2 to be created and wrapped. We have typically had good ; luck with returning an error for all non-dx11 requests, but some games error out ; with these checks in place. ; The allow_create_device allows D3D10 Device creation and is needed for some games. ; It has two options, allow_create_device=1, which will allow anything to go through ; without returning an error, and allow_create_device=2, which will force all requests ; to become D3D11 Devices, no matter what was passed in. ; The allow_platform_update option allows the D3D11Device1 and D3D11Context1 ; interfaces introduced in Windows 8 and the platform update of Windows 7. ; ; Start with allow_check_interfaces, if that doesn't work then try allow_dxgi1_2, ; then try allow_create_device=2, lastly try allow_create_device=1 ; ; Setting allow_dxgi1_2=2 may allow the Steam Overlay and Steam Controller to ; work in some games on Windows 7 and Windows 8, but could potentially disable ; core functionality in some cases, so only enable it if you need it. ; allow_check_interface=0 allow_dxgi1_2=0 allow_create_device=2 allow_platform_update=0 ;------------------------------------------------------------------------------------------------------ ; 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 ; full_screen=1 forces creation of full screen devices and swap chains. ; use this for 3dtvplay if game won't active stereo mode. ; full_screen=2 will also disable SetWindowPos which might help in some games. full_screen=0 ; This toggles forcing the full screen mode on and off. It will not take effect ; immediately, but will change what happens the next time the game tries to ; change the fullscreen mode. This is a specific hack to workaround a bug in ; Unity games, which crash when alt+tabbing out from exclusive mode fullscreen. ; ; To switch out of a Unity game without it crashing: ; Enable this option, Press F7, Alt+Enter, Alt+Tab ;toggle_full_screen = no_modifiers VK_F7 ; some games explicitely disable stereo, prohibiting any stereo attempts. ; Setting this to 1 ignores all stereo disabling calls and also calls ; NvAPI_Stereo_Enable to force stereo on. ; Setting this to 2 sets 3Dmigoto to use 3D Vision Direct Mode force_stereo=0 ; almost all DX11 games deactivate window message handling. ; setting this to 1 reenables print screen handling, alt-tab key handling etc. ;allow_windowcommands=1 ; Indicates where the resolution is obtained for texture hashes. Comment this ; out to never special case hashes that match the resolution or a multiple. ; Possible values are swap_chain and depth_stencil. Recommended to test which ; works for a given game (e.g. CryEngine always creates a swap chain that ; matches the native resolution so has to use depth_stencil). get_resolution_from = swap_chain ;------------------------------------------------------------------------------------------------------ ; 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. ; This also forces 'false' as a return for any request for NvAPI_Stereo_IsEnabled. automatic_mode=0 ; Some games (CryEngine games, for example) lock the separation & convergence ; to a specific value, which can be undesirable. Set this to 1 to ignore these ; requests from the game to unlock the separation: unlock_separation=0 unlock_convergence=0 ; games without predefined profiles can't save stereo settings. ; enabling this options automatically creates a profile for unknown games. ; Note that there is now a more flexible means to alter the game's profile - ; refer to the [Profile] section. 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 ; Force the NvAPI_Initialize to return an error so that games think stereo and NVidia is unavailable. force_no_nvapi=0 ;------------------------------------------------------------------------------------------------------ ; Settings for GPU manipulations. ; Render settings override ;------------------------------------------------------------------------------------------------------ [Rendering] ; GPU program manipulations. ; Type of shader hashes in use: ; 3dmigoto = Traditional hash used by 3DMigoto (unseeded software FNV-1) ; embedded = Use the first half of the MD5-like hash embedded within the ; shaders to skip the hash calculation altogether. ; bytecode = Only hash bytecode and signatures with hardware accelerated ; CRC32C. Used to minimise duplicate shaders in certain games, but ; potentially carries a higher risk of hash collisions between ; unrelated shaders in some games (e.g. that only differ in ; variable names). May occasionally avoid hash changes on game ; updates due to changes in the game developer's build environment ; (shader compiler version, build path embedded in debug info, ; constants renamed, etc). Will not avoid hash changes if the ; shader code, constant values, etc are changed. shader_hash = 3dmigoto ; 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=0 ; thread save data structure access. required on multithreaded rendering. use_criticalsection=1 ; Setting this option disables scissor limits rasterizer_disable_scissor=1 ; Tracks copies and updates to textures which may cause their hash to become ; out of sync with their contents - enable if texture hashes seem unreliable: ;track_texture_updates=1 ; Registers where the StereoParams and IniParams textures will be assigned - ; change if the game already uses these registers. Newly decompiled shaders ; will use the new registers, but existing shaders will not be updated - best ; workflow is to remove ShaderCache after changing these and run a search and ; replace on all shaders in ShaderFixes. Set to -1 to disable if not required. stereo_params = 125 ini_params = 120 ;------------------------------------------------------------------------------------------------------ ; 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=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 manipulations without patches + shader filtering. ;------------------------------------------------------------------------------------------------------ ;[ShaderOverride1] ;Hash=69732c4f23cb6c48 ; Custom stereo separation value while rendering objects using this shader. ;Separation=0 ; Custom stereo convergence value while rendering objects using this ; shader (e.g. convergence=0 will move an object to infinity). ;Convergence=0 ; don't draw anything using this shader. ;Handling=skip ; advanced option: use this to override only if this shader is used rendering the given index buffer. ;IndexBufferFilter=b3e56ebc ; Use replaced shader only when there is no active depth buffer (for UI filtering) ;depth_filter = depth_inactive ; Use replaced shader only when there *IS* an active depth buffer (for UI filtering) ;depth_filter = depth_active ; Only use replaced shader when it is used in conjunction with a specific shader ; (e.g. to adjust a vertex shader ONLY when it is used with a specific pixel shader) ;partner=af7b880f07630615 ; Override a value from [Constants] when this shader is used: ;x=2.0 ; Pass the dimensions of the active render target and resolution (obtained with ; get_resolution_from) into the shader: ;x1=rt_width ;y1=rt_height ;z1=res_width ;w1=res_height ; Use t0 from active pixel shader for texture filtering. Will be 0 if no ; [TextureOverride*] section exists for the texture or 1 if one does. For advanced ; filtering, set a value for filter_index in the [TextureOverride] section. ;x2=ps-t0 ; Override the shader model to allow using newer features like Texture2DMS: ;model=vs_5_0 ; There's also support for copying textures, constant buffers, depth buffers, ; etc. from one shader to another. This is a complex topic - see this page: ; https://github.com/bo3b/3Dmigoto/wiki/Resource-Copying ;------------------------------------------------------------------------------------------------------ ; texture / render target manipulations ;------------------------------------------------------------------------------------------------------ ; ; NOTE: If you are trying to match a texture the same size as the resolution (or ; a /2, x2, x4 or x8 multiple), you should confirm that the same hash is used ; on different resolutions, and adjust get_resolution_from if necessary. ; ; NOTE: If you find a texture hash seems to change inconsistently, try enabling ; track_texture_updates in the [Rendering] section. ; ;[TextureOverride1] ;Hash=c3e55ebd ; 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 ;[TextureOverride2] ;Hash = e27b9d07 ; Prevent the game reading from this texture - will give the game a blank ; buffer instead. Used to prevent CryEngine games falsely culling objects. Use ; debug logging and look for Map calls to identify possible hashes. ;deny_cpu_read=1 ; Expand the region copied to this texture with CopySubresourceRegion (similar ; issue to rasterizer_disable_scissor). Used to solve issues with transparent ; refraction effects (like glass) in CryEngine games. ;expand_region_copy=1 ;------------------------------------------------------------------------------------------------------ ; 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 ;------------------------------------------------------------------------------------------------------ ; Updates the game's driver profile on launch. ; ; Any changes here will require the user to OK a UAC prompt the first time they ; run the game, but the DLL tries to only do that if it is actually required. ;------------------------------------------------------------------------------------------------------ [Profile] ; This setting should always be added to a profile - it is required for a ; number of other settings to work, as well as allowing the convergence to be ; saved. If you are customising a profile you should **always uncomment this**: ;StereoProfile = 1 ; ; This setting enables stereo compute shaders, which is requires to fix a lot ; of "one eye" type rendering issues in many DX11 games: ;StereoFlagsDX10 = 0x00004000 ; ; This sets the default convergence in the profile. Note that 3DMigoto will ; happily override the default value from the driver, but will only override ; the user's custom convergence if it has another reason to update the profile, ; such as a change to another setting (adding a version tag to the Comments ; setting would be one way to force an update): ;StereoConvergence = 0.5 ; ; This changes the green text that the driver displays, and is a good place to ; put any reminders to display to the user or just take some credit: ;Comments = "Such and such 3D fix by an awesome modder. Disable motion blur!" ; ; Change the rating: "0": 3D Vision Ready, "1": Excellent, "2": Good, ; "3": Fair, "4": Not Recommended ;Compat = "0" ; ; If you have added some comments, you probably want to force the green text to ; show up when the game is next run. Note that like convergence, 3DMigoto will ; only override a user setting here if something else has also been updated ; (such as Comments), so this will usually only show up the first time a user ; runs the game after installing the fix (be sure to enable StereoProfile). ;StereoMemoEnabled = 1 ; ; Disable compatibility mode to make sure users are seeing the real deal. Like ; convergence, 3DMigoto will respect the users custom settings here: ;Disable2DD = 1 ; ; Put a reminder in the green text of compatibility mode that they are not ; seeing the real deal: ;2DD_Notes = "Compatibility mode is enabled. To use the fix, please disable it with Ctrl+Alt+F11" ; ; These two options change which constant buffers the driver uses to pass the ; separation and convergence to any Vertex and Domain shaders it has modified. ; The default value is 12, and you may need to change it if the game already ; uses that constant buffer for any purpose, which should be apparent as you ; will see 2D geometry on any shader that uses this. You should avoid using ; these constant buffers yourself unless you understand the nuances involved. ;DX10VSCBNumber = 12 ;DX10DSCBNumber = 12 ; ; If a setting doesn't have a name or you don't know what it is (check the ; d3d11_log.txt for the names of all settings in this profile), you can use the ; hex ID (in fact, you can even paste a complete profile from Geforce Profile ; Manager - just be sure to delete any corrupt string settings if you do): ;0x1033cec2 = 0x00000002 ; ; There are many more options, and we have tried to document them here - ; *please* edit this page if you figure out anything new: ; http://wiki.bo3b.net/index.php?title=Driver_Profile_Settings ;------------------------------------------------------------------------------------------------------ ; Commands to run from the Present call at the start/end of each frame ; ; Useful to clear custom resources or ini params at the start of each frame, or ; to run a custom shader to do whatever you can dream up. ;------------------------------------------------------------------------------------------------------ ;;;;;;;;;;;;;;;;;;;;;;; DARKSTARSWORD'S UNITY 5 TEMPLATE ;;;;;;;;;;;;;;;;;;;;;;; ; Custom resource declarations [Resource_UnityPerCameraRare] max_copies_per_frame = 1 [Resource_CameraDepthTexture] max_copies_per_frame = 1 [Resource_UnityPerCamera] max_copies_per_frame = 1 [Resource_UnityPerDraw] max_copies_per_frame = 1 [Present] ; Clear an ini param at the start of each frame: ;x = 0 ; Clear a custom resource at the start of each frame: ;ResourceDepthBuffer = null ; Uncomment to enable a custom shader that allows the stereo output mode to be ; changed to Side-by-Side or Top-and-Bottom: ;run = CustomShader3DVision2SBS ; The following custom shader can convert 3D Vision to Side-by-Side and ; Top-and-Bottom for use with 3D TVs & projectors - to enable this uncomment ; the 'run = CustomShader3DVision2SBS' in the [Present] section, set 3D Vision ; to output "checkerboard" in the control panel (which will remove the 720p ; limitation) and enable this either via the F11 key, or by setting a default ; for x7 in the [Constants] section. [Resource3DVision2SBSBackupTexture] [CustomShader3DVision2SBS] ; Load a custom vertex + pixel shader: vs = ShaderFixes/3dvision2sbsvs.hlsl ps = ShaderFixes/3dvision2sbsps.hlsl ; Explicitly unbind other shader types for safety: hs = null ds = null gs = null ; Disable the OM blend stage that could interfere with the shader: blend = disable ; Disable front/back face culling so the vertices can be in any rotation: cull = none ; Use a triangle strip topology so we only have to output four vertices: topology = triangle_strip ; Clear all render + depth targets to avoid compatibility issues: o1 = null o2 = null o3 = null o4 = null o5 = null o6 = null o7 = null oD = null ; Bind the back buffer as a render target. set_viewport ensures that the view ; port is the size of the buffer so the draw call will work, and no_view_cache ; is necessary for a few games like Mad Max: o0 = set_viewport no_view_cache bb ; Back up any textures that were in the ps-t100 slot. The CustomResource ; section will already back up a lot of state, including shaders, render ; targets, depth targets, UAVs, viewports, blend state, rasterizer state, ; primitive topology, etc. but it does not back up textures: Resource3DVision2SBSBackupTexture = reference ps-t100 ; Use the reverse stereo blit to give the shader access to the back buffers of ; both eyes: ps-t100 = stereo2mono bb ; Some rare games (e.g. Onechanbara Z2) use MSAA back buffers, which cannot be ; directly used with the reverse stereo blit and must be resolved to non MSAA ; versions first. The symptoms will be a black screen after enabling this ; shader with F11. In that case, replace the above line with these two: ; ps-t100 = resolve_msaa bb ; ps-t100 = stereo2mono ps-t100 ; Some games such as The Evil Within and Akiba's Trip constantly unbind ; StereoParams & IniParams, so we may need to explicitly rebind them now: ;vs-t125 = StereoParams ;ps-t125 = StereoParams ;vs-t120 = IniParams ;ps-t120 = IniParams ; Draw four vertices. The vertex shader will construct coordinates to cover the ; full screen using the SV_VertexID semantic so we don't need vertex buffers: draw = 4, 0 ; Restore the original texture from the ps-t100 slot: post ps-t100 = reference Resource3DVision2SBSBackupTexture [KeyChange3DVision2SBSOutputMode] key = no_modifiers F11 ; 0 = Regular 3D Vision ; 1 = Reversed 3D Vision ; 2 = Side by Side ; 3 = Reversed Side by Side ; 4 = Top and Bottom ; 5 = Reversed Top and Bottom x7 = 1, 2, 3, 4, 5, 0 type = cycle [ShaderOverride_027c750fde1237f5] hash = 027c750fde1237f5 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_031724f430585844] hash = 031724f430585844 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_03d609089e8eabe4] hash = 03d609089e8eabe4 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_0cd464e442e51c0f] hash = 0cd464e442e51c0f ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_0d229bee69d6470f] hash = 0d229bee69d6470f ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_0edea0a4ce26b174] hash = 0edea0a4ce26b174 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_110849b760e2b107] hash = 110849b760e2b107 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_122f65f79cbb91e1] hash = 122f65f79cbb91e1 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_195e27dcd6d7d930] hash = 195e27dcd6d7d930 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_1cc9073922e40eeb] hash = 1cc9073922e40eeb ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_1f65e0def573c0b9] hash = 1f65e0def573c0b9 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_2034c02a27280552] hash = 2034c02a27280552 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_2706e2cc559ea251] hash = 2706e2cc559ea251 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_2eda8c28edad82db] hash = 2eda8c28edad82db ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_30513bcde58c1034] hash = 30513bcde58c1034 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_3067e397789403d2] hash = 3067e397789403d2 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_386557ba47e92e89] hash = 386557ba47e92e89 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_3dee4f96241dd225] hash = 3dee4f96241dd225 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_4346efe5bd28e52c] hash = 4346efe5bd28e52c ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_4451b6e66342ab1f] hash = 4451b6e66342ab1f ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_456743a20b192c85] hash = 456743a20b192c85 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_5193738aa357fc3f] hash = 5193738aa357fc3f ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_523203724091dbed] hash = 523203724091dbed ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_585869ca6f749821] hash = 585869ca6f749821 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_5b92f11d9ec7fdcb] hash = 5b92f11d9ec7fdcb ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_5c2fac887bc320f6] hash = 5c2fac887bc320f6 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_5d18d6d6cd61186b] hash = 5d18d6d6cd61186b ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_6788a8ca46b4d645] hash = 6788a8ca46b4d645 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_6e329f5ba52b2fd4] hash = 6e329f5ba52b2fd4 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_6fdd041fb8585f77] hash = 6fdd041fb8585f77 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_6ff4bf87634e734e] hash = 6ff4bf87634e734e ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_7023a1eba5e17f04] hash = 7023a1eba5e17f04 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_75a2ef1fbc1eb4db] hash = 75a2ef1fbc1eb4db ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_787c6207b4d6c84c] hash = 787c6207b4d6c84c ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_7c83bb8d2e1c4cc9] hash = 7c83bb8d2e1c4cc9 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_7e32b268fc5bf312] hash = 7e32b268fc5bf312 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_85ad876cd359ecf9] hash = 85ad876cd359ecf9 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_90d6d1a63f8e2b48] hash = 90d6d1a63f8e2b48 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_932408f495984c3e] hash = 932408f495984c3e ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_93e3a6cda25c688d] hash = 93e3a6cda25c688d ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_942813ffd5693dbb] hash = 942813ffd5693dbb ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_952dd3b0b6a4a500] hash = 952dd3b0b6a4a500 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_9a1824158b0c099b] hash = 9a1824158b0c099b ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_9ad46af36f413975] hash = 9ad46af36f413975 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_9bb9f6227b9c20f6] hash = 9bb9f6227b9c20f6 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_9fa63cf4d3e1f391] hash = 9fa63cf4d3e1f391 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_a49f3909d624d129] hash = a49f3909d624d129 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_a590090d969f33bf] hash = a590090d969f33bf ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_a5a9346f83049c18] hash = a5a9346f83049c18 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_a98618944992c9c8] hash = a98618944992c9c8 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_ac145b8d6624d16f] hash = ac145b8d6624d16f ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_ad0be651816926c2] hash = ad0be651816926c2 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_aded2ed1f46c7453] hash = aded2ed1f46c7453 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_b05d7bcbb61ea5f5] hash = b05d7bcbb61ea5f5 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_b58784ccee075821] hash = b58784ccee075821 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_ba67945887c39ddf] hash = ba67945887c39ddf ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_bb6d2bb0c1ca8de2] hash = bb6d2bb0c1ca8de2 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_c440f506017baeec] hash = c440f506017baeec ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_d203e3c3bcff0fc2] hash = d203e3c3bcff0fc2 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_d970ff0943f41a53] hash = d970ff0943f41a53 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_dd9d1b764b8f6a92] hash = dd9d1b764b8f6a92 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_df35655031d27405] hash = df35655031d27405 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_dfca04385f9397d7] hash = dfca04385f9397d7 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_e11da8b689ef4ad8] hash = e11da8b689ef4ad8 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_e48c8c95a5991520] hash = e48c8c95a5991520 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_e6df867cf9b5b97f] hash = e6df867cf9b5b97f ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_ee21b6afac77315e] hash = ee21b6afac77315e ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_ee4141580d4ca032] hash = ee4141580d4ca032 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_f0d08255a96090bd] hash = f0d08255a96090bd ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [ShaderOverride_f6564405fb5d4b00] hash = f6564405fb5d4b00 ps-cb11 = Resource_UnityPerDraw Resource_CameraDepthTexture = ps-t0 Resource_UnityPerCamera = ps-cb1 [/code] Anyway, it looks like the most important shader is still broken! And hunting shaders didn't seem to find any fixed shader. Well, I have to go to work now and I'll be back late.
After writing this manually, I don't get boop errors:

; Custom resource declarations
[Resource_UnityPerCameraRare]
max_copies_per_frame = 1

[Resource_CameraDepthTexture]
max_copies_per_frame = 1

[Resource_UnityPerCamera]
max_copies_per_frame = 1

[Resource_UnityPerDraw]
max_copies_per_frame = 1


Here is the ini anyway:

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

; Log all API usage
calls=1

; 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=1
; Log NVAPI separation modifications
separation=1


; ------------------------------------------------------------------------------------------------------
; Default constants to pass directly to shaders as IniParams
; ------------------------------------------------------------------------------------------------------
[Constants]
; x = 0.8
; y = 1.0
; z = 1.2
; w = 2.0

; x7 is used by the 3DVision2SBS custom shader. To use, find the [Present]
; section below and uncomment the 'run = CustomShader3DVision2SBS' line.
; 0 = Regular 3D Vision
; 1 = Reversed 3D Vision
; 2 = Side by Side
; 3 = Reversed Side by Side
; 4 = Top and Bottom
; 5 = Reversed Top and Bottom
x7 = 0


;------------------------------------------------------------------------------------------------------
; Custom settings override for any of [convergence, separation, x, y, z, w]
;
; Four types are supported - by default the bindings will simply load the
; configured settings, but type=hold can be specified to have a preset
; active while the button is held, type=toggle can be used to make a simple
; on/off toggle, and type=cycle can be used to cycle between several presets.
;
; Delays (type=hold only) and linear or cosine trasition periods (any key type)
; can be used to better synchonrise setting changes to the game's animations,
; or to smoothly adjust UI elements over a short period of time.
;
; 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

;
; Key combinations can be specified by separating key names with spaces, e.g.
; "Shift Q". It is also possible to indicate that a key must *not* be held for
; the binding to activate, e.g. "NO_ALT F1" would prevent the binding from
; activating when taking a 3D Screenshot with Alt F1. "NO_MODIFIERS" may be
; used as a shorthand for excluding all standard modifiers (Ctrl, Alt, Shift,
; Windows).
;
; Keys can also be from XBox controllers using:
; XB_LEFT_TRIGGER, XB_RIGHT_TRIGGER,
; XB_LEFT_SHOULDER, XB_RIGHT_SHOULDER,
; XB_LEFT_THUMB, XB_RIGHT_THUMB,
; XB_DPAD_UP, XB_DPAD_DOWN, XB_DPAD_LEFT, XB_DPAD_RIGHT,
; XB_A, XB_B, XB_X, XB_Y, XB_START, XB_BACK, XB_GUIDE
; By default all attached controllers are used - to associate a binding with a
; specific controller add the controller number 1-4 to the prefix, like
; XB2_LEFT_TRIGGER, though this may be more useful for hunting than playing.
;------------------------------------------------------------------------------------------------------

; Example for changing default settings
;[Key1]
;Key = z
;separation = 100.0
;convergence = 4.0
;x = 0.98

; Example to support momentary hold type overrides, like aiming.
;[Key2]
;Key = RBUTTON
;convergence = 0.1
;type = hold

; Example for a toggle override.
;[Key3]
;Key = q
;separation = 0.1
;type = toggle
;y = 0.0

; Example for a momentary hold, but with a delay followed by a smooth
; transition (ms) on hold and release to sync better with the game. Note that
; delay only works with type=hold (for now), while transitions will work with
; all types.
;[Key4]
;Key = XB_LEFT_TRIGGER
;type = hold
;y = 0.25
;delay = 100
;transition = 100
;transition_type = linear
;release_delay = 0
;release_transition = 500
;release_transition_type = cosine

; Example of a cycle transition that might be used to provide several presets
; that set both convergence and UI depth to suit different scenes in a game.
; Cosine transitions are used to smooth the changes over 1/10 of a second.
;[Key5]
;Key = Q
;type = cycle
;convergence = 1.45, 1.13, 0.98
;z = 0.25, 0.5, 0.75
;transition = 100
;transition_type = cosine

[Key1]
Key = F1
type = cycle
convergence = 15, 24, 0
transition = 150
transition_type = cosine

;------------------------------------------------------------------------------------------------------
; Shader hunting options.
; Default setup is to use keyboard similar to Helix presets
;------------------------------------------------------------------------------------------------------
[Hunting]

; 0: Release mode is with shader hunting disabled, optimized for speed.
; 1: Hunting mode enabled
; 2: Hunting mode "soft disabled" - can be turned on via the toggle_hunting key
hunting=2

; 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.
; "pink" = make the output hot pink to make it standout.
; "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

;
; XBox controllers are supported using the same bindings as the [Key] sections
; (see above). If the game already uses the first controller you might try
; using the second controller for hunting with e.g. XB2_LEFT_SHOULDER

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

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

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

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

; rotate through all VISIBLE geometry shaders at the current scene.
; This is disabled since these keys are commonly pressed while alt+tabbed out
;previous_geometryshader = no_modifiers <
;next_geometryshader = no_modifiers >
;mark_geometryshader = no_modifiers /

; rotate through all VISIBLE domain shaders at the current scene.
; This is disabled since these keys are commonly pressed while alt+tabbed out
;previous_domainshader = no_modifiers [
;next_domainshader = no_modifiers ]
;mark_domainshader = no_modifiers \

; rotate through all VISIBLE hull shaders at the current scene.
; This is disabled only because it is rarely needed
;previous_hullshader = no_modifiers MINUS
;next_hullshader = no_modifiers EQUALS
;mark_hullshader = no_modifiers BACKSPACE

; rotate through all USED compute shaders at the current scene.
; Disabling compute shaders may cause crashes, so these are
; not enabled by default:
;previous_computeshader = no_modifiers PAGE_UP
;next_computeshader = no_modifiers PAGE_DOWN
;mark_computeshader = no_modifiers HOME

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

; Screenshot as pns
take_screenshot = no_modifiers VK_SNAPSHOT

; reload all fixes from ShaderFixes folder
reload_fixes = no_modifiers VK_F10

; Key to turn hunting itself on/off. This will also show/hide overlay.
; Hunting must be set to either 1 or 2 to enable this toggle.
toggle_hunting = no_modifiers VK_NUMPAD0

; Key to reload the settings from the the d3dx.ini without restarting. This can
; be the same key as reload_fixes for convenience, or a different key may be
; used to avoid resetting the ini parameters every time the shaders are
; reloaded. Note that not all settings can be reloaded, so if something doesn't
; work as expected you may still have to restart the game:
reload_config = no_modifiers VK_F10

; Hold this key to temporarily disable the fix - useful to quickly check what
; an effect looked like in the original game.
show_original = no_modifiers VK_F9

; snapshots to be made upon any shader Mark. These give you snapshot when the
; shader is disabled, as a way to correlate image to shader hash.
; mark_snapshot=0 // none
; mark_snapshot=1 // mono, simple snapshot
; mark_snapshot=2 // stereo snapshot
mark_snapshot=2

; Auto-repeat key rate in events per second.
repeat_rate=6


; 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
;tune_enable=1
;tune_step=0.1
;tune1_up=VK_INSERT
;tune1_down=VK_DELETE
;tune2_up=X
;tune2_down=Z


; Dumps out the contents of each render target after every immediate draw call
; for the next frame. Takes up a large amount of space, so disabled by default.
;analyse_frame = no_modifiers VK_F8

; Specifies options for the frame analysis feature. Options can be combined by
; separating them with a space.
; log: Log draw calls and state changes (one log file per context)
; hold: Continue analysing subsequent frames while the key is held
; dump_rt_jps: Dumps out render targets as JPS files. These are the easiest to
; work with and don't take up as much space as DDS files, but they
; are not dumped for every render target and are missing some data.
; dump_rt_dds: Dumps out render targets as DDS files. WARNING: This option may
; require hundreds of gigabytes and a long time! Only use it if
; you absolutely need more information than you can get otherwise.
; Will also dump buffer type render targets & UAVs as .buf files.
; dump_rt: Dumps render targets as JPS files when possible, or DDS when not.
; clear_rt: Clears each render target the first time they are used in the
; frame. Makes it easier to see what is being drawn if the game
; doesn't clear them, but might cause some effects not to render.
; dump_depth: Dumps depth/stencil targets as DDS files
; dump_tex_jps: Dumps textures as JPS files
; dump_tex_dds: Dumps textures as DDS files (Same warning as for dump_rt_dds)
; Will also dump buffer type shader resource views as .buf files.
; dump_tex: Dumps textures as JPS files when possible, or DDS when not.
; dump_cb: Dumps constant buffers as binary .buf files
; dump_cb_txt: Decodes constant buffers as an array of float4s
; dump_vb: Dumps vertex buffers as binary .buf files
; dump_vb_txt: Decodes vertex buffers as an array of float4s
; dump_ib: Dumps index buffers as binary .buf files
; dump_ib_txt: Decodes index buffers
; filename_reg: Normally the draw number is the first part of the filename so
; that the files will be sorted in the order they were used in
; the game. Sometimes it is more desirable to examine how a
; specific output changed through the frame and this option will
; place the register number first in the filename to allow that.
; mono: Dump out mono textures instead of stereo. To dump both, specify
; 'mono stereo'. If neither are specified, defaults to stereo.
;dump_on_unmap: Dumps buffers/textures whenever the game maps them to the CPU
; with the Map() / Unmap() calls. Typically used to update
; constant buffers.
; analyse_options can also be specified in [ShaderOverride*] and
; [TextureOverride*] sections to set up triggers to change the options mid-way
; through a frame analysis, either for a single draw call (default), or
; permanently (by adding the 'persist' keyword).
analyse_options = log dump_rt_jps clear_rt



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

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

; Options to use hooking instead of wrapping. Used in MGSV. Possible objects to hook include:
; deferred_contexts
; immediate_context
; device
; all - all of the above
; crash/hang workarounds:
; except_set_shader_resources - work around crash on Win 7 with evil update
; except_set_samplers - work around crash on Win 10
; except_set_rasterizer_state - work around crash on Win 7 without evil update
; skip_dxgi_factory - hack for MGSV, not recommended for other games as it
; may disable core 3DMigoto functionality in some cases
; skip_dxgi_device - hack for MGSV on Win10 anniversary update
; recommended - hook supported objects, safe workarounds enabled, skips not enabled
;hook=recommended

; Options to allow IDXGIFactory2 to be created and wrapped. We have typically had good
; luck with returning an error for all non-dx11 requests, but some games error out
; with these checks in place.
; The allow_create_device allows D3D10 Device creation and is needed for some games.
; It has two options, allow_create_device=1, which will allow anything to go through
; without returning an error, and allow_create_device=2, which will force all requests
; to become D3D11 Devices, no matter what was passed in.
; The allow_platform_update option allows the D3D11Device1 and D3D11Context1
; interfaces introduced in Windows 8 and the platform update of Windows 7.
;
; Start with allow_check_interfaces, if that doesn't work then try allow_dxgi1_2,
; then try allow_create_device=2, lastly try allow_create_device=1
;
; Setting allow_dxgi1_2=2 may allow the Steam Overlay and Steam Controller to
; work in some games on Windows 7 and Windows 8, but could potentially disable
; core functionality in some cases, so only enable it if you need it.
;
allow_check_interface=0
allow_dxgi1_2=0
allow_create_device=2
allow_platform_update=0


;------------------------------------------------------------------------------------------------------
; 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

; full_screen=1 forces creation of full screen devices and swap chains.
; use this for 3dtvplay if game won't active stereo mode.
; full_screen=2 will also disable SetWindowPos which might help in some games.
full_screen=0

; This toggles forcing the full screen mode on and off. It will not take effect
; immediately, but will change what happens the next time the game tries to
; change the fullscreen mode. This is a specific hack to workaround a bug in
; Unity games, which crash when alt+tabbing out from exclusive mode fullscreen.
;
; To switch out of a Unity game without it crashing:
; Enable this option, Press F7, Alt+Enter, Alt+Tab
;toggle_full_screen = no_modifiers VK_F7

; some games explicitely disable stereo, prohibiting any stereo attempts.
; Setting this to 1 ignores all stereo disabling calls and also calls
; NvAPI_Stereo_Enable to force stereo on.
; Setting this to 2 sets 3Dmigoto to use 3D Vision Direct Mode
force_stereo=0

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

; Indicates where the resolution is obtained for texture hashes. Comment this
; out to never special case hashes that match the resolution or a multiple.
; Possible values are swap_chain and depth_stencil. Recommended to test which
; works for a given game (e.g. CryEngine always creates a swap chain that
; matches the native resolution so has to use depth_stencil).
get_resolution_from = swap_chain


;------------------------------------------------------------------------------------------------------
; 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.
; This also forces 'false' as a return for any request for NvAPI_Stereo_IsEnabled.
automatic_mode=0

; Some games (CryEngine games, for example) lock the separation & convergence
; to a specific value, which can be undesirable. Set this to 1 to ignore these
; requests from the game to unlock the separation:
unlock_separation=0
unlock_convergence=0

; games without predefined profiles can't save stereo settings.
; enabling this options automatically creates a profile for unknown games.
; Note that there is now a more flexible means to alter the game's profile -
; refer to the [Profile] section.
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

; Force the NvAPI_Initialize to return an error so that games think stereo and NVidia is unavailable.
force_no_nvapi=0


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

; GPU program manipulations.

; Type of shader hashes in use:
; 3dmigoto = Traditional hash used by 3DMigoto (unseeded software FNV-1)
; embedded = Use the first half of the MD5-like hash embedded within the
; shaders to skip the hash calculation altogether.
; bytecode = Only hash bytecode and signatures with hardware accelerated
; CRC32C. Used to minimise duplicate shaders in certain games, but
; potentially carries a higher risk of hash collisions between
; unrelated shaders in some games (e.g. that only differ in
; variable names). May occasionally avoid hash changes on game
; updates due to changes in the game developer's build environment
; (shader compiler version, build path embedded in debug info,
; constants renamed, etc). Will not avoid hash changes if the
; shader code, constant values, etc are changed.
shader_hash = 3dmigoto

; 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=0

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

; Setting this option disables scissor limits
rasterizer_disable_scissor=1

; Tracks copies and updates to textures which may cause their hash to become
; out of sync with their contents - enable if texture hashes seem unreliable:
;track_texture_updates=1

; Registers where the StereoParams and IniParams textures will be assigned -
; change if the game already uses these registers. Newly decompiled shaders
; will use the new registers, but existing shaders will not be updated - best
; workflow is to remove ShaderCache after changing these and run a search and
; replace on all shaders in ShaderFixes. Set to -1 to disable if not required.
stereo_params = 125
ini_params = 120

;------------------------------------------------------------------------------------------------------
; 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=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 manipulations without patches + shader filtering.
;------------------------------------------------------------------------------------------------------
;[ShaderOverride1]
;Hash=69732c4f23cb6c48
; Custom stereo separation value while rendering objects using this shader.
;Separation=0
; Custom stereo convergence value while rendering objects using this
; shader (e.g. convergence=0 will move an object to infinity).
;Convergence=0
; don't draw anything using this shader.
;Handling=skip
; advanced option: use this to override only if this shader is used rendering the given index buffer.
;IndexBufferFilter=b3e56ebc
; Use replaced shader only when there is no active depth buffer (for UI filtering)
;depth_filter = depth_inactive
; Use replaced shader only when there *IS* an active depth buffer (for UI filtering)
;depth_filter = depth_active
; Only use replaced shader when it is used in conjunction with a specific shader
; (e.g. to adjust a vertex shader ONLY when it is used with a specific pixel shader)
;partner=af7b880f07630615
; Override a value from [Constants] when this shader is used:
;x=2.0
; Pass the dimensions of the active render target and resolution (obtained with
; get_resolution_from) into the shader:
;x1=rt_width
;y1=rt_height
;z1=res_width
;w1=res_height
; Use t0 from active pixel shader for texture filtering. Will be 0 if no
; [TextureOverride*] section exists for the texture or 1 if one does. For advanced
; filtering, set a value for filter_index in the [TextureOverride] section.
;x2=ps-t0
; Override the shader model to allow using newer features like Texture2DMS:
;model=vs_5_0
; There's also support for copying textures, constant buffers, depth buffers,
; etc. from one shader to another. This is a complex topic - see this page:
; https://github.com/bo3b/3Dmigoto/wiki/Resource-Copying



;------------------------------------------------------------------------------------------------------
; texture / render target manipulations
;------------------------------------------------------------------------------------------------------
;
; NOTE: If you are trying to match a texture the same size as the resolution (or
; a /2, x2, x4 or x8 multiple), you should confirm that the same hash is used
; on different resolutions, and adjust get_resolution_from if necessary.
;
; NOTE: If you find a texture hash seems to change inconsistently, try enabling
; track_texture_updates in the [Rendering] section.
;
;[TextureOverride1]
;Hash=c3e55ebd
; 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

;[TextureOverride2]
;Hash = e27b9d07
; Prevent the game reading from this texture - will give the game a blank
; buffer instead. Used to prevent CryEngine games falsely culling objects. Use
; debug logging and look for Map calls to identify possible hashes.
;deny_cpu_read=1
; Expand the region copied to this texture with CopySubresourceRegion (similar
; issue to rasterizer_disable_scissor). Used to solve issues with transparent
; refraction effects (like glass) in CryEngine games.
;expand_region_copy=1


;------------------------------------------------------------------------------------------------------
; 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


;------------------------------------------------------------------------------------------------------
; Updates the game's driver profile on launch.
;
; Any changes here will require the user to OK a UAC prompt the first time they
; run the game, but the DLL tries to only do that if it is actually required.
;------------------------------------------------------------------------------------------------------
[Profile]
; This setting should always be added to a profile - it is required for a
; number of other settings to work, as well as allowing the convergence to be
; saved. If you are customising a profile you should **always uncomment this**:
;StereoProfile = 1
;
; This setting enables stereo compute shaders, which is requires to fix a lot
; of "one eye" type rendering issues in many DX11 games:
;StereoFlagsDX10 = 0x00004000
;
; This sets the default convergence in the profile. Note that 3DMigoto will
; happily override the default value from the driver, but will only override
; the user's custom convergence if it has another reason to update the profile,
; such as a change to another setting (adding a version tag to the Comments
; setting would be one way to force an update):
;StereoConvergence = 0.5
;
; This changes the green text that the driver displays, and is a good place to
; put any reminders to display to the user or just take some credit:
;Comments = "Such and such 3D fix by an awesome modder. Disable motion blur!"
;
; Change the rating: "0": 3D Vision Ready, "1": Excellent, "2": Good,
; "3": Fair, "4": Not Recommended
;Compat = "0"
;
; If you have added some comments, you probably want to force the green text to
; show up when the game is next run. Note that like convergence, 3DMigoto will
; only override a user setting here if something else has also been updated
; (such as Comments), so this will usually only show up the first time a user
; runs the game after installing the fix (be sure to enable StereoProfile).
;StereoMemoEnabled = 1
;
; Disable compatibility mode to make sure users are seeing the real deal. Like
; convergence, 3DMigoto will respect the users custom settings here:
;Disable2DD = 1
;
; Put a reminder in the green text of compatibility mode that they are not
; seeing the real deal:
;2DD_Notes = "Compatibility mode is enabled. To use the fix, please disable it with Ctrl+Alt+F11"
;
; These two options change which constant buffers the driver uses to pass the
; separation and convergence to any Vertex and Domain shaders it has modified.
; The default value is 12, and you may need to change it if the game already
; uses that constant buffer for any purpose, which should be apparent as you
; will see 2D geometry on any shader that uses this. You should avoid using
; these constant buffers yourself unless you understand the nuances involved.
;DX10VSCBNumber = 12
;DX10DSCBNumber = 12
;
; If a setting doesn't have a name or you don't know what it is (check the
; d3d11_log.txt for the names of all settings in this profile), you can use the
; hex ID (in fact, you can even paste a complete profile from Geforce Profile
; Manager - just be sure to delete any corrupt string settings if you do):
;0x1033cec2 = 0x00000002
;
; There are many more options, and we have tried to document them here -
; *please* edit this page if you figure out anything new:
; http://wiki.bo3b.net/index.php?title=Driver_Profile_Settings



;------------------------------------------------------------------------------------------------------
; Commands to run from the Present call at the start/end of each frame
;
; Useful to clear custom resources or ini params at the start of each frame, or
; to run a custom shader to do whatever you can dream up.
;------------------------------------------------------------------------------------------------------

;;;;;;;;;;;;;;;;;;;;;;; DARKSTARSWORD'S UNITY 5 TEMPLATE ;;;;;;;;;;;;;;;;;;;;;;;

; Custom resource declarations
[Resource_UnityPerCameraRare]
max_copies_per_frame = 1

[Resource_CameraDepthTexture]
max_copies_per_frame = 1

[Resource_UnityPerCamera]
max_copies_per_frame = 1

[Resource_UnityPerDraw]
max_copies_per_frame = 1


[Present]
; Clear an ini param at the start of each frame:
;x = 0
; Clear a custom resource at the start of each frame:
;ResourceDepthBuffer = null
; Uncomment to enable a custom shader that allows the stereo output mode to be
; changed to Side-by-Side or Top-and-Bottom:
;run = CustomShader3DVision2SBS


; The following custom shader can convert 3D Vision to Side-by-Side and
; Top-and-Bottom for use with 3D TVs & projectors - to enable this uncomment
; the 'run = CustomShader3DVision2SBS' in the [Present] section, set 3D Vision
; to output "checkerboard" in the control panel (which will remove the 720p
; limitation) and enable this either via the F11 key, or by setting a default
; for x7 in the [Constants] section.
[Resource3DVision2SBSBackupTexture]
[CustomShader3DVision2SBS]
; Load a custom vertex + pixel shader:
vs = ShaderFixes/3dvision2sbsvs.hlsl
ps = ShaderFixes/3dvision2sbsps.hlsl
; Explicitly unbind other shader types for safety:
hs = null
ds = null
gs = null
; Disable the OM blend stage that could interfere with the shader:
blend = disable
; Disable front/back face culling so the vertices can be in any rotation:
cull = none
; Use a triangle strip topology so we only have to output four vertices:
topology = triangle_strip
; Clear all render + depth targets to avoid compatibility issues:
o1 = null
o2 = null
o3 = null
o4 = null
o5 = null
o6 = null
o7 = null
oD = null
; Bind the back buffer as a render target. set_viewport ensures that the view
; port is the size of the buffer so the draw call will work, and no_view_cache
; is necessary for a few games like Mad Max:
o0 = set_viewport no_view_cache bb
; Back up any textures that were in the ps-t100 slot. The CustomResource
; section will already back up a lot of state, including shaders, render
; targets, depth targets, UAVs, viewports, blend state, rasterizer state,
; primitive topology, etc. but it does not back up textures:
Resource3DVision2SBSBackupTexture = reference ps-t100
; Use the reverse stereo blit to give the shader access to the back buffers of
; both eyes:
ps-t100 = stereo2mono bb
; Some rare games (e.g. Onechanbara Z2) use MSAA back buffers, which cannot be
; directly used with the reverse stereo blit and must be resolved to non MSAA
; versions first. The symptoms will be a black screen after enabling this
; shader with F11. In that case, replace the above line with these two:
; ps-t100 = resolve_msaa bb
; ps-t100 = stereo2mono ps-t100
; Some games such as The Evil Within and Akiba's Trip constantly unbind
; StereoParams & IniParams, so we may need to explicitly rebind them now:
;vs-t125 = StereoParams
;ps-t125 = StereoParams
;vs-t120 = IniParams
;ps-t120 = IniParams
; Draw four vertices. The vertex shader will construct coordinates to cover the
; full screen using the SV_VertexID semantic so we don't need vertex buffers:
draw = 4, 0
; Restore the original texture from the ps-t100 slot:
post ps-t100 = reference Resource3DVision2SBSBackupTexture

[KeyChange3DVision2SBSOutputMode]
key = no_modifiers F11
; 0 = Regular 3D Vision
; 1 = Reversed 3D Vision
; 2 = Side by Side
; 3 = Reversed Side by Side
; 4 = Top and Bottom
; 5 = Reversed Top and Bottom
x7 = 1, 2, 3, 4, 5, 0
type = cycle

[ShaderOverride_027c750fde1237f5]
hash = 027c750fde1237f5
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_031724f430585844]
hash = 031724f430585844
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_03d609089e8eabe4]
hash = 03d609089e8eabe4
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_0cd464e442e51c0f]
hash = 0cd464e442e51c0f
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_0d229bee69d6470f]
hash = 0d229bee69d6470f
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_0edea0a4ce26b174]
hash = 0edea0a4ce26b174
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_110849b760e2b107]
hash = 110849b760e2b107
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_122f65f79cbb91e1]
hash = 122f65f79cbb91e1
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_195e27dcd6d7d930]
hash = 195e27dcd6d7d930
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_1cc9073922e40eeb]
hash = 1cc9073922e40eeb
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_1f65e0def573c0b9]
hash = 1f65e0def573c0b9
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_2034c02a27280552]
hash = 2034c02a27280552
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_2706e2cc559ea251]
hash = 2706e2cc559ea251
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_2eda8c28edad82db]
hash = 2eda8c28edad82db
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_30513bcde58c1034]
hash = 30513bcde58c1034
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_3067e397789403d2]
hash = 3067e397789403d2
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_386557ba47e92e89]
hash = 386557ba47e92e89
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_3dee4f96241dd225]
hash = 3dee4f96241dd225
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_4346efe5bd28e52c]
hash = 4346efe5bd28e52c
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_4451b6e66342ab1f]
hash = 4451b6e66342ab1f
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_456743a20b192c85]
hash = 456743a20b192c85
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_5193738aa357fc3f]
hash = 5193738aa357fc3f
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_523203724091dbed]
hash = 523203724091dbed
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_585869ca6f749821]
hash = 585869ca6f749821
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_5b92f11d9ec7fdcb]
hash = 5b92f11d9ec7fdcb
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_5c2fac887bc320f6]
hash = 5c2fac887bc320f6
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_5d18d6d6cd61186b]
hash = 5d18d6d6cd61186b
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_6788a8ca46b4d645]
hash = 6788a8ca46b4d645
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_6e329f5ba52b2fd4]
hash = 6e329f5ba52b2fd4
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_6fdd041fb8585f77]
hash = 6fdd041fb8585f77
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_6ff4bf87634e734e]
hash = 6ff4bf87634e734e
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_7023a1eba5e17f04]
hash = 7023a1eba5e17f04
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_75a2ef1fbc1eb4db]
hash = 75a2ef1fbc1eb4db
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_787c6207b4d6c84c]
hash = 787c6207b4d6c84c
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_7c83bb8d2e1c4cc9]
hash = 7c83bb8d2e1c4cc9
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_7e32b268fc5bf312]
hash = 7e32b268fc5bf312
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_85ad876cd359ecf9]
hash = 85ad876cd359ecf9
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_90d6d1a63f8e2b48]
hash = 90d6d1a63f8e2b48
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_932408f495984c3e]
hash = 932408f495984c3e
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_93e3a6cda25c688d]
hash = 93e3a6cda25c688d
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_942813ffd5693dbb]
hash = 942813ffd5693dbb
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_952dd3b0b6a4a500]
hash = 952dd3b0b6a4a500
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_9a1824158b0c099b]
hash = 9a1824158b0c099b
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_9ad46af36f413975]
hash = 9ad46af36f413975
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_9bb9f6227b9c20f6]
hash = 9bb9f6227b9c20f6
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_9fa63cf4d3e1f391]
hash = 9fa63cf4d3e1f391
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_a49f3909d624d129]
hash = a49f3909d624d129
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_a590090d969f33bf]
hash = a590090d969f33bf
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_a5a9346f83049c18]
hash = a5a9346f83049c18
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_a98618944992c9c8]
hash = a98618944992c9c8
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_ac145b8d6624d16f]
hash = ac145b8d6624d16f
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_ad0be651816926c2]
hash = ad0be651816926c2
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_aded2ed1f46c7453]
hash = aded2ed1f46c7453
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_b05d7bcbb61ea5f5]
hash = b05d7bcbb61ea5f5
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_b58784ccee075821]
hash = b58784ccee075821
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_ba67945887c39ddf]
hash = ba67945887c39ddf
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_bb6d2bb0c1ca8de2]
hash = bb6d2bb0c1ca8de2
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_c440f506017baeec]
hash = c440f506017baeec
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_d203e3c3bcff0fc2]
hash = d203e3c3bcff0fc2
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_d970ff0943f41a53]
hash = d970ff0943f41a53
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_dd9d1b764b8f6a92]
hash = dd9d1b764b8f6a92
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_df35655031d27405]
hash = df35655031d27405
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_dfca04385f9397d7]
hash = dfca04385f9397d7
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_e11da8b689ef4ad8]
hash = e11da8b689ef4ad8
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_e48c8c95a5991520]
hash = e48c8c95a5991520
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_e6df867cf9b5b97f]
hash = e6df867cf9b5b97f
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_ee21b6afac77315e]
hash = ee21b6afac77315e
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_ee4141580d4ca032]
hash = ee4141580d4ca032
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_f0d08255a96090bd]
hash = f0d08255a96090bd
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1

[ShaderOverride_f6564405fb5d4b00]
hash = f6564405fb5d4b00
ps-cb11 = Resource_UnityPerDraw
Resource_CameraDepthTexture = ps-t0
Resource_UnityPerCamera = ps-cb1


Anyway, it looks like the most important shader is still broken! And hunting shaders didn't seem to find any fixed shader. Well, I have to go to work now and I'll be back late.

CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: MSI GeForce RTX 2080Ti Gaming X Trio
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com

Posted 06/21/2017 04:53 AM   
Hi, are somebody know where is mistake in texture filtering? ini: [code] [ShaderOverrideMountains] ;VS ;Hash = 064f121ad0bf6361 ;PS Hash = 57e0fee9920f02aa x2 = ps-t1 post x2 = 0 [TextureOverrideMountains] Hash = 868a5dff filter_index = 2 [/code] VS: [code] float4 stereo = StereoParams.Load(0); float separation = stereo.x, convergence = stereo.y, eye = stereo.z; float4 tex_filter = IniParams.Load(int2(2,0)); r0.xyzw = cb3[1].xyzw * v0.yyyy; r0.xyzw = cb3[0].xyzw * v0.xxxx + r0.xyzw; r0.xyzw = cb3[2].xyzw * v0.zzzz + r0.xyzw; r0.xyzw = cb3[3].xyzw + r0.xyzw; if (tex_filter.x == 2) { r0.x += separation * (convergence - r0.w); } o0 = r0; [/code] This fixes mountain number 1. Mountain number 2 have been fixed When I'd replaced 'ps-t1' in ini with 'ps-t2'. But I need to fix both mountains simultaneously. So I've tried code below and it fixes only one mountain ini: [code] [ShaderOverrideMountains] ;VS ;Hash = 064f121ad0bf6361 ;PS Hash = 57e0fee9920f02aa x2 = ps-t1 post x2 = 0 y2 = ps-t2 post y2 = 0 [TextureOverrideMountains] Hash = 868a5dff filter_index = 2 [/code] VS: [code] float4 stereo = StereoParams.Load(0); float separation = stereo.x, convergence = stereo.y, eye = stereo.z; float4 tex_filter = IniParams.Load(int2(2,0)); r0.xyzw = cb3[1].xyzw * v0.yyyy; r0.xyzw = cb3[0].xyzw * v0.xxxx + r0.xyzw; r0.xyzw = cb3[2].xyzw * v0.zzzz + r0.xyzw; r0.xyzw = cb3[3].xyzw + r0.xyzw; if (tex_filter.x == 2 || tex_filter.y == 2) { r0.x += separation * (convergence - r0.w); } o0 = r0; [/code]
Hi, are somebody know where is mistake in texture filtering?
ini:
[ShaderOverrideMountains]
;VS
;Hash = 064f121ad0bf6361
;PS
Hash = 57e0fee9920f02aa
x2 = ps-t1
post x2 = 0

[TextureOverrideMountains]
Hash = 868a5dff
filter_index = 2

VS:
float4 stereo = StereoParams.Load(0);
float separation = stereo.x, convergence = stereo.y, eye = stereo.z;
float4 tex_filter = IniParams.Load(int2(2,0));

r0.xyzw = cb3[1].xyzw * v0.yyyy;
r0.xyzw = cb3[0].xyzw * v0.xxxx + r0.xyzw;
r0.xyzw = cb3[2].xyzw * v0.zzzz + r0.xyzw;
r0.xyzw = cb3[3].xyzw + r0.xyzw;
if (tex_filter.x == 2) {
r0.x += separation * (convergence - r0.w);
}
o0 = r0;


This fixes mountain number 1. Mountain number 2 have been fixed When I'd replaced 'ps-t1' in ini with 'ps-t2'. But I need to fix both mountains simultaneously. So I've tried code below and it fixes only one mountain

ini:
[ShaderOverrideMountains]
;VS
;Hash = 064f121ad0bf6361
;PS
Hash = 57e0fee9920f02aa
x2 = ps-t1
post x2 = 0
y2 = ps-t2
post y2 = 0

[TextureOverrideMountains]
Hash = 868a5dff
filter_index = 2

VS:
float4 stereo = StereoParams.Load(0);
float separation = stereo.x, convergence = stereo.y, eye = stereo.z;
float4 tex_filter = IniParams.Load(int2(2,0));

r0.xyzw = cb3[1].xyzw * v0.yyyy;
r0.xyzw = cb3[0].xyzw * v0.xxxx + r0.xyzw;
r0.xyzw = cb3[2].xyzw * v0.zzzz + r0.xyzw;
r0.xyzw = cb3[3].xyzw + r0.xyzw;
if (tex_filter.x == 2 || tex_filter.y == 2) {
r0.x += separation * (convergence - r0.w);
}
o0 = r0;

Posted 06/23/2017 06:20 PM   

Posted 06/23/2017 06:21 PM   
Perhaps your not getting the correct texture hash as explained by DJ-RK [url=https://forums.geforce.com/default/topic/1004980/3d-vision/please-help-with-texture-filtering-in-3dmigoto/post/5131433/#5131433]here[/url]
Perhaps your not getting the correct texture hash as explained by DJ-RK here

Posted 06/23/2017 07:01 PM   
No, I thought that changing 'ps-t1' in ini with 'ps-t2' switches mountains, but no - when I correct mountain number 1 this brokes mountain 2 with same texture hash. Mountain 2 at correct depth if I disable shader override - so I shouldn't use y2 - I thought that both mountains were broken before fixing them
No, I thought that changing 'ps-t1' in ini with 'ps-t2' switches mountains, but no - when I correct mountain number 1 this brokes mountain 2 with same texture hash. Mountain 2 at correct depth if I disable shader override - so I shouldn't use y2 - I thought that both mountains were broken before fixing them

Posted 06/23/2017 07:41 PM   
I've fixed both mountains... May be it seems awfull, but I used the fact that second mountain contains one more texture and disabled correction string in shader when this texture appears. So that works: ini: [code] [ShaderOverrideMountains] ;VS ;Hash = 064f121ad0bf6361 ;PS Hash = 57e0fee9920f02aa ;analyse_options = mono dump_tex x2 = ps-t1 post x2 = 0 y2 = ps-t7 post y2 = 0 [TextureOverrideMountain1] Hash = 868a5dff filter_index = 2 [TextureOverrideMountain2] ;Hash = 868a5dff - this texture also used by this mountain Hash = a71117f9 filter_index = 3 [/code] VS: [code] float4 stereo = StereoParams.Load(0); float separation = stereo.x, convergence = stereo.y, eye = stereo.z; float4 tex_filter = IniParams.Load(int2(2,0)); r0.xyzw = cb3[1].xyzw * v0.yyyy; r0.xyzw = cb3[0].xyzw * v0.xxxx + r0.xyzw; r0.xyzw = cb3[2].xyzw * v0.zzzz + r0.xyzw; r0.xyzw = cb3[3].xyzw + r0.xyzw; if (tex_filter.x == 2 [b][i][u]&&[/u][/i][/b] tex_filter.y [b][i][u]!=[/u][/i][/b] 3){ r0.x += separation * (convergence - r0.w); } o0 = r0; [/code] I almost broke my brain but did it!
I've fixed both mountains... May be it seems awfull, but I used the fact that second mountain contains one more texture and disabled correction string in shader when this texture appears. So that works:
ini:
[ShaderOverrideMountains]
;VS
;Hash = 064f121ad0bf6361
;PS
Hash = 57e0fee9920f02aa
;analyse_options = mono dump_tex
x2 = ps-t1
post x2 = 0
y2 = ps-t7
post y2 = 0

[TextureOverrideMountain1]
Hash = 868a5dff
filter_index = 2

[TextureOverrideMountain2]
;Hash = 868a5dff - this texture also used by this mountain
Hash = a71117f9
filter_index = 3

VS:
float4 stereo = StereoParams.Load(0);
float separation = stereo.x, convergence = stereo.y, eye = stereo.z;
float4 tex_filter = IniParams.Load(int2(2,0));

r0.xyzw = cb3[1].xyzw * v0.yyyy;
r0.xyzw = cb3[0].xyzw * v0.xxxx + r0.xyzw;
r0.xyzw = cb3[2].xyzw * v0.zzzz + r0.xyzw;
r0.xyzw = cb3[3].xyzw + r0.xyzw;
if (tex_filter.x == 2 && tex_filter.y != 3){
r0.x += separation * (convergence - r0.w);
}
o0 = r0;


I almost broke my brain but did it!

Posted 06/23/2017 09:15 PM   
3DM seems to fail reloading shaders in Kodi x64 Im getting error X3506: unrecognized compiler target ' ps_2_0' after pressing F10 update: I've tried to add [code] [ShaderOverride1] Hash=a94aea47a483f1aa model=ps_3_0[/code] but I get low beep and this in the log: [code]> reloading *_replace.txt fixes from ShaderFixes >Replacement shader found. Re-Loading replacement HLSL code from a94aea47a483f1aa-ps_replace.txt Reload source code loaded. Size = 2061 compiling replacement HLSL code with shader model ps_3_0 compile result for replacement HLSL shader: 0 > FAILED to reload shaders from ShaderFixes[/code] update2: setting model to ps_4_0 did the trick
3DM seems to fail reloading shaders in Kodi x64
Im getting error X3506: unrecognized compiler target ' ps_2_0'
after pressing F10

update:

I've tried to add
[ShaderOverride1]
Hash=a94aea47a483f1aa
model=ps_3_0


but I get low beep and this in the log:
> reloading *_replace.txt fixes from ShaderFixes
>Replacement shader found. Re-Loading replacement HLSL code from a94aea47a483f1aa-ps_replace.txt
Reload source code loaded. Size = 2061
compiling replacement HLSL code with shader model ps_3_0
compile result for replacement HLSL shader: 0
> FAILED to reload shaders from ShaderFixes


update2:

setting model to ps_4_0 did the trick

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 06/30/2017 08:33 AM   
Is there any way to feed to a shader some iterative variable or time? I need it as a seed for my noise function.
Is there any way to feed to a shader some iterative variable or time? I need it as a seed for my noise function.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 06/30/2017 10:18 AM   
That would be interesting. Probably doable without that, but I once thought about how cool it would be to create a random dithering effect in a pixel shader, for effects that have a lot of color banding (the sky in Dragon's Dogma, for example, although doing that in ASM would be more of a pain than HLSL).
That would be interesting. Probably doable without that, but I once thought about how cool it would be to create a random dithering effect in a pixel shader, for effects that have a lot of color banding (the sky in Dragon's Dogma, for example, although doing that in ASM would be more of a pain than HLSL).

CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: MSI GeForce RTX 2080Ti Gaming X Trio
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com

Posted 06/30/2017 05:06 PM   
[quote="masterotaku"]That would be interesting. Probably doable without that, but I once thought about how cool it would be to create a random dithering effect in a pixel shader, for effects that have a lot of color banding (the sky in Dragon's Dogma, for example, although doing that in ASM would be more of a pain than HLSL).[/quote] That's exactly what I need it for. I wrote a blur shader for the Attract Mode frontend (for emulators) but I wasn't happy with the colour banding it introduced, so I started dicking around to get rid of it and I've come up by accident with a neat idea of a iterative displacement debanding function, Its effects are amazing, I've already added it to Kodi and it removes even the ugliest banding from movies without sacrificing details or blurring edges. I just need to animate the noise to make a full conversion from Attract Mode. Here is a little gallery of my code in action [url]https://postimg.org/gallery/2pvoyzoys/[/url]
masterotaku said:That would be interesting. Probably doable without that, but I once thought about how cool it would be to create a random dithering effect in a pixel shader, for effects that have a lot of color banding (the sky in Dragon's Dogma, for example, although doing that in ASM would be more of a pain than HLSL).


That's exactly what I need it for. I wrote a blur shader for the Attract Mode frontend (for emulators) but I wasn't happy with the colour banding it introduced, so I started dicking around to get rid of it and I've come up by accident with a neat idea of a iterative displacement debanding function, Its effects are amazing, I've already added it to Kodi and it removes even the ugliest banding from movies without sacrificing details or blurring edges. I just need to animate the noise to make a full conversion from Attract Mode.

Here is a little gallery of my code in action
https://postimg.org/gallery/2pvoyzoys/

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 06/30/2017 07:20 PM   
  92 / 143    
Scroll To Top