3Dmigoto now open-source...
  103 / 116    
OK, thanks for the suggestions. I'll report back when I have some results. Edit: I've stereoized all RenderTargets that appeared in ShaderUsage, and now water is 3D and better :p. I'll do more stuff after lunch.
OK, thanks for the suggestions. I'll report back when I have some results.

Edit: I've stereoized all RenderTargets that appeared in ShaderUsage, and now water is 3D and better :p. I'll do more stuff after lunch.

Email for PayPal donations: masterotakusuko@gmail.com
CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: Gainward Phoenix 1080 GLH
Monitor: Asus PG278QR
Speakers: Logitech Z506

Posted 09/10/2017 12:40 PM   
I have crashes on start-up with latest versions of 3Dmigoto on Battlefield 1. It works however with the version that Helifax used.
I have crashes on start-up with latest versions of 3Dmigoto on Battlefield 1.
It works however with the version that Helifax used.

Intel i7 2600k @4,5ghz
ASUS GTX 1080 Strix
DDR3 4x4gb
TV LG OLED65E6V
Projector Benq W1300
Windows 10 64bits

Posted 09/10/2017 01:30 PM   
@joker18 can you check if it works if you add an empty [Profile] section to the end of the d3dx.ini? The bug fix for that will be in the next release in a few hours, but I want to make sure it's not something else.
@joker18 can you check if it works if you add an empty [Profile] section to the end of the d3dx.ini? The bug fix for that will be in the next release in a few hours, but I want to make sure it's not something else.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 09/10/2017 01:48 PM   
I checked but it still crashes. Is the log useful? if I upload it? [code]D3D11 DLL starting init - v 1.2.64 - Sun Sep 10 18:46:31 2017 ----------- d3dx.ini settings ----------- [Logging] calls=1 WARNING: Duplicate section found in d3dx.ini: [Profile] input=1 debug=0 unbuffered=0 force_cpu_affinity=0 [System] allow_dxgi1_2=0 allow_check_interface=0 allow_create_device=2 allow_platform_update=0 [Device] upscaling=0 full_screen=0 force_stereo=0 get_resolution_from=swap_chain [Stereo] automatic_mode=0 create_profile=0 force_no_nvapi=0 [Rendering] shader_hash=3dmigoto cache_shaders=0 use_criticalsection=1 rasterizer_disable_scissor=1 export_fixed=0 export_shaders=0 export_hlsl=0 dump_usage=1 stereo_params=125 ini_params=120 override_directory=F:\Games\Origin\Battlefield 1\ShaderFixes cache_directory=F:\Games\Origin\Battlefield 1\ShaderCache fix_sv_position=0 [Hunting] hunting=1 marking_mode=0 mark_snapshot=2 reload_config=no_modifiers VK_F10 toggle_hunting=no_modifiers VK_NUMPAD0 next_pixelshader=no_modifiers VK_NUMPAD2 previous_pixelshader=no_modifiers VK_NUMPAD1 mark_pixelshader=no_modifiers VK_NUMPAD3 take_screenshot=no_modifiers VK_SNAPSHOT next_indexbuffer=no_modifiers VK_NUMPAD8 previous_indexbuffer=no_modifiers VK_NUMPAD7 mark_indexbuffer=no_modifiers VK_NUMPAD9 next_vertexshader=no_modifiers VK_NUMPAD5 previous_vertexshader=no_modifiers VK_NUMPAD4 mark_vertexshader=no_modifiers VK_NUMPAD6 next_rendertarget=no_modifiers VK_MULTIPLY previous_rendertarget=no_modifiers VK_DIVIDE mark_rendertarget=no_modifiers VK_SUBTRACT done_hunting=no_modifiers VK_ADD reload_fixes=no_modifiers VK_F10 show_original=no_modifiers VK_F9 analyse_options=log dump_rt_jps clear_rt repeat_rate=6 [KeyChange3DVision2SBSOutputMode] type=cycle Cycle 1: x7=1 Cycle 2: x7=2 Cycle 3: x7=3 Cycle 4: x7=4 Cycle 5: x7=5 Cycle 6: x7=6 Cycle 7: x7=7 Cycle 8: x7=0 Key=no_modifiers F11 [Resource3DVision2SBSBackupTexture] [Resource3DVisionUpscaleBackupTexture] [customshader3dvision2sbs] vs=ShaderFixes/3dvision2sbsvs.hlsl hs=null ds=null gs=null ps=ShaderFixes/3dvision2sbsps.hlsl blend=disable cull=none topology=triangle_strip o1=null o2=null o3=null o4=null o5=null o6=null o7=null od=null o0=set_viewport no_view_cache bb resource3dvision2sbsbackuptexture=reference ps-t100 ps-t100=stereo2mono bb draw=4, 0 post ps-t100=reference resource3dvision2sbsbackuptexture [customshaderupscale] vs=ShaderFixes/upscalevs.hlsl hs=null ds=null gs=null ps=ShaderFixes/upscaleps.hlsl blend=disable cull=none topology=triangle_strip sampler=anisotropic_filter o1=null o2=null o3=null o4=null o5=null o6=null o7=null od=null o0=set_viewport bb resource3dvisionupscalebackuptexture=reference ps-t101 ps-t101=f_bb draw=4, 0 post ps-t101=reference resource3dvisionupscalebackuptexture [Present] [Constants] x7=0.00 [Profile] Hooked_LoadLibraryExW switching to original dll: original_nvapi64.dll to C:\Windows\system32\nvapi64.dll. NVIDIA driver version 384.94 (branch r384_00) Looking up profiles related to F:\Games\Origin\Battlefield 1\bf1.exe ----------- Driver profile settings ----------- BaseProfile "Base Profile" SelectedGlobalProfile "Base Profile" Profile "Base Profile" ShowOn All Setting ID_0x005a375c = 0x96861077 UserSpecified=true // Vertical Sync Tear Control Setting ID_0x00a879cf = 0x60925292 UserSpecified=true // Vertical Sync Setting ID_0x101ae763 = 0x00000000 UserSpecified=true // Flag to control smooth AFR behavior Setting ID_0x10834fee = 0x00000000 UserSpecified=true // Frame Rate Limiter Setting ID_0x10a879ac = 0x00000004 UserSpecified=true // G-SYNC Setting ID_0x10a879cf = 0x00000004 UserSpecified=true // G-SYNC Setting ID_0x1194f158 = 0x00000000 UserSpecified=true // Enable G-SYNC globally Setting ID_0x80303a19 = 0x00000001 Setting ID_0x80857a28 = 0x00000001 Setting ID_0x809d5f60 = 0x00000001 EndProfile Profile "Battlefield 1" ShowOn GeForce Executable "bf1.exe" Executable "tunguska.main_win64_final.exe" Executable "bf1_cte.exe" Executable "bf1trial.exe" Executable "tunguska.main_win64_release.exe" Setting ID_0x0019bb68 = 0x00000001 UserSpecified=true // Texture filtering - Negative LOD bias Setting ID_0x005a375c = 0x96861077 UserSpecified=true // Vertical Sync Tear Control Setting ID_0x005f5a32 = 0x00000000 UserSpecified=true Setting ID_0x007ba09e = 0x00000001 UserSpecified=true // Maximum pre-rendered frames Setting ID_0x0084cd70 = 0x00000000 UserSpecified=true // Texture filtering - Anisotropic filter optimization Setting ID_0x00a06746 = 0x00110000 Setting ID_0x00a06946 = 0x080116f5 Setting ID_0x00a879cf = 0x60925292 UserSpecified=true // Vertical Sync Setting ID_0x00c96f61 = 0x0000000f Setting ID_0x00d98f93 = 0x00000010 Setting ID_0x00e73211 = 0x00000000 UserSpecified=true // Texture filtering - Anisotropic sample optimization Setting ID_0x00f713bc = 0x00000340 Setting ID_0x10115c8b = 0x0000003c // Quiet Mode Application FPS Setting ID_0x101ae763 = 0x00000000 UserSpecified=true // Flag to control smooth AFR behavior Setting ID_0x101e61a9 = 0x00000010 UserSpecified=true // Anisotropic filtering setting Setting ID_0x1033cec2 = 0x00000002 // NVIDIA predefined SLI mode on DirectX 10 Setting ID_0x1033dcd3 = 0x00000004 // NVIDIA predefined number of GPUs to use on SLI rendering mode on DirectX 10 Setting ID_0x1034cb89 = 0x00000000 // NVIDIA Predefined FXAA Usage Setting ID_0x106d5cff = 0x00000000 // Do not display this profile in the Control Panel Setting ID_0x10d2bb16 = 0x00000001 UserSpecified=true // Anisotropic filtering mode Setting ID_0x10ecdb82 = 0x00000005 // Antialiasing - Behavior Flags Setting ID_0x10f9dc81 = 0x00000011 // Enable application for Optimus Setting ID_0x200aebfc = 0x00000000 UserSpecified=true Setting ID_0x208e55e3 = 0x00000001 UserSpecified=true // Maximum frames allowed Setting ID_0x20c1221e = 0x00000000 UserSpecified=true // Threaded optimization Setting ID_0x701eb457 = 0x00000001 // StereoProfile Setting ID_0x702442fc = 0x00004000 // StereoFlagsDX10 SettingString ID_0x7049c7ec = "5" // Value SettingString ID_0x704d456e = "Some objects render at wrong depth. Some effects render incorrectly." // Comments SettingString ID_0x7051e5f5 = "5" // Compat Setting ID_0x7058b6e1 = 0x00000001 UserSpecified=true // LaserSight Setting ID_0x707f4b45 = 0x00000000 UserSpecified=true // StereoMemoEnabled Setting ID_0x708db8c5 = 0x3f520848 UserSpecified=true // StereoConvergence = 0.820438862 Setting ID_0x708db8c6 = 0x00000000 UserSpecified=true // StereoVRConvergenceBias Setting ID_0x709a1ddf = 0x00000001 // StereoCutoff Setting ID_0x709adada = 0x10000102 UserSpecified=true // 2DDHUDSettings Setting ID_0x709adadb = 0x3f64e1ac UserSpecified=true // 2DDConvergence = 0.89406848 Setting ID_0x709adadd = 0x00000000 UserSpecified=true // Disable2DD Setting ID_0x70ad05c8 = 0x59b55a1e UserSpecified=true // Time SettingString ID_0x70b5603f = "d3d" // API Setting ID_0x70edb381 = 0x00000023 // StereoTextureEnable Setting ID_0x809d5f60 = 0x08000001 EndProfile ----------- End driver profile settings ----------- No profile update required *** D3D11 DLL successfully initialized. *** Trying to load original_d3d11.dll Hooked_LoadLibraryExW switching to original dll: original_d3d11.dll to C:\Windows\system32\d3d11.dll. Hooked_CreateDXGIFactory1 called with riid: IDXGIFactory1 calling original CreateDXGIFactory1 API CreateDXGIFactory1 returned factory = 000000000331D770, result = 0 new HackerDXGIFactory1(class HackerDXGIFactory1@000000000330C400) wrapped 000000000331D770 HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000000330C400) adapter 0 requested created HackerDXGIAdapter wrapper = 000000000330C460 of 000000002B3939A0 returns result = 0 HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000000330C460) called returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672 HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000000330C400) adapter 1 requested created HackerDXGIAdapter wrapper = 000000000330C4C0 of 0000000003334570 returns result = 0 HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000000330C4C0) called returns adapter: Microsoft Basic Render Driver, sysmem=0, vidmem=0 HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000000330C400) adapter 2 requested returns result = 0x887a0002 HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000000330C460) called returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672 HackerUnknown::AddRef(class HackerDXGIAdapter@000000000330C460), counter=2, this=000000000330C460 Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000000330C460) called: output #0 requested returns result = 0, handle = 0000000003318100 HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000000330C460) called: output #1 requested returns result = 0, handle = 0000000003318100 HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000000330C460) called: output #2 requested returns result = 0, handle = 0000000003318100 HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000000330C460) called: output #3 requested returns result = 887a0002, handle = 0000000000000000 *** D3D11CreateDevice called with pAdapter = 000000000330C460 Flags = 0x80 pFeatureLevels = 0xb100 FeatureLevels = 1 ppDevice = 0000000026BCF558 pFeatureLevel = 0xa000 ppImmediateContext = 0000000026BCF560 ->Feature level forced to 11.0: 0xb000 HackerDXGIAdapter1::GetDesc1(class HackerDXGIAdapter1@000000000330D0C0) called returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672, flags=0 HackerUnknown::Release(class HackerDXGIAdapter1@000000000330D0C0), counter=2, this=000000000330D0C0 HackerDXGIObject::GetPrivateData(class HackerDXGIAdapter@000000000330C460) called with GUID: {1D6AD054-FB2F-4000-B3AB-E873A9131A7C} returns result = 887a0002 HackerUnknown::AddRef(class HackerDXGIAdapter@000000000330C460), counter=3, this=000000000330C460 Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. Hooked_CreateDXGIFactory called with riid: IDXGIFactory calling original CreateDXGIFactory API CreateDXGIFactory1 returned factory = 000000002BB5BCC0, result = 0 new HackerDXGIFactory1(class HackerDXGIFactory1@000000002BB1E060) wrapped 000000002BB5BCC0 HackerDXGIFactory::QueryInterface(class HackerDXGIFactory1@000000002BB1E060) called with IID: IDXGIFactory2 *** returns E_NOINTERFACE as error for IDXGIFactory2. HackerUnknown::Release(class HackerDXGIFactory1@000000002BB1E060), counter=1, this=000000002BB1E060 Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. HackerDXGIObject::GetPrivateData(class HackerDXGIAdapter@000000000330C460) called with GUID: {D722FB4D-7A68-437A-B20C-5804EE2494A6} returns result = 887a0002 HackerUnknown::Release(class HackerDXGIAdapter@000000000330C460), counter=5, this=000000000330C460 D3D11CreateDevice returned device handle = 000000000346DA70, context handle = 0000000003432B88 HackerDevice 000000002B69D140 created to wrap 000000000346DA70 HackerContext 000000002C24DB90 created to wrap 0000000003432B88 HackerDevice::Create3DMigotoResources(class HackerDevice@000000002B69D140) called. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. created NVAPI stereo handle. Handle = 000000002B9DF680 creating stereo parameter texture. stereo texture created, handle = 000000002BF69CA0 creating stereo parameter resource view. stereo texture resource view created, handle = 000000002C1A4EA8. creating .ini constant par[/code]
I checked but it still crashes.
Is the log useful? if I upload it?


D3D11 DLL starting init - v 1.2.64 - Sun Sep 10 18:46:31 2017


----------- d3dx.ini settings -----------
[Logging]
calls=1
WARNING: Duplicate section found in d3dx.ini: [Profile]
input=1
debug=0
unbuffered=0
force_cpu_affinity=0
[System]
allow_dxgi1_2=0
allow_check_interface=0
allow_create_device=2
allow_platform_update=0
[Device]
upscaling=0
full_screen=0
force_stereo=0
get_resolution_from=swap_chain
[Stereo]
automatic_mode=0
create_profile=0
force_no_nvapi=0
[Rendering]
shader_hash=3dmigoto
cache_shaders=0
use_criticalsection=1
rasterizer_disable_scissor=1
export_fixed=0
export_shaders=0
export_hlsl=0
dump_usage=1
stereo_params=125
ini_params=120
override_directory=F:\Games\Origin\Battlefield 1\ShaderFixes
cache_directory=F:\Games\Origin\Battlefield 1\ShaderCache
fix_sv_position=0
[Hunting]
hunting=1
marking_mode=0
mark_snapshot=2
reload_config=no_modifiers VK_F10
toggle_hunting=no_modifiers VK_NUMPAD0
next_pixelshader=no_modifiers VK_NUMPAD2
previous_pixelshader=no_modifiers VK_NUMPAD1
mark_pixelshader=no_modifiers VK_NUMPAD3
take_screenshot=no_modifiers VK_SNAPSHOT
next_indexbuffer=no_modifiers VK_NUMPAD8
previous_indexbuffer=no_modifiers VK_NUMPAD7
mark_indexbuffer=no_modifiers VK_NUMPAD9
next_vertexshader=no_modifiers VK_NUMPAD5
previous_vertexshader=no_modifiers VK_NUMPAD4
mark_vertexshader=no_modifiers VK_NUMPAD6
next_rendertarget=no_modifiers VK_MULTIPLY
previous_rendertarget=no_modifiers VK_DIVIDE
mark_rendertarget=no_modifiers VK_SUBTRACT
done_hunting=no_modifiers VK_ADD
reload_fixes=no_modifiers VK_F10
show_original=no_modifiers VK_F9
analyse_options=log dump_rt_jps clear_rt
repeat_rate=6
[KeyChange3DVision2SBSOutputMode]
type=cycle
Cycle 1: x7=1
Cycle 2: x7=2
Cycle 3: x7=3
Cycle 4: x7=4
Cycle 5: x7=5
Cycle 6: x7=6
Cycle 7: x7=7
Cycle 8: x7=0
Key=no_modifiers F11
[Resource3DVision2SBSBackupTexture]
[Resource3DVisionUpscaleBackupTexture]
[customshader3dvision2sbs]
vs=ShaderFixes/3dvision2sbsvs.hlsl
hs=null
ds=null
gs=null
ps=ShaderFixes/3dvision2sbsps.hlsl
blend=disable
cull=none
topology=triangle_strip
o1=null
o2=null
o3=null
o4=null
o5=null
o6=null
o7=null
od=null
o0=set_viewport no_view_cache bb
resource3dvision2sbsbackuptexture=reference ps-t100
ps-t100=stereo2mono bb
draw=4, 0
post ps-t100=reference resource3dvision2sbsbackuptexture
[customshaderupscale]
vs=ShaderFixes/upscalevs.hlsl
hs=null
ds=null
gs=null
ps=ShaderFixes/upscaleps.hlsl
blend=disable
cull=none
topology=triangle_strip
sampler=anisotropic_filter
o1=null
o2=null
o3=null
o4=null
o5=null
o6=null
o7=null
od=null
o0=set_viewport bb
resource3dvisionupscalebackuptexture=reference ps-t101
ps-t101=f_bb
draw=4, 0
post ps-t101=reference resource3dvisionupscalebackuptexture
[Present]
[Constants]
x7=0.00
[Profile]

Hooked_LoadLibraryExW switching to original dll: original_nvapi64.dll to C:\Windows\system32\nvapi64.dll.
NVIDIA driver version 384.94 (branch r384_00)

Looking up profiles related to F:\Games\Origin\Battlefield 1\bf1.exe
----------- Driver profile settings -----------
BaseProfile "Base Profile"
SelectedGlobalProfile "Base Profile"

Profile "Base Profile"
ShowOn All
Setting ID_0x005a375c = 0x96861077 UserSpecified=true // Vertical Sync Tear Control
Setting ID_0x00a879cf = 0x60925292 UserSpecified=true // Vertical Sync
Setting ID_0x101ae763 = 0x00000000 UserSpecified=true // Flag to control smooth AFR behavior
Setting ID_0x10834fee = 0x00000000 UserSpecified=true // Frame Rate Limiter
Setting ID_0x10a879ac = 0x00000004 UserSpecified=true // G-SYNC
Setting ID_0x10a879cf = 0x00000004 UserSpecified=true // G-SYNC
Setting ID_0x1194f158 = 0x00000000 UserSpecified=true // Enable G-SYNC globally
Setting ID_0x80303a19 = 0x00000001
Setting ID_0x80857a28 = 0x00000001
Setting ID_0x809d5f60 = 0x00000001
EndProfile

Profile "Battlefield 1"
ShowOn GeForce
Executable "bf1.exe"
Executable "tunguska.main_win64_final.exe"
Executable "bf1_cte.exe"
Executable "bf1trial.exe"
Executable "tunguska.main_win64_release.exe"
Setting ID_0x0019bb68 = 0x00000001 UserSpecified=true // Texture filtering - Negative LOD bias
Setting ID_0x005a375c = 0x96861077 UserSpecified=true // Vertical Sync Tear Control
Setting ID_0x005f5a32 = 0x00000000 UserSpecified=true
Setting ID_0x007ba09e = 0x00000001 UserSpecified=true // Maximum pre-rendered frames
Setting ID_0x0084cd70 = 0x00000000 UserSpecified=true // Texture filtering - Anisotropic filter optimization
Setting ID_0x00a06746 = 0x00110000
Setting ID_0x00a06946 = 0x080116f5
Setting ID_0x00a879cf = 0x60925292 UserSpecified=true // Vertical Sync
Setting ID_0x00c96f61 = 0x0000000f
Setting ID_0x00d98f93 = 0x00000010
Setting ID_0x00e73211 = 0x00000000 UserSpecified=true // Texture filtering - Anisotropic sample optimization
Setting ID_0x00f713bc = 0x00000340
Setting ID_0x10115c8b = 0x0000003c // Quiet Mode Application FPS
Setting ID_0x101ae763 = 0x00000000 UserSpecified=true // Flag to control smooth AFR behavior
Setting ID_0x101e61a9 = 0x00000010 UserSpecified=true // Anisotropic filtering setting
Setting ID_0x1033cec2 = 0x00000002 // NVIDIA predefined SLI mode on DirectX 10
Setting ID_0x1033dcd3 = 0x00000004 // NVIDIA predefined number of GPUs to use on SLI rendering mode on DirectX 10
Setting ID_0x1034cb89 = 0x00000000 // NVIDIA Predefined FXAA Usage
Setting ID_0x106d5cff = 0x00000000 // Do not display this profile in the Control Panel
Setting ID_0x10d2bb16 = 0x00000001 UserSpecified=true // Anisotropic filtering mode
Setting ID_0x10ecdb82 = 0x00000005 // Antialiasing - Behavior Flags
Setting ID_0x10f9dc81 = 0x00000011 // Enable application for Optimus
Setting ID_0x200aebfc = 0x00000000 UserSpecified=true
Setting ID_0x208e55e3 = 0x00000001 UserSpecified=true // Maximum frames allowed
Setting ID_0x20c1221e = 0x00000000 UserSpecified=true // Threaded optimization
Setting ID_0x701eb457 = 0x00000001 // StereoProfile
Setting ID_0x702442fc = 0x00004000 // StereoFlagsDX10
SettingString ID_0x7049c7ec = "5" // Value
SettingString ID_0x704d456e = "Some objects render at wrong depth. Some effects render incorrectly." // Comments
SettingString ID_0x7051e5f5 = "5" // Compat
Setting ID_0x7058b6e1 = 0x00000001 UserSpecified=true // LaserSight
Setting ID_0x707f4b45 = 0x00000000 UserSpecified=true // StereoMemoEnabled
Setting ID_0x708db8c5 = 0x3f520848 UserSpecified=true // StereoConvergence = 0.820438862
Setting ID_0x708db8c6 = 0x00000000 UserSpecified=true // StereoVRConvergenceBias
Setting ID_0x709a1ddf = 0x00000001 // StereoCutoff
Setting ID_0x709adada = 0x10000102 UserSpecified=true // 2DDHUDSettings
Setting ID_0x709adadb = 0x3f64e1ac UserSpecified=true // 2DDConvergence = 0.89406848
Setting ID_0x709adadd = 0x00000000 UserSpecified=true // Disable2DD
Setting ID_0x70ad05c8 = 0x59b55a1e UserSpecified=true // Time
SettingString ID_0x70b5603f = "d3d" // API
Setting ID_0x70edb381 = 0x00000023 // StereoTextureEnable
Setting ID_0x809d5f60 = 0x08000001
EndProfile

----------- End driver profile settings -----------
No profile update required

*** D3D11 DLL successfully initialized. ***

Trying to load original_d3d11.dll
Hooked_LoadLibraryExW switching to original dll: original_d3d11.dll to C:\Windows\system32\d3d11.dll.
Hooked_CreateDXGIFactory1 called with riid: IDXGIFactory1
calling original CreateDXGIFactory1 API
CreateDXGIFactory1 returned factory = 000000000331D770, result = 0
new HackerDXGIFactory1(class HackerDXGIFactory1@000000000330C400) wrapped 000000000331D770
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000000330C400) adapter 0 requested
created HackerDXGIAdapter wrapper = 000000000330C460 of 000000002B3939A0
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000000330C460) called
returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000000330C400) adapter 1 requested
created HackerDXGIAdapter wrapper = 000000000330C4C0 of 0000000003334570
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000000330C4C0) called
returns adapter: Microsoft Basic Render Driver, sysmem=0, vidmem=0
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000000330C400) adapter 2 requested
returns result = 0x887a0002
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000000330C460) called
returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672
HackerUnknown::AddRef(class HackerDXGIAdapter@000000000330C460), counter=2, this=000000000330C460
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000000330C460) called: output #0 requested
returns result = 0, handle = 0000000003318100
HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000000330C460) called: output #1 requested
returns result = 0, handle = 0000000003318100
HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000000330C460) called: output #2 requested
returns result = 0, handle = 0000000003318100
HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000000330C460) called: output #3 requested
returns result = 887a0002, handle = 0000000000000000


*** D3D11CreateDevice called with
pAdapter = 000000000330C460
Flags = 0x80
pFeatureLevels = 0xb100
FeatureLevels = 1
ppDevice = 0000000026BCF558
pFeatureLevel = 0xa000
ppImmediateContext = 0000000026BCF560
->Feature level forced to 11.0: 0xb000
HackerDXGIAdapter1::GetDesc1(class HackerDXGIAdapter1@000000000330D0C0) called
returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672, flags=0
HackerUnknown::Release(class HackerDXGIAdapter1@000000000330D0C0), counter=2, this=000000000330D0C0
HackerDXGIObject::GetPrivateData(class HackerDXGIAdapter@000000000330C460) called with GUID: {1D6AD054-FB2F-4000-B3AB-E873A9131A7C}
returns result = 887a0002
HackerUnknown::AddRef(class HackerDXGIAdapter@000000000330C460), counter=3, this=000000000330C460
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Hooked_CreateDXGIFactory called with riid: IDXGIFactory
calling original CreateDXGIFactory API
CreateDXGIFactory1 returned factory = 000000002BB5BCC0, result = 0
new HackerDXGIFactory1(class HackerDXGIFactory1@000000002BB1E060) wrapped 000000002BB5BCC0
HackerDXGIFactory::QueryInterface(class HackerDXGIFactory1@000000002BB1E060) called with IID: IDXGIFactory2
*** returns E_NOINTERFACE as error for IDXGIFactory2.
HackerUnknown::Release(class HackerDXGIFactory1@000000002BB1E060), counter=1, this=000000002BB1E060
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
HackerDXGIObject::GetPrivateData(class HackerDXGIAdapter@000000000330C460) called with GUID: {D722FB4D-7A68-437A-B20C-5804EE2494A6}
returns result = 887a0002
HackerUnknown::Release(class HackerDXGIAdapter@000000000330C460), counter=5, this=000000000330C460
D3D11CreateDevice returned device handle = 000000000346DA70, context handle = 0000000003432B88
HackerDevice 000000002B69D140 created to wrap 000000000346DA70
HackerContext 000000002C24DB90 created to wrap 0000000003432B88
HackerDevice::Create3DMigotoResources(class HackerDevice@000000002B69D140) called.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
created NVAPI stereo handle. Handle = 000000002B9DF680
creating stereo parameter texture.
stereo texture created, handle = 000000002BF69CA0
creating stereo parameter resource view.
stereo texture resource view created, handle = 000000002C1A4EA8.
creating .ini constant par

Intel i7 2600k @4,5ghz
ASUS GTX 1080 Strix
DDR3 4x4gb
TV LG OLED65E6V
Projector Benq W1300
Windows 10 64bits

Posted 09/10/2017 03:44 PM   
Ok, that's a different bug, so the fix for that won't make it in for 1.2.65 because I literally just released it a few minutes ago ;-) Can you grab that log again with unbuffered=1?
Ok, that's a different bug, so the fix for that won't make it in for 1.2.65 because I literally just released it a few minutes ago ;-)

Can you grab that log again with unbuffered=1?

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 09/10/2017 09:34 PM   
[center][color="orange"][size="XL"]3Dmigoto 1.2.65[/size][/color][/center][center][color="green"][url]https://github.com/bo3b/3Dmigoto/releases[/url][/color][/center] This release of 3DMigoto (and 1.2.64 before it) is aimed at supporting everything that I needed for Dreamfall Chapters Final Cut. It is probably the single largest update to 3DMigoto in the 1.2.x series, adding thousands of lines of code, dozens of new features and numerous bug fixes :) [size="L"][color="green"]Software Mouse Cursor[/color][/size] This release adds a software mouse cursor that can work with the SBS/TB output modes and supports an adjustable depth. This can be enabled by uncommenting the relevant run line in the [Present] section, and enabling hide_cursor to suppress the hardware mouse cursor (these are technically two separate features, but usually you would use them together). The software cursor will behave just like the regular hardware cursor, using the same cursor image set by the game or through the Windows control panel, including support for animated and colour inverted cursors. It will automatically hide and show itself just as the hardware cursor would, and even works correctly in Windowed mode. It can also work in conjunction with the upscaling feature, though note that there are general unresolved issues with the mouse and upscaling in some games, so your mileage may vary. The software cursor is positioned by the provided mousevs.hlsl custom shader, which can be edited to adjust the cursor's depth to whatever is most suitable for the game in question. The CustomShader section in the d3dx.ini can be edited to enable passing in additional state to the shader, such as passing in a depth buffer to have the cursor line up with whatever object it rests on. Related to this, there are also some new inputs you can assign to ini params to pass to shaders. cursor_x and cursor_y are generally the most useful as they will give you the mouse cursor position with 0 being the top left of the game window and 1 being the bottom right. From there it should be easy to use them to sample a texture or scale them to the range -1:+1 to match clip space coordinates. cursor_window_x/y is also available (and used by the software mouse shader), but that is in pixels and would usually need to be scaled using the new window_width and window_height. As a reminder, cursor_screen_x/y already existed in 3DMigoto, but you should really swap to using cursor_x/y or cursor_window_x/y. [size="L"][color="green"]Texture Filtering Updates (New depth buffer filtering support, testing for unbound, etc)[/color][/size] Texture filtering and checktextureoverride now both accept all the same targets that can be used in resource copying, such as the depth buffer (oD), render targets (o0 through o7), UAVs (cs-u0), etc. so long as 3DMigoto hashes them (currently 2D and 3D textures, not buffers). The texture filtering support can now distinguish between a resource that is not bound and one that is bound but has no matching [TextureOverride] section. The resulting value will be: - Has matching [TextureOverride] with a filter_index: Use the value of filter_index - Has matching [TextureOverride] with no filter_index: 1.0 - Does not have a matching [TextureOverride]: 0.0 - No resource bound: -0.0 That is, if no resource is bound the texture filter will now return *negative zero*. This is backwards compatible with existing code that is only testing for a matching TextureOverride section since negative zero is considered equal to positive zero. To explicitly test for an unbound resource in a shader use the following code: [code] if (asint(IniParams[0].x) == asint(-0.0)) { /* no resource bound */ } else { /* resource is bound */ } [/code] Or in assembly: [code] ld_indexable(texture1d)(float,float,float,float) r1.x, l(0, 0, 0, 0), t120.xyzw ieq r1.x, r1.x, l(0x80000000) if_nz r1.x ... endif [/code] This effectively deprecates the old depth_filter, since this can achieve the same thing as it and offers more flexibility. I'm not going to schedule depth_filter to be removed at this stage since I know it is in use, but future fixes should use this new support instead. [size="L"][color="green"]Preset Improvements + Fixes[/color][/size] Presets can now be activated from any command list, which most interestingly allows them to be activated when a given texture is active in the scene. e.g. I use this in Dreamfall Chapters to lower the convergence and simultaneously adjust the mouse cursor depth (x2) whenever an inventory item is being examined or first picked up (I've seen the exact same right up in your face inventory problem in other Unity games as well that could benefit from this): [code] [ShaderOverrideHUDSettingsAndInventory] hash = bab4f74d620346c8 ; Check for the inventory texture to activate a low convergence preset: checktextureoverride = ps-t0 [TextureOverrideInventoryExamineCircles] hash = b98c5309 preset = PresetExamineInventory [PresetExamineInventory] convergence = 0.5 x2 = 0.475 transition = 400 transition_type = cosine release_transition = 300 release_transition_type = cosine [/code] As before, the preset must continue to be triggered at least once per frame to remain active. There have also been some changes to allow multiple presets to be activated simultaneously, and fixes to correctly restore the previous values (as was needed for x2 in the above example - this now uses the same restore code as the key binding overrides). The preset= line will now accept the preset name either with or without the "Preset" prefix. [size="L"][color="green"]Depth/Stencil state overrides[/color][/size] CustomShader sections now includes the following settings to set the depth/stencil state. As oomek noticed, I use these in the Dreamfall Chapters fix to write depth information for transparent objects to a secondary depth buffer using the original vertex shader and the pixel shader disabled so that I can take them into account for the HUD depth. The naming of these settings follows their names in DirectX (with common prefix stripped): [code] depth_enable = 1 | 0 depth_write_mask = all | zero depth_func = <comparison_func> stencil_enable = 1 | 0 stencil_read_mask = 0xff stencil_write_mask = 0xff stencil_front = <comparison_func> <both_pass_op> <depth_fail_op> <stencil_fail_op> stencil_back = <comparison_func> <both_pass_op> <depth_fail_op> <stencil_fail_op> stencil_ref = integer depth_stencil_state_merge = 1 | 0 Where comparison_func is one of: never, less, equal, less_equal, greater, not_equal, greater_equal, always And the stencil pass/fail ops are one of: keep, zero, replace, incr_sat, decr_sat, invert, incr, decr [/code] [size="L"][color="green"]Depth/Stencil, Rasterizer and Output Merger state merge support[/color][/size] The Depth/stencil, rasterizer and output merger states can now be merged with the state from the game rather than replacing it. e.g. this could be used to set depth_write_mask=all without changing depth_enable or depth_func from the game. The options to enable this are blend_state_merge=1, rasterizer_state_merge=1 and depth_stencil_state_merge=1. These options can only be used in CustomShader sections, but as has been mentioned previously these sections can be used to change state in an existing draw call by not specifying any shaders in the section and using 'handling=skip' and 'draw=from_caller' [size="L"][color="green"]Resetting per-frame copy/execution limits on render/depth target clears[/color][/size] The d3dx.ini adds two new sections: [ClearRenderTargetView] and [ClearDepthTargetView] These are both command list sections that function much the same as the [Present] section, allowing commands to be executed whenever the game clears a render target or depth buffer, which may signify the start of a new scene or effect being rendered mid-frame. These can be used in conjunction with the new reset_per_frame_limits command to reset the limit counter on [Resource] and [CustomShader] sections so that they will be able to be used again in the next scene. e.g. in Dreamfall Chapters (and now my Unity template) I do this to grab the matrices and depth buffers once per scene per frame, which turned out to be critical to fix lighting and light shafts in some cutscenes late into the game: [code] [ClearDepthStencilView] reset_per_frame_limits = CustomShader_Inverse_Unity_MVP reset_per_frame_limits = Resource_UnityPerCameraRare reset_per_frame_limits = Resource_UnityPerCamera reset_per_frame_limits = Resource_UnityPerDraw reset_per_frame_limits = Resource_CameraDepthTexture [/code] [size="L"][color="green"]Assembler can now parse signature comment blocks[/color][/size] The parser I wrote some time back for cmd_Decompiler to parse the Input / Output / Patch Constant signature comment blocks in assembly shaders is now hooked up in 3DMigoto to reliably allow adding new inputs and outputs to shaders. This is enabled with assemble_signature_comments=1 in the d3dx.ini so that it won't risk impacting any existing fix if these comments had been altered in a way that it cannot understand. My asmtool.py will modify these comment blocks (and add the corresponding dcl_input_ps) for the Unity lighting fix to pass the FOV from the vertex shader in the same way as the equivelent pattern in hlsltool.py [size="L"][color="green"]allow_duplicate_hash[/color][/size] ShaderOverride sections may now specify "allow_duplicate_hash=1" to allow multiple sections to use the same hash. This is primarily intended to allow sections generated by script to coexist with manually added sections that might sometimes cover the same shader, but may also be useful to organise the d3dx.ini into logical sections. Command list commands will be merged together, though you should not rely on the order of commands between the sections, because it is not obvious and could change. The setting must be included in every section with a duplicate hash to protect against inadvertently adding a new section with a duplicate hash, and the section names must still be unique to protect against scripts adding the same section multiple times. [size="L"][color="green"]New Handling=abort command[/color][/size] This new command will bail out of any currently running command lists. This can be used in conjunction with checktextureoverride to abort a command list if a blacklisted texture/depth buffer/render target is in use. I went down the path of using this in Dreamfall Chapters for a while to blacklist handling transparent objects rendered to a known bad depth buffer, but ended up switching to a whilelist later on where the CustomShader was run from the TextureOverride instead. [size="L"][color="green"]Handling=skip improvements[/color][/size] Handling=skip is now a command list command, meaning it can be placed in any command list or custom shader, and will skip the original draw call from the game (if applicable... if not, why are you doing that?). This is a convenience feature, e.g. so that a whole group of related ShaderOverride sections can call a command list and handling=skip can be added once in that command list (e.g. in Dreamfall Chapters I used this to entirely disable all volumetric light shaft shaders from one spot... until I later cracked the effect and re-enabled them). It is also useful to place it in a CustomShader section that is being used to replace the draw call from the game in conjunction with draw=from_caller since the two are logically related. [size="L"][color="green"]Resource cache pool to eliminate logging floods[/color][/size] Performing full copies of multiple resources with differing descriptions into a single [Resource] section or to any target using the exact same copy command will now cache all the resources copy targets instead of destroying the previous cache and recreating it. This eliminates the "Recreating cached resource" log flood we see in some circumstances (e.g. WATCH_DOGS2), and eliminates the flood of messages if a custom resource could not be created for any reason. [size="L"][color="green"]Upscaling Updates[/color][/size] I might let ColAngel talk about this since it's his feature. Among the improvements I helped out on are some fixes to how the mouse cursor lines up with the game (our aim is to make both hardware and software cursors work, though in some cases the software cursor may work better). There's still problems in some games and this feature is very much in flux. Do let us know if there is any games that worked better with upscaling before this update. [size="XL"][color="orange"]BUG FIXES[/color][/size] - Fix crash on missing [Profile] or [Present] sections introduced in 1.2.64 - Fix texture hashes that match the game resolution and res_width/height on games that use D3D11CreateDeviceAndSwapChain - Fix texture hashes that match the game resolution and res_width/height when upscaling is enabled. - Frame analysis log formatting issues - Fix crash trying to use draw=from_caller from a compute shader Dispatch call or [Present] - Fix crash when copying a buffer with unknown or not applicable stride into a view slot - Copying constant buffers into view slots now works properly - Handling=skip no longer skips the post draw command lists and other vitally important post draw state restoration. - stereo2mono will now work correctly when stereo is disabled - it will now wind up with the source copied to both the left and right halves of the target. - Fix crash assigning StereoParams or IniParams from a command list (for some reason this mostly affected Windows 10) - Fix crash and other bad behaviour if a custom shader is missing or fails to compile [size="XL"][color="orange"]NOTICE: There have been a few changes in this release that have the potential to impact on existing fixes[/color][/size] - The hashes of textures/render targets that match the resolution may have changed in games that used the D3D11CreateDeviceAndSwapChain call - these hashes would have been broken anyway on different resolutions. You can comment out the get_resolution_from line in the d3dx.ini to return to the broken hashes if need be. - The old deprecated indexbufferfilter has been removed. I'm not aware of anyone who was using this feature, it was always limited and broken for a long time, and it's functionality can now be replaced by the extensions added to texture filtering in the command list in this update. If you are using it 3DMigoto will warn you that the line is no longer recognised. - There may be some exceedingly rare circumstances where the changes to the resource cache could be noticeable - whenever we would have seen the "recreating cached resource" message before we would have got a new blank resource, but will now reuse an old resource that could potentially still have old stale data in it instead. In most cases this data would have been immediately overwritten (e.g. by the copy itself), but it could be observed if using copy_desc, for example.
3Dmigoto 1.2.65


This release of 3DMigoto (and 1.2.64 before it) is aimed at supporting everything that I needed for Dreamfall Chapters Final Cut. It is probably the single largest update to 3DMigoto in the 1.2.x series, adding thousands of lines of code, dozens of new features and numerous bug fixes :)

Software Mouse Cursor
This release adds a software mouse cursor that can work with the SBS/TB output modes and supports an adjustable depth. This can be enabled by uncommenting the relevant run line in the [Present] section, and enabling hide_cursor to suppress the hardware mouse cursor (these are technically two separate features, but usually you would use them together).

The software cursor will behave just like the regular hardware cursor, using the same cursor image set by the game or through the Windows control panel, including support for animated and colour inverted cursors. It will automatically hide and show itself just as the hardware cursor would, and even works correctly in Windowed mode. It can also work in conjunction with the upscaling feature, though note that there are general unresolved issues with the mouse and upscaling in some games, so your mileage may vary.

The software cursor is positioned by the provided mousevs.hlsl custom shader, which can be edited to adjust the cursor's depth to whatever is most suitable for the game in question. The CustomShader section in the d3dx.ini can be edited to enable passing in additional state to the shader, such as passing in a depth buffer to have the cursor line up with whatever object it rests on.

Related to this, there are also some new inputs you can assign to ini params to pass to shaders. cursor_x and cursor_y are generally the most useful as they will give you the mouse cursor position with 0 being the top left of the game window and 1 being the bottom right. From there it should be easy to use them to sample a texture or scale them to the range -1:+1 to match clip space coordinates. cursor_window_x/y is also available (and used by the software mouse shader), but that is in pixels and would usually need to be scaled using the new window_width and window_height. As a reminder, cursor_screen_x/y already existed in 3DMigoto, but you should really swap to using cursor_x/y or cursor_window_x/y.

Texture Filtering Updates (New depth buffer filtering support, testing for unbound, etc)
Texture filtering and checktextureoverride now both accept all the same targets that can be used in resource copying, such as the depth buffer (oD), render targets (o0 through o7), UAVs (cs-u0), etc. so long as 3DMigoto hashes them (currently 2D and 3D textures, not buffers).

The texture filtering support can now distinguish between a resource that is not bound and one that is bound but has no matching [TextureOverride] section. The resulting value will be:

- Has matching [TextureOverride] with a filter_index: Use the value of filter_index
- Has matching [TextureOverride] with no filter_index: 1.0
- Does not have a matching [TextureOverride]: 0.0
- No resource bound: -0.0

That is, if no resource is bound the texture filter will now return *negative zero*. This is backwards compatible with existing code that is only testing for a matching TextureOverride section since negative zero is considered equal to positive zero. To explicitly test for an unbound resource in a shader use the following code:

if (asint(IniParams[0].x) == asint(-0.0)) {
/* no resource bound */
} else {
/* resource is bound */
}

Or in assembly:
ld_indexable(texture1d)(float,float,float,float) r1.x, l(0, 0, 0, 0), t120.xyzw
ieq r1.x, r1.x, l(0x80000000)
if_nz r1.x
...
endif


This effectively deprecates the old depth_filter, since this can achieve the same thing as it and offers more flexibility. I'm not going to schedule depth_filter to be removed at this stage since I know it is in use, but future fixes should use this new support instead.

Preset Improvements + Fixes
Presets can now be activated from any command list, which most interestingly allows them to be activated when a given texture is active in the scene. e.g. I use this in Dreamfall Chapters to lower the convergence and simultaneously adjust the mouse cursor depth (x2) whenever an inventory item is being examined or first picked up (I've seen the exact same right up in your face inventory problem in other Unity games as well that could benefit from this):

[ShaderOverrideHUDSettingsAndInventory]
hash = bab4f74d620346c8
; Check for the inventory texture to activate a low convergence preset:
checktextureoverride = ps-t0

[TextureOverrideInventoryExamineCircles]
hash = b98c5309
preset = PresetExamineInventory

[PresetExamineInventory]
convergence = 0.5
x2 = 0.475
transition = 400
transition_type = cosine
release_transition = 300
release_transition_type = cosine


As before, the preset must continue to be triggered at least once per frame to remain active.

There have also been some changes to allow multiple presets to be activated simultaneously, and fixes to correctly restore the previous values (as was needed for x2 in the above example - this now uses the same restore code as the key binding overrides). The preset= line will now accept the preset name either with or without the "Preset" prefix.

Depth/Stencil state overrides
CustomShader sections now includes the following settings to set the depth/stencil state. As oomek noticed, I use these in the Dreamfall Chapters fix to write depth information for transparent objects to a secondary depth buffer using the original vertex shader and the pixel shader disabled so that I can take them into account for the HUD depth.

The naming of these settings follows their names in DirectX (with common prefix stripped):
depth_enable = 1 | 0
depth_write_mask = all | zero
depth_func = <comparison_func>
stencil_enable = 1 | 0
stencil_read_mask = 0xff
stencil_write_mask = 0xff
stencil_front = <comparison_func> <both_pass_op> <depth_fail_op> <stencil_fail_op>
stencil_back = <comparison_func> <both_pass_op> <depth_fail_op> <stencil_fail_op>
stencil_ref = integer
depth_stencil_state_merge = 1 | 0

Where comparison_func is one of: never, less, equal, less_equal, greater, not_equal, greater_equal, always
And the stencil pass/fail ops are one of: keep, zero, replace, incr_sat, decr_sat, invert, incr, decr


Depth/Stencil, Rasterizer and Output Merger state merge support
The Depth/stencil, rasterizer and output merger states can now be merged with the state from the game rather than replacing it. e.g. this could be used to set depth_write_mask=all without changing depth_enable or depth_func from the game. The options to enable this are blend_state_merge=1, rasterizer_state_merge=1 and depth_stencil_state_merge=1. These options can only be used in CustomShader sections, but as has been mentioned previously these sections can be used to change state in an existing draw call by not specifying any shaders in the section and using 'handling=skip' and 'draw=from_caller'

Resetting per-frame copy/execution limits on render/depth target clears
The d3dx.ini adds two new sections:

[ClearRenderTargetView]
and
[ClearDepthTargetView]

These are both command list sections that function much the same as the [Present] section, allowing commands to be executed whenever the game clears a render target or depth buffer, which may signify the start of a new scene or effect being rendered mid-frame. These can be used in conjunction with the new reset_per_frame_limits command to reset the limit counter on [Resource] and [CustomShader] sections so that they will be able to be used again in the next scene.

e.g. in Dreamfall Chapters (and now my Unity template) I do this to grab the matrices and depth buffers once per scene per frame, which turned out to be critical to fix lighting and light shafts in some cutscenes late into the game:
[ClearDepthStencilView]
reset_per_frame_limits = CustomShader_Inverse_Unity_MVP
reset_per_frame_limits = Resource_UnityPerCameraRare
reset_per_frame_limits = Resource_UnityPerCamera
reset_per_frame_limits = Resource_UnityPerDraw
reset_per_frame_limits = Resource_CameraDepthTexture


Assembler can now parse signature comment blocks
The parser I wrote some time back for cmd_Decompiler to parse the Input / Output / Patch Constant signature comment blocks in assembly shaders is now hooked up in 3DMigoto to reliably allow adding new inputs and outputs to shaders. This is enabled with assemble_signature_comments=1 in the d3dx.ini so that it won't risk impacting any existing fix if these comments had been altered in a way that it cannot understand.

My asmtool.py will modify these comment blocks (and add the corresponding dcl_input_ps) for the Unity lighting fix to pass the FOV from the vertex shader in the same way as the equivelent pattern in hlsltool.py

allow_duplicate_hash
ShaderOverride sections may now specify "allow_duplicate_hash=1" to allow multiple sections to use the same hash. This is primarily intended to allow sections generated by script to coexist with manually added sections that might sometimes cover the same shader, but may also be useful to organise the d3dx.ini into logical sections. Command list commands will be merged together, though you should not rely on the order of commands between the sections, because it is not obvious and could change. The setting must be included in every section with a duplicate hash to protect against inadvertently adding a new section with a duplicate hash, and the section names must still be unique to protect against scripts adding the same section multiple times.

New Handling=abort command
This new command will bail out of any currently running command lists. This can be used in conjunction with checktextureoverride to abort a command list if a blacklisted texture/depth buffer/render target is in use. I went down the path of using this in Dreamfall Chapters for a while to blacklist handling transparent objects rendered to a known bad depth buffer, but ended up switching to a whilelist later on where the CustomShader was run from the TextureOverride instead.

Handling=skip improvements
Handling=skip is now a command list command, meaning it can be placed in any command list or custom shader, and will skip the original draw call from the game (if applicable... if not, why are you doing that?). This is a convenience feature, e.g. so that a whole group of related ShaderOverride sections can call a command list and handling=skip can be added once in that command list (e.g. in Dreamfall Chapters I used this to entirely disable all volumetric light shaft shaders from one spot... until I later cracked the effect and re-enabled them). It is also useful to place it in a CustomShader section that is being used to replace the draw call from the game in conjunction with draw=from_caller since the two are logically related.

Resource cache pool to eliminate logging floods
Performing full copies of multiple resources with differing descriptions into a single [Resource] section or to any target using the exact same copy command will now cache all the resources copy targets instead of destroying the previous cache and recreating it. This eliminates the "Recreating cached resource" log flood we see in some circumstances (e.g. WATCH_DOGS2), and eliminates the flood of messages if a custom resource could not be created for any reason.

Upscaling Updates
I might let ColAngel talk about this since it's his feature. Among the improvements I helped out on are some fixes to how the mouse cursor lines up with the game (our aim is to make both hardware and software cursors work, though in some cases the software cursor may work better). There's still problems in some games and this feature is very much in flux. Do let us know if there is any games that worked better with upscaling before this update.

BUG FIXES
- Fix crash on missing [Profile] or [Present] sections introduced in 1.2.64
- Fix texture hashes that match the game resolution and res_width/height on games that use D3D11CreateDeviceAndSwapChain
- Fix texture hashes that match the game resolution and res_width/height when upscaling is enabled.
- Frame analysis log formatting issues
- Fix crash trying to use draw=from_caller from a compute shader Dispatch call or [Present]
- Fix crash when copying a buffer with unknown or not applicable stride into a view slot
- Copying constant buffers into view slots now works properly
- Handling=skip no longer skips the post draw command lists and other vitally important post draw state restoration.
- stereo2mono will now work correctly when stereo is disabled - it will now wind up with the source copied to both the left and right halves of the target.
- Fix crash assigning StereoParams or IniParams from a command list (for some reason this mostly affected Windows 10)
- Fix crash and other bad behaviour if a custom shader is missing or fails to compile

NOTICE: There have been a few changes in this release that have the potential to impact on existing fixes

- The hashes of textures/render targets that match the resolution may have changed in games that used the D3D11CreateDeviceAndSwapChain call - these hashes would have been broken anyway on different resolutions. You can comment out the get_resolution_from line in the d3dx.ini to return to the broken hashes if need be.

- The old deprecated indexbufferfilter has been removed. I'm not aware of anyone who was using this feature, it was always limited and broken for a long time, and it's functionality can now be replaced by the extensions added to texture filtering in the command list in this update. If you are using it 3DMigoto will warn you that the line is no longer recognised.

- There may be some exceedingly rare circumstances where the changes to the resource cache could be noticeable - whenever we would have seen the "recreating cached resource" message before we would have got a new blank resource, but will now reuse an old resource that could potentially still have old stale data in it instead. In most cases this data would have been immediately overwritten (e.g. by the copy itself), but it could be observed if using copy_desc, for example.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 09/11/2017 02:45 AM   
Thank you for the update DSS. Software mouse cursor is a very nice and needed addition. I'm sure the other features are also useful but they are beyond my understanding :P Log with unbuffered=1 [code]D3D11 DLL starting init - v 1.2.65 - Mon Sep 11 07:55:22 2017 ----------- d3dx.ini settings ----------- [Logging] calls=1 input=1 debug=0 unbuffered=1 unbuffered return: 0 force_cpu_affinity=0 [System] allow_dxgi1_2=0 allow_check_interface=0 allow_create_device=2 allow_platform_update=0 [Device] upscaling=0 full_screen=0 force_stereo=0 get_resolution_from=swap_chain hide_cursor=0 [Stereo] automatic_mode=0 create_profile=0 force_no_nvapi=0 [Rendering] shader_hash=3dmigoto cache_shaders=0 use_criticalsection=1 rasterizer_disable_scissor=1 assemble_signature_comments=1 export_fixed=0 export_shaders=0 export_hlsl=0 dump_usage=1 stereo_params=125 ini_params=120 override_directory=F:\Games\Origin\Battlefield 1\ShaderFixes cache_directory=F:\Games\Origin\Battlefield 1\ShaderCache fix_sv_position=0 [Hunting] hunting=1 marking_mode=0 mark_snapshot=2 reload_config=no_modifiers VK_F10 toggle_hunting=no_modifiers VK_NUMPAD0 next_pixelshader=no_modifiers VK_NUMPAD2 previous_pixelshader=no_modifiers VK_NUMPAD1 mark_pixelshader=no_modifiers VK_NUMPAD3 take_screenshot=no_modifiers VK_SNAPSHOT next_indexbuffer=no_modifiers VK_NUMPAD8 previous_indexbuffer=no_modifiers VK_NUMPAD7 mark_indexbuffer=no_modifiers VK_NUMPAD9 next_vertexshader=no_modifiers VK_NUMPAD5 previous_vertexshader=no_modifiers VK_NUMPAD4 mark_vertexshader=no_modifiers VK_NUMPAD6 next_rendertarget=no_modifiers VK_MULTIPLY previous_rendertarget=no_modifiers VK_DIVIDE mark_rendertarget=no_modifiers VK_SUBTRACT done_hunting=no_modifiers VK_ADD reload_fixes=no_modifiers VK_F10 show_original=no_modifiers VK_F9 analyse_options=dump_rt_jps clear_rt repeat_rate=6 [KeyChange3DVision2SBSOutputMode] type=cycle Cycle 1: x7=1 Cycle 2: x7=2 Cycle 3: x7=3 Cycle 4: x7=4 Cycle 5: x7=5 Cycle 6: x7=6 Cycle 7: x7=7 Cycle 8: x7=0 Key=no_modifiers F11 [Resource3DVision2SBSBackupTexture] [Resource3DVisionUpscaleBackupTexture] [ResourceSoftwareMouseBackupTexture1] [ResourceSoftwareMouseBackupTexture2] [ResourceSoftwareMouseBackupTexture3] [ResourceSoftwareMouseBackupTexture4] [customshader3dvision2sbs] vs=ShaderFixes/3dvision2sbsvs.hlsl hs=null ds=null gs=null ps=ShaderFixes/3dvision2sbsps.hlsl blend=disable cull=none topology=triangle_strip run=commandlistunbindallrendertargets o0=set_viewport no_view_cache bb resource3dvision2sbsbackuptexture=reference ps-t100 ps-t100=stereo2mono bb vs-t125=stereoparams ps-t125=stereoparams vs-t120=iniparams ps-t120=iniparams draw=4, 0 post ps-t100=reference resource3dvision2sbsbackuptexture [customshaderupscale] vs=ShaderFixes/upscalevs.hlsl hs=null ds=null gs=null ps=ShaderFixes/upscaleps.hlsl blend=disable cull=none topology=triangle_strip sampler=anisotropic_filter run=commandlistunbindallrendertargets o0=set_viewport bb resource3dvisionupscalebackuptexture=reference ps-t101 ps-t101=f_bb draw=4, 0 post ps-t101=reference resource3dvisionupscalebackuptexture [customshadersoftwaremouse] vs=ShaderFixes/mousevs.hlsl hs=null ds=null gs=null ps=ShaderFixes/mouseps.hlsl blend=ADD ONE INV_SRC_ALPHA cull=none topology=triangle_strip run=commandlistunbindallrendertargets o0=set_viewport no_view_cache bb vs-t125=stereoparams ps-t125=stereoparams vs-t120=iniparams ps-t120=iniparams x6=cursor_window_x y6=cursor_window_y z6=cursor_hotspot_x w6=cursor_hotspot_y y7=cursor_showing z7=window_width w7=window_height resourcesoftwaremousebackuptexture1=reference vs-t100 resourcesoftwaremousebackuptexture2=reference vs-t101 resourcesoftwaremousebackuptexture3=reference ps-t100 resourcesoftwaremousebackuptexture4=reference ps-t101 vs-t100=cursor_mask vs-t101=cursor_color ps-t100=cursor_mask ps-t101=cursor_color w5=1 draw=4, 0 run=customshadersoftwaremousebw post vs-t100=reference resourcesoftwaremousebackuptexture1 post vs-t101=reference resourcesoftwaremousebackuptexture2 post ps-t100=reference resourcesoftwaremousebackuptexture3 post ps-t101=reference resourcesoftwaremousebackuptexture4 [customshadersoftwaremousebw] blend=ADD INV_DEST_COLOR SRC_ALPHA w5=2 draw=4, 0 [commandlistunbindallrendertargets] o0=null o1=null o2=null o3=null o4=null o5=null o6=null o7=null od=null [Present] [ClearRenderTargetView] [ClearDepthStencilView] [Constants] x7=0.00 [Profile] Hooked_LoadLibraryExW switching to original dll: original_nvapi64.dll to C:\Windows\system32\nvapi64.dll. NVIDIA driver version 384.94 (branch r384_00) Looking up profiles related to F:\Games\Origin\Battlefield 1\bf1.exe ----------- Driver profile settings ----------- BaseProfile "Base Profile" SelectedGlobalProfile "Base Profile" Profile "Base Profile" ShowOn All Setting ID_0x005a375c = 0x96861077 UserSpecified=true // Vertical Sync Tear Control Setting ID_0x00a879cf = 0x60925292 UserSpecified=true // Vertical Sync Setting ID_0x101ae763 = 0x00000000 UserSpecified=true // Flag to control smooth AFR behavior Setting ID_0x10834fee = 0x00000000 UserSpecified=true // Frame Rate Limiter Setting ID_0x10a879ac = 0x00000004 UserSpecified=true // G-SYNC Setting ID_0x10a879cf = 0x00000004 UserSpecified=true // G-SYNC Setting ID_0x1194f158 = 0x00000000 UserSpecified=true // Enable G-SYNC globally Setting ID_0x80303a19 = 0x00000001 Setting ID_0x80857a28 = 0x00000001 Setting ID_0x809d5f60 = 0x00000001 EndProfile Profile "Battlefield 1" ShowOn GeForce Executable "bf1.exe" Executable "tunguska.main_win64_final.exe" Executable "bf1_cte.exe" Executable "bf1trial.exe" Executable "tunguska.main_win64_release.exe" Setting ID_0x0019bb68 = 0x00000001 UserSpecified=true // Texture filtering - Negative LOD bias Setting ID_0x005a375c = 0x96861077 UserSpecified=true // Vertical Sync Tear Control Setting ID_0x005f5a32 = 0x00000000 UserSpecified=true Setting ID_0x007ba09e = 0x00000001 UserSpecified=true // Maximum pre-rendered frames Setting ID_0x0084cd70 = 0x00000000 UserSpecified=true // Texture filtering - Anisotropic filter optimization Setting ID_0x00a06746 = 0x00110000 Setting ID_0x00a06946 = 0x080116f5 Setting ID_0x00a879cf = 0x60925292 UserSpecified=true // Vertical Sync Setting ID_0x00c96f61 = 0x0000000f Setting ID_0x00d98f93 = 0x00000010 Setting ID_0x00e73211 = 0x00000000 UserSpecified=true // Texture filtering - Anisotropic sample optimization Setting ID_0x00f713bc = 0x00000340 Setting ID_0x10115c8b = 0x0000003c // Quiet Mode Application FPS Setting ID_0x101ae763 = 0x00000000 UserSpecified=true // Flag to control smooth AFR behavior Setting ID_0x101e61a9 = 0x00000010 UserSpecified=true // Anisotropic filtering setting Setting ID_0x1033cec2 = 0x00000002 // NVIDIA predefined SLI mode on DirectX 10 Setting ID_0x1033dcd3 = 0x00000004 // NVIDIA predefined number of GPUs to use on SLI rendering mode on DirectX 10 Setting ID_0x1034cb89 = 0x00000000 // NVIDIA Predefined FXAA Usage Setting ID_0x106d5cff = 0x00000000 // Do not display this profile in the Control Panel Setting ID_0x10d2bb16 = 0x00000001 UserSpecified=true // Anisotropic filtering mode Setting ID_0x10ecdb82 = 0x00000005 // Antialiasing - Behavior Flags Setting ID_0x10f9dc81 = 0x00000011 // Enable application for Optimus Setting ID_0x200aebfc = 0x00000000 UserSpecified=true Setting ID_0x208e55e3 = 0x00000001 UserSpecified=true // Maximum frames allowed Setting ID_0x20c1221e = 0x00000000 UserSpecified=true // Threaded optimization Setting ID_0x701eb457 = 0x00000001 // StereoProfile Setting ID_0x702442fc = 0x00004000 // StereoFlagsDX10 SettingString ID_0x7049c7ec = "5" // Value SettingString ID_0x704d456e = "Some objects render at wrong depth. Some effects render incorrectly." // Comments SettingString ID_0x7051e5f5 = "5" // Compat Setting ID_0x7058b6e1 = 0x00000001 UserSpecified=true // LaserSight Setting ID_0x707f4b45 = 0x00000000 UserSpecified=true // StereoMemoEnabled Setting ID_0x708db8c5 = 0x3f520848 UserSpecified=true // StereoConvergence = 0.820438862 Setting ID_0x708db8c6 = 0x00000000 UserSpecified=true // StereoVRConvergenceBias Setting ID_0x709a1ddf = 0x00000001 // StereoCutoff Setting ID_0x709adada = 0x10000102 UserSpecified=true // 2DDHUDSettings Setting ID_0x709adadb = 0x3f64e1ac UserSpecified=true // 2DDConvergence = 0.89406848 Setting ID_0x709adadd = 0x00000000 UserSpecified=true // Disable2DD Setting ID_0x70ad05c8 = 0x59b55a1e UserSpecified=true // Time SettingString ID_0x70b5603f = "d3d" // API Setting ID_0x70edb381 = 0x00000023 // StereoTextureEnable Setting ID_0x809d5f60 = 0x08000001 EndProfile ----------- End driver profile settings ----------- No profile update required *** D3D11 DLL successfully initialized. *** Trying to load original_d3d11.dll Hooked_LoadLibraryExW switching to original dll: original_d3d11.dll to C:\Windows\system32\d3d11.dll. Hooked_CreateDXGIFactory1 called with riid: IDXGIFactory1 calling original CreateDXGIFactory1 API CreateDXGIFactory1 returned factory = 000000000316E740, result = 0 new HackerDXGIFactory1(class HackerDXGIFactory1@000000002B260000) wrapped 000000000316E740 HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000002B260000) adapter 0 requested created HackerDXGIAdapter wrapper = 000000002B25FB80 of 000000000318E500 returns result = 0 HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000002B25FB80) called returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672 HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000002B260000) adapter 1 requested created HackerDXGIAdapter wrapper = 000000002B2600C0 of 000000000316CC90 returns result = 0 HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000002B2600C0) called returns adapter: Microsoft Basic Render Driver, sysmem=0, vidmem=0 HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000002B260000) adapter 2 requested returns result = 0x887a0002 HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000002B25FB80) called returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672 HackerUnknown::AddRef(class HackerDXGIAdapter@000000002B25FB80), counter=2, this=000000002B25FB80 Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000002B25FB80) called: output #0 requested returns result = 0, handle = 000000002B1CA020 HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000002B25FB80) called: output #1 requested returns result = 0, handle = 000000002B1CA020 HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000002B25FB80) called: output #2 requested returns result = 887a0002, handle = 0000000000000000 *** D3D11CreateDevice called with pAdapter = 000000002B25FB80 Flags = 0x80 pFeatureLevels = 0xb100 FeatureLevels = 1 ppDevice = 0000000026BDF558 pFeatureLevel = 0xa000 ppImmediateContext = 0000000026BDF560 ->Feature level forced to 11.0: 0xb000 HackerDXGIAdapter1::GetDesc1(class HackerDXGIAdapter1@000000002B25FBB0) called returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672, flags=0 HackerUnknown::Release(class HackerDXGIAdapter1@000000002B25FBB0), counter=2, this=000000002B25FBB0 HackerDXGIObject::GetPrivateData(class HackerDXGIAdapter@000000002B25FB80) called with GUID: {1D6AD054-FB2F-4000-B3AB-E873A9131A7C} returns result = 887a0002 HackerUnknown::AddRef(class HackerDXGIAdapter@000000002B25FB80), counter=3, this=000000002B25FB80 Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. Hooked_CreateDXGIFactory called with riid: IDXGIFactory calling original CreateDXGIFactory API CreateDXGIFactory1 returned factory = 000000002B1CDB30, result = 0 new HackerDXGIFactory1(class HackerDXGIFactory1@000000002B263540) wrapped 000000002B1CDB30 HackerDXGIFactory::QueryInterface(class HackerDXGIFactory1@000000002B263540) called with IID: IDXGIFactory2 *** returns E_NOINTERFACE as error for IDXGIFactory2. HackerUnknown::Release(class HackerDXGIFactory1@000000002B263540), counter=1, this=000000002B263540 Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. HackerDXGIObject::GetPrivateData(class HackerDXGIAdapter@000000002B25FB80) called with GUID: {D722FB4D-7A68-437A-B20C-5804EE2494A6} returns result = 887a0002 HackerUnknown::Release(class HackerDXGIAdapter@000000002B25FB80), counter=5, this=000000002B25FB80 D3D11CreateDevice returned device handle = 000000000318BCD0, context handle = 000000002B5BA208 HackerDevice 000000002C23EAD0 created to wrap 000000000318BCD0 HackerContext 000000002C259F30 created to wrap 000000002B5BA208 HackerDevice::Create3DMigotoResources(class HackerDevice@000000002C23EAD0) called. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. created NVAPI stereo handle. Handle = 000000002C2B6F90 creating stereo parameter texture. stereo texture created, handle = 000000002B5AEB60 creating stereo parameter resource view. stereo texture resource view created, handle = 000000002C04FE28. creating .ini constant parameter texture. IniParam texture created, handle = 000000002B529DA0 creating IniParam resource view. Iniparams resource view created, handle = 000000002B7290A8. Created pink mode pixel shader: 0 ->D3D11CreateDevice result = 0, device handle = 000000000318BCD0, device wrapper = 000000002C23EAD0, context handle = 000000002B5BA208, context wrapper = 000000002C259F30 failed result = 80004002 for 0000000026BDF490 HackerDXGIDevice::GetAdapter(class HackerDXGIDevice1@000000002C4E3660) called with: 0000000026BDF358 created HackerDXGIAdapter wrapper = 000000002B264B30 of 000000000318E500 returns result = 0 HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000002B264B30) called returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672 HackerUnknown::Release(class HackerDXGIAdapter@000000002B264B30), counter=4, this=000000002B264B30 HackerUnknown::Release(class HackerDXGIDevice1@000000002C4E3660), counter=9, this=000000002C4E3660 returns E_NOINTERFACE as error for ID3D11Device1 (try allow_platform_update=1 if the game refuses to run). *** returns E_NOINTERFACE as error for ID3D11DeviceContext1 (try allow_platform_update=1 if the game refuses to run). Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\d3d11.dll to d3d11.dll. Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\d3d11.dll to d3d11.dll.[/code][code][/code]
Thank you for the update DSS. Software mouse cursor is a very nice and needed addition.
I'm sure the other features are also useful but they are beyond my understanding :P

Log with unbuffered=1


D3D11 DLL starting init - v 1.2.65 - Mon Sep 11 07:55:22 2017


----------- d3dx.ini settings -----------
[Logging]
calls=1
input=1
debug=0
unbuffered=1
unbuffered return: 0
force_cpu_affinity=0
[System]
allow_dxgi1_2=0
allow_check_interface=0
allow_create_device=2
allow_platform_update=0
[Device]
upscaling=0
full_screen=0
force_stereo=0
get_resolution_from=swap_chain
hide_cursor=0
[Stereo]
automatic_mode=0
create_profile=0
force_no_nvapi=0
[Rendering]
shader_hash=3dmigoto
cache_shaders=0
use_criticalsection=1
rasterizer_disable_scissor=1
assemble_signature_comments=1
export_fixed=0
export_shaders=0
export_hlsl=0
dump_usage=1
stereo_params=125
ini_params=120
override_directory=F:\Games\Origin\Battlefield 1\ShaderFixes
cache_directory=F:\Games\Origin\Battlefield 1\ShaderCache
fix_sv_position=0
[Hunting]
hunting=1
marking_mode=0
mark_snapshot=2
reload_config=no_modifiers VK_F10
toggle_hunting=no_modifiers VK_NUMPAD0
next_pixelshader=no_modifiers VK_NUMPAD2
previous_pixelshader=no_modifiers VK_NUMPAD1
mark_pixelshader=no_modifiers VK_NUMPAD3
take_screenshot=no_modifiers VK_SNAPSHOT
next_indexbuffer=no_modifiers VK_NUMPAD8
previous_indexbuffer=no_modifiers VK_NUMPAD7
mark_indexbuffer=no_modifiers VK_NUMPAD9
next_vertexshader=no_modifiers VK_NUMPAD5
previous_vertexshader=no_modifiers VK_NUMPAD4
mark_vertexshader=no_modifiers VK_NUMPAD6
next_rendertarget=no_modifiers VK_MULTIPLY
previous_rendertarget=no_modifiers VK_DIVIDE
mark_rendertarget=no_modifiers VK_SUBTRACT
done_hunting=no_modifiers VK_ADD
reload_fixes=no_modifiers VK_F10
show_original=no_modifiers VK_F9
analyse_options=dump_rt_jps clear_rt
repeat_rate=6
[KeyChange3DVision2SBSOutputMode]
type=cycle
Cycle 1: x7=1
Cycle 2: x7=2
Cycle 3: x7=3
Cycle 4: x7=4
Cycle 5: x7=5
Cycle 6: x7=6
Cycle 7: x7=7
Cycle 8: x7=0
Key=no_modifiers F11
[Resource3DVision2SBSBackupTexture]
[Resource3DVisionUpscaleBackupTexture]
[ResourceSoftwareMouseBackupTexture1]
[ResourceSoftwareMouseBackupTexture2]
[ResourceSoftwareMouseBackupTexture3]
[ResourceSoftwareMouseBackupTexture4]
[customshader3dvision2sbs]
vs=ShaderFixes/3dvision2sbsvs.hlsl
hs=null
ds=null
gs=null
ps=ShaderFixes/3dvision2sbsps.hlsl
blend=disable
cull=none
topology=triangle_strip
run=commandlistunbindallrendertargets
o0=set_viewport no_view_cache bb
resource3dvision2sbsbackuptexture=reference ps-t100
ps-t100=stereo2mono bb
vs-t125=stereoparams
ps-t125=stereoparams
vs-t120=iniparams
ps-t120=iniparams
draw=4, 0
post ps-t100=reference resource3dvision2sbsbackuptexture
[customshaderupscale]
vs=ShaderFixes/upscalevs.hlsl
hs=null
ds=null
gs=null
ps=ShaderFixes/upscaleps.hlsl
blend=disable
cull=none
topology=triangle_strip
sampler=anisotropic_filter
run=commandlistunbindallrendertargets
o0=set_viewport bb
resource3dvisionupscalebackuptexture=reference ps-t101
ps-t101=f_bb
draw=4, 0
post ps-t101=reference resource3dvisionupscalebackuptexture
[customshadersoftwaremouse]
vs=ShaderFixes/mousevs.hlsl
hs=null
ds=null
gs=null
ps=ShaderFixes/mouseps.hlsl
blend=ADD ONE INV_SRC_ALPHA
cull=none
topology=triangle_strip
run=commandlistunbindallrendertargets
o0=set_viewport no_view_cache bb
vs-t125=stereoparams
ps-t125=stereoparams
vs-t120=iniparams
ps-t120=iniparams
x6=cursor_window_x
y6=cursor_window_y
z6=cursor_hotspot_x
w6=cursor_hotspot_y
y7=cursor_showing
z7=window_width
w7=window_height
resourcesoftwaremousebackuptexture1=reference vs-t100
resourcesoftwaremousebackuptexture2=reference vs-t101
resourcesoftwaremousebackuptexture3=reference ps-t100
resourcesoftwaremousebackuptexture4=reference ps-t101
vs-t100=cursor_mask
vs-t101=cursor_color
ps-t100=cursor_mask
ps-t101=cursor_color
w5=1
draw=4, 0
run=customshadersoftwaremousebw
post vs-t100=reference resourcesoftwaremousebackuptexture1
post vs-t101=reference resourcesoftwaremousebackuptexture2
post ps-t100=reference resourcesoftwaremousebackuptexture3
post ps-t101=reference resourcesoftwaremousebackuptexture4
[customshadersoftwaremousebw]
blend=ADD INV_DEST_COLOR SRC_ALPHA
w5=2
draw=4, 0
[commandlistunbindallrendertargets]
o0=null
o1=null
o2=null
o3=null
o4=null
o5=null
o6=null
o7=null
od=null
[Present]
[ClearRenderTargetView]
[ClearDepthStencilView]
[Constants]
x7=0.00
[Profile]

Hooked_LoadLibraryExW switching to original dll: original_nvapi64.dll to C:\Windows\system32\nvapi64.dll.
NVIDIA driver version 384.94 (branch r384_00)

Looking up profiles related to F:\Games\Origin\Battlefield 1\bf1.exe
----------- Driver profile settings -----------
BaseProfile "Base Profile"
SelectedGlobalProfile "Base Profile"

Profile "Base Profile"
ShowOn All
Setting ID_0x005a375c = 0x96861077 UserSpecified=true // Vertical Sync Tear Control
Setting ID_0x00a879cf = 0x60925292 UserSpecified=true // Vertical Sync
Setting ID_0x101ae763 = 0x00000000 UserSpecified=true // Flag to control smooth AFR behavior
Setting ID_0x10834fee = 0x00000000 UserSpecified=true // Frame Rate Limiter
Setting ID_0x10a879ac = 0x00000004 UserSpecified=true // G-SYNC
Setting ID_0x10a879cf = 0x00000004 UserSpecified=true // G-SYNC
Setting ID_0x1194f158 = 0x00000000 UserSpecified=true // Enable G-SYNC globally
Setting ID_0x80303a19 = 0x00000001
Setting ID_0x80857a28 = 0x00000001
Setting ID_0x809d5f60 = 0x00000001
EndProfile

Profile "Battlefield 1"
ShowOn GeForce
Executable "bf1.exe"
Executable "tunguska.main_win64_final.exe"
Executable "bf1_cte.exe"
Executable "bf1trial.exe"
Executable "tunguska.main_win64_release.exe"
Setting ID_0x0019bb68 = 0x00000001 UserSpecified=true // Texture filtering - Negative LOD bias
Setting ID_0x005a375c = 0x96861077 UserSpecified=true // Vertical Sync Tear Control
Setting ID_0x005f5a32 = 0x00000000 UserSpecified=true
Setting ID_0x007ba09e = 0x00000001 UserSpecified=true // Maximum pre-rendered frames
Setting ID_0x0084cd70 = 0x00000000 UserSpecified=true // Texture filtering - Anisotropic filter optimization
Setting ID_0x00a06746 = 0x00110000
Setting ID_0x00a06946 = 0x080116f5
Setting ID_0x00a879cf = 0x60925292 UserSpecified=true // Vertical Sync
Setting ID_0x00c96f61 = 0x0000000f
Setting ID_0x00d98f93 = 0x00000010
Setting ID_0x00e73211 = 0x00000000 UserSpecified=true // Texture filtering - Anisotropic sample optimization
Setting ID_0x00f713bc = 0x00000340
Setting ID_0x10115c8b = 0x0000003c // Quiet Mode Application FPS
Setting ID_0x101ae763 = 0x00000000 UserSpecified=true // Flag to control smooth AFR behavior
Setting ID_0x101e61a9 = 0x00000010 UserSpecified=true // Anisotropic filtering setting
Setting ID_0x1033cec2 = 0x00000002 // NVIDIA predefined SLI mode on DirectX 10
Setting ID_0x1033dcd3 = 0x00000004 // NVIDIA predefined number of GPUs to use on SLI rendering mode on DirectX 10
Setting ID_0x1034cb89 = 0x00000000 // NVIDIA Predefined FXAA Usage
Setting ID_0x106d5cff = 0x00000000 // Do not display this profile in the Control Panel
Setting ID_0x10d2bb16 = 0x00000001 UserSpecified=true // Anisotropic filtering mode
Setting ID_0x10ecdb82 = 0x00000005 // Antialiasing - Behavior Flags
Setting ID_0x10f9dc81 = 0x00000011 // Enable application for Optimus
Setting ID_0x200aebfc = 0x00000000 UserSpecified=true
Setting ID_0x208e55e3 = 0x00000001 UserSpecified=true // Maximum frames allowed
Setting ID_0x20c1221e = 0x00000000 UserSpecified=true // Threaded optimization
Setting ID_0x701eb457 = 0x00000001 // StereoProfile
Setting ID_0x702442fc = 0x00004000 // StereoFlagsDX10
SettingString ID_0x7049c7ec = "5" // Value
SettingString ID_0x704d456e = "Some objects render at wrong depth. Some effects render incorrectly." // Comments
SettingString ID_0x7051e5f5 = "5" // Compat
Setting ID_0x7058b6e1 = 0x00000001 UserSpecified=true // LaserSight
Setting ID_0x707f4b45 = 0x00000000 UserSpecified=true // StereoMemoEnabled
Setting ID_0x708db8c5 = 0x3f520848 UserSpecified=true // StereoConvergence = 0.820438862
Setting ID_0x708db8c6 = 0x00000000 UserSpecified=true // StereoVRConvergenceBias
Setting ID_0x709a1ddf = 0x00000001 // StereoCutoff
Setting ID_0x709adada = 0x10000102 UserSpecified=true // 2DDHUDSettings
Setting ID_0x709adadb = 0x3f64e1ac UserSpecified=true // 2DDConvergence = 0.89406848
Setting ID_0x709adadd = 0x00000000 UserSpecified=true // Disable2DD
Setting ID_0x70ad05c8 = 0x59b55a1e UserSpecified=true // Time
SettingString ID_0x70b5603f = "d3d" // API
Setting ID_0x70edb381 = 0x00000023 // StereoTextureEnable
Setting ID_0x809d5f60 = 0x08000001
EndProfile

----------- End driver profile settings -----------
No profile update required

*** D3D11 DLL successfully initialized. ***

Trying to load original_d3d11.dll
Hooked_LoadLibraryExW switching to original dll: original_d3d11.dll to C:\Windows\system32\d3d11.dll.
Hooked_CreateDXGIFactory1 called with riid: IDXGIFactory1
calling original CreateDXGIFactory1 API
CreateDXGIFactory1 returned factory = 000000000316E740, result = 0
new HackerDXGIFactory1(class HackerDXGIFactory1@000000002B260000) wrapped 000000000316E740
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000002B260000) adapter 0 requested
created HackerDXGIAdapter wrapper = 000000002B25FB80 of 000000000318E500
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000002B25FB80) called
returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000002B260000) adapter 1 requested
created HackerDXGIAdapter wrapper = 000000002B2600C0 of 000000000316CC90
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000002B2600C0) called
returns adapter: Microsoft Basic Render Driver, sysmem=0, vidmem=0
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@000000002B260000) adapter 2 requested
returns result = 0x887a0002
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000002B25FB80) called
returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672
HackerUnknown::AddRef(class HackerDXGIAdapter@000000002B25FB80), counter=2, this=000000002B25FB80
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000002B25FB80) called: output #0 requested
returns result = 0, handle = 000000002B1CA020
HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000002B25FB80) called: output #1 requested
returns result = 0, handle = 000000002B1CA020
HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@000000002B25FB80) called: output #2 requested
returns result = 887a0002, handle = 0000000000000000


*** D3D11CreateDevice called with
pAdapter = 000000002B25FB80
Flags = 0x80
pFeatureLevels = 0xb100
FeatureLevels = 1
ppDevice = 0000000026BDF558
pFeatureLevel = 0xa000
ppImmediateContext = 0000000026BDF560
->Feature level forced to 11.0: 0xb000
HackerDXGIAdapter1::GetDesc1(class HackerDXGIAdapter1@000000002B25FBB0) called
returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672, flags=0
HackerUnknown::Release(class HackerDXGIAdapter1@000000002B25FBB0), counter=2, this=000000002B25FBB0
HackerDXGIObject::GetPrivateData(class HackerDXGIAdapter@000000002B25FB80) called with GUID: {1D6AD054-FB2F-4000-B3AB-E873A9131A7C}
returns result = 887a0002
HackerUnknown::AddRef(class HackerDXGIAdapter@000000002B25FB80), counter=3, this=000000002B25FB80
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Hooked_CreateDXGIFactory called with riid: IDXGIFactory
calling original CreateDXGIFactory API
CreateDXGIFactory1 returned factory = 000000002B1CDB30, result = 0
new HackerDXGIFactory1(class HackerDXGIFactory1@000000002B263540) wrapped 000000002B1CDB30
HackerDXGIFactory::QueryInterface(class HackerDXGIFactory1@000000002B263540) called with IID: IDXGIFactory2
*** returns E_NOINTERFACE as error for IDXGIFactory2.
HackerUnknown::Release(class HackerDXGIFactory1@000000002B263540), counter=1, this=000000002B263540
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
HackerDXGIObject::GetPrivateData(class HackerDXGIAdapter@000000002B25FB80) called with GUID: {D722FB4D-7A68-437A-B20C-5804EE2494A6}
returns result = 887a0002
HackerUnknown::Release(class HackerDXGIAdapter@000000002B25FB80), counter=5, this=000000002B25FB80
D3D11CreateDevice returned device handle = 000000000318BCD0, context handle = 000000002B5BA208
HackerDevice 000000002C23EAD0 created to wrap 000000000318BCD0
HackerContext 000000002C259F30 created to wrap 000000002B5BA208
HackerDevice::Create3DMigotoResources(class HackerDevice@000000002C23EAD0) called.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
created NVAPI stereo handle. Handle = 000000002C2B6F90
creating stereo parameter texture.
stereo texture created, handle = 000000002B5AEB60
creating stereo parameter resource view.
stereo texture resource view created, handle = 000000002C04FE28.
creating .ini constant parameter texture.
IniParam texture created, handle = 000000002B529DA0
creating IniParam resource view.
Iniparams resource view created, handle = 000000002B7290A8.
Created pink mode pixel shader: 0
->D3D11CreateDevice result = 0, device handle = 000000000318BCD0, device wrapper = 000000002C23EAD0, context handle = 000000002B5BA208, context wrapper = 000000002C259F30

failed result = 80004002 for 0000000026BDF490
HackerDXGIDevice::GetAdapter(class HackerDXGIDevice1@000000002C4E3660) called with: 0000000026BDF358
created HackerDXGIAdapter wrapper = 000000002B264B30 of 000000000318E500
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@000000002B264B30) called
returns adapter: NVIDIA GeForce GTX 1080, sysmem=0, vidmem=8469020672
HackerUnknown::Release(class HackerDXGIAdapter@000000002B264B30), counter=4, this=000000002B264B30
HackerUnknown::Release(class HackerDXGIDevice1@000000002C4E3660), counter=9, this=000000002C4E3660
returns E_NOINTERFACE as error for ID3D11Device1 (try allow_platform_update=1 if the game refuses to run).
*** returns E_NOINTERFACE as error for ID3D11DeviceContext1 (try allow_platform_update=1 if the game refuses to run).
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\d3d11.dll to d3d11.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\d3d11.dll to d3d11.dll.
[code][/code]

Intel i7 2600k @4,5ghz
ASUS GTX 1080 Strix
DDR3 4x4gb
TV LG OLED65E6V
Projector Benq W1300
Windows 10 64bits

Posted 09/11/2017 04:56 AM   
Whoa, all those changes, features and fixes. Thank you, DSS! I'll have to check if the software mouse cursor can fix the issue of the hardware cursor disappearing in Xanadu Next when using dgvoodoo. And this is what I've been waiting for to implement in Van Helsing (whenever I have the chance and space to download it again, because it's really big). ARPG and RTS games will benefit a lot from this. I have a question unrelated to this update. It's about Trails in the Sky (an almost finished fix I'm making), about a minor issue that happens when you open the menu or map while the HUD is at depth (because of a hotkey, of course). The game takes an ingame "screenshot" when it opens the menu and uses it as a darker background (I stereoized the render target with a TextureOverride so now it's exactly what you see in 3D, instead of flat), but if the HUD was at depth before opening the menu, this is what happens: - The game takes the "screenshot" from a higher separation point, meaning that even if I restore HUD depth to screen depth after that, the background will still look very separated (more if the HUD depth was bigger before opening the menu). - Also, and no matter the initial HUD depth, the background has more separation if I increase the HUD depth at any moment, although this time it can be restored. I don't expect to be able to correct this, probably (or maybe I can identify the render target which I hope only appears when the menu is open to make a variable change, mmm...). For the first issue I had an idea (which would be bad for other things in the game but I wanted to test) that didn't work, and it was assigning a hotkey for the button that opens the menu to quickly change the HUD depth variable to put it at screen depth. But even with 0 delays (except for release delay) and 0 transition time, it isn't fast enough. It only worked if I closed and opened the menu again while the hotkey release delay was active. I assume this can't be faster in any way, right?
Whoa, all those changes, features and fixes. Thank you, DSS!

I'll have to check if the software mouse cursor can fix the issue of the hardware cursor disappearing in Xanadu Next when using dgvoodoo.

And this is what I've been waiting for to implement in Van Helsing (whenever I have the chance and space to download it again, because it's really big). ARPG and RTS games will benefit a lot from this.



I have a question unrelated to this update. It's about Trails in the Sky (an almost finished fix I'm making), about a minor issue that happens when you open the menu or map while the HUD is at depth (because of a hotkey, of course).

The game takes an ingame "screenshot" when it opens the menu and uses it as a darker background (I stereoized the render target with a TextureOverride so now it's exactly what you see in 3D, instead of flat), but if the HUD was at depth before opening the menu, this is what happens:

- The game takes the "screenshot" from a higher separation point, meaning that even if I restore HUD depth to screen depth after that, the background will still look very separated (more if the HUD depth was bigger before opening the menu).

- Also, and no matter the initial HUD depth, the background has more separation if I increase the HUD depth at any moment, although this time it can be restored. I don't expect to be able to correct this, probably (or maybe I can identify the render target which I hope only appears when the menu is open to make a variable change, mmm...).

For the first issue I had an idea (which would be bad for other things in the game but I wanted to test) that didn't work, and it was assigning a hotkey for the button that opens the menu to quickly change the HUD depth variable to put it at screen depth. But even with 0 delays (except for release delay) and 0 transition time, it isn't fast enough. It only worked if I closed and opened the menu again while the hotkey release delay was active. I assume this can't be faster in any way, right?

Email for PayPal donations: masterotakusuko@gmail.com
CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: Gainward Phoenix 1080 GLH
Monitor: Asus PG278QR
Speakers: Logitech Z506

Posted 09/11/2017 06:30 AM   
[quote="masterotaku"]I'll have to check if the software mouse cursor can fix the issue of the hardware cursor disappearing in Xanadu Next when using dgvoodoo.[/quote] By default the software cursor will probably disappear when the hardware cursor would have, but you can always change the d3dx.ini to set y7=1 to disable the cursor_showing check in the vertex shader, and you can change the colour and mask textures passed to the shaders in the t100 and t101 slots to your own custom resources (you may find you need to do that - if the hardware cursor is hidden by something other than 3DMigtoo there might not be a cursor bitmap for the custom shader to use). [quote] I have a question unrelated to this update. It's about Trails in the Sky (an almost finished fix I'm making), about a minor issue that happens when you open the menu or map while the HUD is at depth (because of a hotkey, of course). The game takes an ingame "screenshot" when it opens the menu and uses it as a darker background (I stereoized the render target with a TextureOverride so now it's exactly what you see in 3D, instead of flat), but if the HUD was at depth before opening the menu, this is what happens: [/quote] You might be able to find out more with 'analyse_options=hold log' in the global options and holding the frame analysis key while opening the menu. You can also add an analyse_options in the HUD shader if you want to dump out textures + render targets used with that shader. [quote] - The game takes the "screenshot" from a higher separation point, meaning that even if I restore HUD depth to screen depth after that, the background will still look very separated (more if the HUD depth was bigger before opening the menu). [/quote]You've already identified the render target, so use the fact that 3DMigoto 1.2.65 just extended texture filtering to work with render targets - do something like 'x = o0', then you can check IniParams[0].x in the shader to see if there is a TextureOverride defined for the render target, using filter_index if you need to distinguish it from other textures you may also have sections for. You might also find that the pixel shader used to take the screenshot is different to the rest of the HUD, so you might be able to filter on that. [quote] - Also, and no matter the initial HUD depth, the background has more separation if I increase the HUD depth at any moment, although this time it can be restored. I don't expect to be able to correct this, probably (or maybe I can identify the render target which I hope only appears when the menu is open to make a variable change, mmm...). [/quote]Should be able to do the same thing, but this time filter on the texture slot (ps-t0 or whatever it uses) or partner filter. If you haven't one partner filtering with the command list before it's easy - just define a ShaderOverride for the pixel shader that sets an ini param before the draw call and clears it afterwards, like: [code] [ShaderOverrideHUDPS] hash = <pixel shader hash> y = 1 post y = 0 [/code] Then check the ini param from the vertex shader for 1 if it is used with that pixel shader and 0 otherwise.
masterotaku said:I'll have to check if the software mouse cursor can fix the issue of the hardware cursor disappearing in Xanadu Next when using dgvoodoo.

By default the software cursor will probably disappear when the hardware cursor would have, but you can always change the d3dx.ini to set y7=1 to disable the cursor_showing check in the vertex shader, and you can change the colour and mask textures passed to the shaders in the t100 and t101 slots to your own custom resources (you may find you need to do that - if the hardware cursor is hidden by something other than 3DMigtoo there might not be a cursor bitmap for the custom shader to use).


I have a question unrelated to this update. It's about Trails in the Sky (an almost finished fix I'm making), about a minor issue that happens when you open the menu or map while the HUD is at depth (because of a hotkey, of course).

The game takes an ingame "screenshot" when it opens the menu and uses it as a darker background (I stereoized the render target with a TextureOverride so now it's exactly what you see in 3D, instead of flat), but if the HUD was at depth before opening the menu, this is what happens:

You might be able to find out more with 'analyse_options=hold log' in the global options and holding the frame analysis key while opening the menu. You can also add an analyse_options in the HUD shader if you want to dump out textures + render targets used with that shader.


- The game takes the "screenshot" from a higher separation point, meaning that even if I restore HUD depth to screen depth after that, the background will still look very separated (more if the HUD depth was bigger before opening the menu).
You've already identified the render target, so use the fact that 3DMigoto 1.2.65 just extended texture filtering to work with render targets - do something like 'x = o0', then you can check IniParams[0].x in the shader to see if there is a TextureOverride defined for the render target, using filter_index if you need to distinguish it from other textures you may also have sections for. You might also find that the pixel shader used to take the screenshot is different to the rest of the HUD, so you might be able to filter on that.


- Also, and no matter the initial HUD depth, the background has more separation if I increase the HUD depth at any moment, although this time it can be restored. I don't expect to be able to correct this, probably (or maybe I can identify the render target which I hope only appears when the menu is open to make a variable change, mmm...).
Should be able to do the same thing, but this time filter on the texture slot (ps-t0 or whatever it uses) or partner filter.

If you haven't one partner filtering with the command list before it's easy - just define a ShaderOverride for the pixel shader that sets an ini param before the draw call and clears it afterwards, like:
[ShaderOverrideHUDPS]
hash = <pixel shader hash>
y = 1
post y = 0


Then check the ini param from the vertex shader for 1 if it is used with that pixel shader and 0 otherwise.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 09/11/2017 12:23 PM   
Very nice work, as usual DSS and everyone who help to improve 3Dmigoto ;). I hope people will update their fix with the new feature of software cursor, it could be nice for people using Top and Bottom.
Very nice work, as usual DSS and everyone who help to improve 3Dmigoto ;).

I hope people will update their fix with the new feature of software cursor, it could be nice for people using Top and Bottom.

Posted 09/11/2017 12:55 PM   
Great DSS!! very nice update!! I will start enabling Software Mouse, in games that only have HW Mouse. I normally use TaB Mode, so is a very nice new feature. Also with the texture and presets improvements, we can use scene detection with textures?? like this: [code] [Preset_Menu] convergence = 0.5 [TextureOverride_Menu] Hash=c3e55ebd Preset = Preset_Menu[/code]
Great DSS!! very nice update!!

I will start enabling Software Mouse, in games that only have HW Mouse. I normally use TaB Mode, so is a very nice new feature.

Also with the texture and presets improvements, we can use scene detection with textures??
like this:

[Preset_Menu]
convergence = 0.5

[TextureOverride_Menu]
Hash=c3e55ebd
Preset = Preset_Menu
Posted 09/11/2017 01:28 PM   
[quote="DHR"]Also with the texture and presets improvements, we can use scene detection with textures?? like this: [code] [Preset_Menu] convergence = 0.5 [TextureOverride_Menu] Hash=c3e55ebd Preset = Preset_Menu[/code] [/quote] Yes you can, but you have to add CheckTextureOverride=ps-t0 (or whichever slot you need to check) in the ShaderOverride section that it will be used with to run the command list in the TextureOverride section and activate the preset - there's an example of this in the release notes that I'm using in Dreamfall Chapters.
DHR said:Also with the texture and presets improvements, we can use scene detection with textures??
like this:

[Preset_Menu]
convergence = 0.5

[TextureOverride_Menu]
Hash=c3e55ebd
Preset = Preset_Menu


Yes you can, but you have to add CheckTextureOverride=ps-t0 (or whichever slot you need to check) in the ShaderOverride section that it will be used with to run the command list in the TextureOverride section and activate the preset - there's an example of this in the release notes that I'm using in Dreamfall Chapters.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 09/11/2017 01:37 PM   
Thanks DSS...i read the post very quick on my phone and skip the example. Great!!
Thanks DSS...i read the post very quick on my phone and skip the example. Great!!
Posted 09/11/2017 01:59 PM   
Hey DSS. I've got my include file with configuration working, but because I merged all my 300 shaders 3DM now takes around 10 seconds to reload as I skip the timestamp in my build to make it working. Do you have any brilliant idea in your sleeve maybe of how to modify the code to make 3DM only reload the shaders which have included the modified file? Update: 3DM allows an external loading of cbuffers as you mentioned before, but does it mean it compiles as an immediate buffer on each shader that links to it? If so it would be awesome to be able to load it in the text format.
Hey DSS. I've got my include file with configuration working, but because I merged all my 300 shaders 3DM now takes around 10 seconds to reload as I skip the timestamp in my build to make it working. Do you have any brilliant idea in your sleeve maybe of how to modify the code to make 3DM only reload the shaders which have included the modified file?

Update: 3DM allows an external loading of cbuffers as you mentioned before, but does it mean it compiles as an immediate buffer on each shader that links to it? If so it would be awesome to be able to load it in the text format.

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

Posted 09/11/2017 03:51 PM   
Hi DSS... I just test the SW mouse and works very nice, even with low latency :) But the texture used in the cursor is a bit busted...is the arrow with a square in the right It's a bit streched because the TaB mode. [img]https://forums.geforce.com/cmd/default/download-comment-attachment/73691/[/img] Any ideas what may be wrong? (i only enabled the run = CustomShaderSoftwareMouse and hide = 1)
Hi DSS...
I just test the SW mouse and works very nice, even with low latency :)

But the texture used in the cursor is a bit busted...is the arrow with a square in the right
It's a bit streched because the TaB mode.

Image

Any ideas what may be wrong?
(i only enabled the run = CustomShaderSoftwareMouse and hide = 1)
Attachments

SWMOUSE.jpg

Posted 09/11/2017 11:49 PM   
  103 / 116    
Scroll To Top