3Dmigoto now open-source...
  137 / 143    
Depends on what you are using it for - anything it affects at resource creation time (StereoMode, format, width, height, width_multiply, height_multiply) cannot be*, but any command list commands can nowadays be enclosed in "if" conditionals. e.g. this is from DOAXVV - here I place the condition around the checktextureoverride to get the most performance benefit from disabling the option (looking up textureoverrides is expensive, particularly when done many times per frame), but this could also go inside a [TextureOverride]: [code] [KeyToggleMods] Key = no_modifiers F2 z = 0 type = toggle [ShaderOverrideClothesPS1] hash = e0f2dc26aae66de3 ... if z ; Enable costume texture replacement by texture hash: checktextureoverride = ps-t0 ... endif [/code] * If you do find yourself in a situation where you need to affect a creation time parameter (e.g. force one texture to stereo and another to mono) and have no way to distinguish between them there is another option - create your own resource forced to stereo or mono and swap the game's resource for it from [ShaderOverride] sections both where they are written and read. e.g. simplified excerpt from Dreamfall Chapers: [code] [Resource_m_InterpolationEpi] ; Confirmed - must be forced stereo, but doing so causes 1 pixel rectangle ; holes every centimeter from the light position unless we manually clear the ; replacement render target mode = stereo [CommandList_Volumetric_Light_Shafts_DepthBreaks] ; Replace game's render target output with a stereo version: Resource_m_InterpolationEpi = stereo copy_desc o0 o0 = Resource_m_InterpolationEpi ; Game cleared their resource, so we need to clear our replacement: clear = Resource_m_InterpolationEpi 0 0 0 1 [CommandList_Volumetric_Light_Shafts_InterpolateAlongRays] ; Replace input textures with previously stereoised versions: ps-t0 = Resource_m_InterpolationEpi [/code]
Depends on what you are using it for - anything it affects at resource creation time (StereoMode, format, width, height, width_multiply, height_multiply) cannot be*, but any command list commands can nowadays be enclosed in "if" conditionals. e.g. this is from DOAXVV - here I place the condition around the checktextureoverride to get the most performance benefit from disabling the option (looking up textureoverrides is expensive, particularly when done many times per frame), but this could also go inside a [TextureOverride]:

[KeyToggleMods]
Key = no_modifiers F2
z = 0
type = toggle

[ShaderOverrideClothesPS1]
hash = e0f2dc26aae66de3
...
if z
; Enable costume texture replacement by texture hash:
checktextureoverride = ps-t0
...
endif


* If you do find yourself in a situation where you need to affect a creation time parameter (e.g. force one texture to stereo and another to mono) and have no way to distinguish between them there is another option - create your own resource forced to stereo or mono and swap the game's resource for it from [ShaderOverride] sections both where they are written and read. e.g. simplified excerpt from Dreamfall Chapers:

[Resource_m_InterpolationEpi]
; Confirmed - must be forced stereo, but doing so causes 1 pixel rectangle
; holes every centimeter from the light position unless we manually clear the
; replacement render target
mode = stereo

[CommandList_Volumetric_Light_Shafts_DepthBreaks]
; Replace game's render target output with a stereo version:
Resource_m_InterpolationEpi = stereo copy_desc o0
o0 = Resource_m_InterpolationEpi
; Game cleared their resource, so we need to clear our replacement:
clear = Resource_m_InterpolationEpi 0 0 0 1

[CommandList_Volumetric_Light_Shafts_InterpolateAlongRays]
; Replace input textures with previously stereoised versions:
ps-t0 = Resource_m_InterpolationEpi

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 10/22/2018 10:32 AM   
I'm currently experimenting with using Trello to manage my TODO list a little, and I created a board for 3DMigoto. I've made it public so that people can get a bit of visibility into what I (and maybe Bo3b and other developers if they want to use this too) are up to: https://trello.com/b/qmDW53T5/3dmigoto
I'm currently experimenting with using Trello to manage my TODO list a little, and I created a board for 3DMigoto. I've made it public so that people can get a bit of visibility into what I (and maybe Bo3b and other developers if they want to use this too) are up to:


https://trello.com/b/qmDW53T5/3dmigoto

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 10/23/2018 09:17 AM   
Good Idea DSS, I'm following this !
Good Idea DSS, I'm following this !

http://photos.3dvisionlive.com/chtiblue/album/530b52d4cb85770d6e000049/3Dvision with 55" LG OLED EG920 interlieved 3D (3840x2160) overide mode, GTX 2080 Ti XC Ultra EVGA, core i5 @4.3GHz, 16Gb@2130, windows 7&10 64bit, Dolby Atmos 5.1.4 Marantz 6010 AVR

Posted 10/23/2018 09:28 AM   
Thansk for sharing DSS!
Thansk for sharing DSS!

Gigabyte RTX2080TI Gaming OC, I7-6700k ~ 4.4Ghz, 3x BenQ XL2420T, BenQ TK800, LG 55EG960V (3D OLED), Samsung 850 EVO SSD, Crucial M4 SSD, 3D vision kit, Xpand x104 glasses, Corsair HX1000i, Win 10 pro 64/Win 7 64https://www.3dmark.com/fs/9529310

Posted 10/23/2018 10:29 AM   
Yeah there are if clauses working with migoto in the ini?? THATS exactely what i was searching for ^^ I was work arround this with an autohotkey script copying 2 different ini files on a key press but this is not verry elegant. THANK YOU IAN, wasnt knowing that if is working in the ini !! //hm is this also working for texture overrides ??? Not working here ;:-( [Key_PERFORMANCE_KB] Key = F3 type = cycle w = 0, 1 . . . [TextureOverride_culling1] Hash = 3d7dd24e if w expand_region_copy=1 deny_cpu_read=1 endif
Yeah there are if clauses working with migoto in the ini?? THATS exactely what i was searching for ^^ I was work arround this with an autohotkey script copying 2 different ini files on a key press but this is not verry elegant. THANK YOU IAN, wasnt knowing that if is working in the ini !!

//hm is this also working for texture overrides ???

Not working here ;:-(


[Key_PERFORMANCE_KB]
Key = F3
type = cycle
w = 0, 1

.
.
.

[TextureOverride_culling1]
Hash = 3d7dd24e
if w
expand_region_copy=1
deny_cpu_read=1
endif

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 10/23/2018 01:43 PM   
Ahh, I forgot about those two hacks - neither of those are part of the command list (adds TODO item to trello: create command list reference documentation) so are not affected by the "if" flow control that is part of it. They are kind of awkward to convert into something that would work with that - can you give me some more details of the problem you are trying to solve (and which engine - is this a CryEngine game*?) so I can mull over the best way to address it? * I'm pretty convinced there should be a better way to solve the disappearing geometry in CryEngine than using deny_cpu_read that would be much better for performance. At the time I added that hack I didn't have enough visibility or control to fix it in another way, but I have since fixed similar issues in other engines and am fairly confident I could do better now. The expand_region_copy I'd need to think about - there may not be a whole lot we can do better on that one.
Ahh, I forgot about those two hacks - neither of those are part of the command list (adds TODO item to trello: create command list reference documentation) so are not affected by the "if" flow control that is part of it. They are kind of awkward to convert into something that would work with that - can you give me some more details of the problem you are trying to solve (and which engine - is this a CryEngine game*?) so I can mull over the best way to address it?

* I'm pretty convinced there should be a better way to solve the disappearing geometry in CryEngine than using deny_cpu_read that would be much better for performance. At the time I added that hack I didn't have enough visibility or control to fix it in another way, but I have since fixed similar issues in other engines and am fairly confident I could do better now. The expand_region_copy I'd need to think about - there may not be a whole lot we can do better on that one.

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 10/23/2018 05:07 PM   
[quote="DarkStarSword"]Ahh, I forgot about those two hacks - neither of those are part of the command list (adds TODO item to trello: create command list reference documentation) so are not affected by the "if" flow control that is part of it. They are kind of awkward to convert into something that would work with that - can you give me some more details of the problem you are trying to solve (and which engine - is this a CryEngine game*?) so I can mull over the best way to address it? * I'm pretty convinced there should be a better way to solve the disappearing geometry in CryEngine than using deny_cpu_read that would be much better for performance. At the time I added that hack I didn't have enough visibility or control to fix it in another way, but I have since fixed similar issues in other engines and am fairly confident I could do better now. The expand_region_copy I'd need to think about - there may not be a whole lot we can do better on that one.[/quote] Ok there is one texture hash marked as MapType:1 that will cause flickering in KDC (KingdomeComesDeliverance ... you remeber ^^) I have to set deny_cpu_read = 1 to get rid of the flickering but this will costs arround 10 FPS !!!! Id like to give the user the option to set deny_cpu_read=1 (flicker but -10 FPS) or deny_cpu_read=0 (no flicker but +10 fps) ... may usefull in some hard FPS drop situations... If you have an idea how to get rid of flickering but save the FPS like deny_cpu_read=0 ... ill love you more than i allready do ^^
DarkStarSword said:Ahh, I forgot about those two hacks - neither of those are part of the command list (adds TODO item to trello: create command list reference documentation) so are not affected by the "if" flow control that is part of it. They are kind of awkward to convert into something that would work with that - can you give me some more details of the problem you are trying to solve (and which engine - is this a CryEngine game*?) so I can mull over the best way to address it?

* I'm pretty convinced there should be a better way to solve the disappearing geometry in CryEngine than using deny_cpu_read that would be much better for performance. At the time I added that hack I didn't have enough visibility or control to fix it in another way, but I have since fixed similar issues in other engines and am fairly confident I could do better now. The expand_region_copy I'd need to think about - there may not be a whole lot we can do better on that one.


Ok there is one texture hash marked as MapType:1 that will cause flickering in KDC (KingdomeComesDeliverance ... you remeber ^^) I have to set deny_cpu_read = 1 to get rid of the flickering but this will costs arround 10 FPS !!!! Id like to give the user the option to set deny_cpu_read=1 (flicker but -10 FPS) or deny_cpu_read=0 (no flicker but +10 fps) ... may usefull in some hard FPS drop situations...

If you have an idea how to get rid of flickering but save the FPS like deny_cpu_read=0 ... ill love you more than i allready do ^^

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 10/23/2018 06:13 PM   
@Losti: This is an alternate to deny_cpu_read for CryEngine that performs better - this is from Lichdom, so it may be a different shader in KDC (or possibly other differences - let me know if you have trouble). [olist] [.]To find the shader take a frame analysis log, and search for "MapType:1" - there should only be one of those per frame.[/.] [.]Then search through the file for whatever resource handle appears on that line after pResource - this should lead you to a CopySubResourceRegion.[/.] [.]Then search through the file again for the resource handle that appears after "Src resource=" - this should lead you to an OMSetRenderTargets line.[/.] [.]From there search >backwards< in the file to find the most recent "PSSetShader(" and take the hash that appears at the end of this line.[/.] [/olist] d3dx.ini: [code] [ShaderOverrideFlicker] hash = 630978719b4885a7 ; This shader downscales the depth buffer prior to sending it to the CPU for ; occlusion culling. The CPU will only get a mono copy, which results in ; incorrect occlusion culling and appears as flickering geometry in the ; distance that is just to the right of something in the foreground. ; ; One option to solve this is to kill the depth buffer copy back to the CPU, ; but that removes the performance benefit of occlusion culling, which can be ; quite significant. Another option that should retain the performance benefit ; of occlusion culling is to combine the depth buffers from both eyes into a ; single depth buffer that is the max(left, right) depths prior to sending it ; to the CPU. ; ; This shader is responsible for downscaling the depth buffer in several passes ; so that the copy back to the CPU doesn't kill performance. We need to ; interject in this process at some point to combine the depth buffers, but it ; (technically) doesn't matter exactly when we do it. However, since combining ; the eyes requires a stereo2mono it will add extra overhead on SLI, which ; could be enough to negate the performance benefit of occlusion culling or ; even make things worse. This performance impact depends on the size of the ; buffer we are copying, so ideally we would do this after the downscaling has ; been completed. ; ; We don't have a way to know how many passes there are (unless it's always the ; same independent of resolution, but I have not verified that), nor do we ; currently have any other command list we could trigger off, so for now we ; will interject once after the first downscale pass as a reasonable ; compromise. ; ; NOTE: To work in SLI this requires StereoFlagsDX10=0x.......8 if stereo_active post run = CustomShaderCryEngineFlickerFix endif [CustomShaderCryEngineFlickerFix] max_executions_per_frame = 1 ps = ShaderFixes\cryengine_flicker_fix.hlsl ps-t0 = stereo2mono o0 draw = from_caller [/code] cryengine_flicker_fix.hlsl: [code] Texture2D<float4> _tex0 : register(t0); void main( float4 v0 : SV_Position0, float2 v1 : TEXCOORD0, out float4 o0 : SV_Target0) { float width, height; _tex0.GetDimensions(width, height); float4 right = _tex0.Load(int3(v0.xy, 0)); float4 left = _tex0.Load(int3(v0.x + width / 2, v0.y, 0)); o0 = max(left, right); } [/code]
@Losti: This is an alternate to deny_cpu_read for CryEngine that performs better - this is from Lichdom, so it may be a different shader in KDC (or possibly other differences - let me know if you have trouble).

  1. To find the shader take a frame analysis log, and search for "MapType:1" - there should only be one of those per frame.
  2. Then search through the file for whatever resource handle appears on that line after pResource - this should lead you to a CopySubResourceRegion.
  3. Then search through the file again for the resource handle that appears after "Src resource=" - this should lead you to an OMSetRenderTargets line.
  4. From there search >backwards< in the file to find the most recent "PSSetShader(" and take the hash that appears at the end of this line.

d3dx.ini:

[ShaderOverrideFlicker]
hash = 630978719b4885a7
; This shader downscales the depth buffer prior to sending it to the CPU for
; occlusion culling. The CPU will only get a mono copy, which results in
; incorrect occlusion culling and appears as flickering geometry in the
; distance that is just to the right of something in the foreground.
;
; One option to solve this is to kill the depth buffer copy back to the CPU,
; but that removes the performance benefit of occlusion culling, which can be
; quite significant. Another option that should retain the performance benefit
; of occlusion culling is to combine the depth buffers from both eyes into a
; single depth buffer that is the max(left, right) depths prior to sending it
; to the CPU.
;
; This shader is responsible for downscaling the depth buffer in several passes
; so that the copy back to the CPU doesn't kill performance. We need to
; interject in this process at some point to combine the depth buffers, but it
; (technically) doesn't matter exactly when we do it. However, since combining
; the eyes requires a stereo2mono it will add extra overhead on SLI, which
; could be enough to negate the performance benefit of occlusion culling or
; even make things worse. This performance impact depends on the size of the
; buffer we are copying, so ideally we would do this after the downscaling has
; been completed.
;
; We don't have a way to know how many passes there are (unless it's always the
; same independent of resolution, but I have not verified that), nor do we
; currently have any other command list we could trigger off, so for now we
; will interject once after the first downscale pass as a reasonable
; compromise.
;
; NOTE: To work in SLI this requires StereoFlagsDX10=0x.......8
if stereo_active
post run = CustomShaderCryEngineFlickerFix
endif

[CustomShaderCryEngineFlickerFix]
max_executions_per_frame = 1
ps = ShaderFixes\cryengine_flicker_fix.hlsl
ps-t0 = stereo2mono o0
draw = from_caller

cryengine_flicker_fix.hlsl:

Texture2D<float4> _tex0 : register(t0);

void main(
float4 v0 : SV_Position0,
float2 v1 : TEXCOORD0,
out float4 o0 : SV_Target0)
{
float width, height;

_tex0.GetDimensions(width, height);
float4 right = _tex0.Load(int3(v0.xy, 0));
float4 left = _tex0.Load(int3(v0.x + width / 2, v0.y, 0));
o0 = max(left, right);
}

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 10/25/2018 08:37 AM   
Ill Try this tomorrow Ian and report back...may be you will make me a verry happy people with your last post tomorrow ^^ You are knowledge is incredible!!!!! I am currently under control ^^ [url]https://www.youtube.com/watch?v=d93P7uPrqHk[/url] I need to get out of this.....
Ill Try this tomorrow Ian and report back...may be you will make me a verry happy people with your last post tomorrow ^^

You are knowledge is incredible!!!!!

I am currently under control ^^

" rel="nofollow" target = "_blank">

I need to get out of this.....

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 10/25/2018 06:57 PM   
Since Years I'm trying to keep the 3D fix for Elder Scrolls Online alive (see [url]http://helixmod.blogspot.com/2014/05/the-elder-scrolls-online-3d-vision-fix.html[/url] and [url]https://forums.geforce.com/default/topic/627896/3d-vision/elder-scrolls-online-3d-vision-compatibility/35/[/url]). So far I have managed to transfer the code from the original fix to the new shaders which are regularly introduced with game updates (without understanding how the fix really works...). But now I got serious trouble as 3Dmigoto has a problem with hunting several PS which I need to change to reduce an issue with specular glow. I get an error beep sound and the code contains error messages like these: [code]// Needs manual fix for instruction: // unknown dcl_: dcl_resource_structured t3, 288 ... if (g_dissolveInverted != 0) { // Known bad code for instruction (needs manual fix): ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r2.y, v10.x, l(272), t3.xxxx r2.y = AnisoWrap[]..swiz; } else {[/code] The complete code of 2 broken shaders can be found here: [url]https://www2.zippyshare.com/v/OtiV2NfK/file.html[/url] [url]https://www2.zippyshare.com/v/NPCh9V79/file.html[/url] I have used the original version of 3Dmigoto included in the fix. But I get the same error with the actual version of 3Dmigoto (1.3.11). Do You happen to know a simple way to fix this issue? Otherwise I will finally give up to fix ESO as it is so annoying to discover every few months that my last fix update got broken by a new game patch again...
Since Years I'm trying to keep the 3D fix for Elder Scrolls Online alive (see http://helixmod.blogspot.com/2014/05/the-elder-scrolls-online-3d-vision-fix.html and https://forums.geforce.com/default/topic/627896/3d-vision/elder-scrolls-online-3d-vision-compatibility/35/). So far I have managed to transfer the code from the original fix to the new shaders which are regularly introduced with game updates (without understanding how the fix really works...). But now I got serious trouble as 3Dmigoto has a problem with hunting several PS which I need to change to reduce an issue with specular glow. I get an error beep sound and the code contains error messages like these:
// Needs manual fix for instruction: 
// unknown dcl_: dcl_resource_structured t3, 288
...
if (g_dissolveInverted != 0) {
// Known bad code for instruction (needs manual fix):
ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r2.y, v10.x, l(272), t3.xxxx
r2.y = AnisoWrap[]..swiz;
} else {


The complete code of 2 broken shaders can be found here:
https://www2.zippyshare.com/v/OtiV2NfK/file.html
https://www2.zippyshare.com/v/NPCh9V79/file.html

I have used the original version of 3Dmigoto included in the fix. But I get the same error with the actual version of 3Dmigoto (1.3.11).
Do You happen to know a simple way to fix this issue? Otherwise I will finally give up to fix ESO as it is so annoying to discover every few months that my last fix update got broken by a new game patch again...

My original display name is 3d4dd - for some reason Nvidia changed it..?!

Posted 10/26/2018 06:57 PM   
You can either switch to assembly shaders and translate the fix into assembly (but note that assembly has it's own gotchas to deal with), or add the structured buffer declarations and accesses in HLSL. To do the later (note - I'm not in front of my gaming box to verify this, so there might be mistakes) take the assembly declaration of the structured buffer: [code] // Resource bind info for g_rPerInstanceShaderConstants // { // // struct ZoPerInstanceShaderConstants // { // // row_major float4x4 m_worldViewProj;// Offset: 0 // row_major float4x4 m_worldView;// Offset: 64 // row_major float4x4 m_world; // Offset: 128 // float4 m_detailValues; // Offset: 192 // float4 m_debugColor; // Offset: 208 // float4 m_tintColor; // Offset: 224 // float4 m_uvScrolling; // Offset: 240 // float4 m_texCoordScaleBias; // Offset: 256 // float m_glowFactor; // Offset: 272 // float m_softAlphaDepth; // Offset: 276 // float m_dissolveAlpha; // Offset: 280 // uint m_dissolveInverted; // Offset: 284 // // } $Element; // Offset: 0 Size: 288 // // } [/code] And translate it into the equivalent HLSL declaration, which is basically just the contained struct - plonk this somewhere at the top of the shader: [code] struct ZoPerInstanceShaderConstants { row_major float4x4 m_worldViewProj;// Offset: 0 row_major float4x4 m_worldView;// Offset: 64 row_major float4x4 m_world; // Offset: 128 float4 m_detailValues; // Offset: 192 float4 m_debugColor; // Offset: 208 float4 m_tintColor; // Offset: 224 float4 m_uvScrolling; // Offset: 240 float4 m_texCoordScaleBias; // Offset: 256 float m_glowFactor; // Offset: 272 float m_softAlphaDepth; // Offset: 276 float m_dissolveAlpha; // Offset: 280 uint m_dissolveInverted; // Offset: 284 }; [/code] Find this line and correct it to refer to the correct structure type definition, change from: [code] StructuredBuffer<g_rPerInstanceShaderConstants> g_rPerInstanceShaderConstants : register(t3); [/code] To (note the part in angle brackets): [code] StructuredBuffer<ZoPerInstanceShaderConstants> g_rPerInstanceShaderConstants : register(t3); [/code] Ignore this - the manual fix here is what we just did: [code] // Needs manual fix for instruction: // unknown dcl_: dcl_resource_structured t3, 288 [/code] For each of these: [code] // Known bad code for instruction (needs manual fix): ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r3.w, v10.x, l(272), t3.xxxx [/code] you need to translate them into the correct HLSL. This one should become: [code] r3.w = g_rPerInstanceShaderConstants[v10.x].m_glowFactor; [/code] Study the relationship between those two lines - notice where r3.w and v10.x came from in the above line. g_rPerInstanceShaderConstants is the name of the structure in the t3 register. m_glowFactor was found by looking up the l(272) offset in the structure definition. (As above, I'm not in front of my gaming computer to verify this, so please excuse any mistakes) Repeat this process for the remaining ld_structured_indexable lines. The next one has one minor gotcha: [code] // Known bad code for instruction (needs manual fix): ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r2.xyzw, v10.x, l(208), t3.xyzw [/code] This should become: [code] r2 = g_rPerInstanceShaderConstants[v10.x].m_debugColor; [/code] The gotcha here was that I dropped the .xyzw on the r2 output, since "r2.xyzw" refers to all four components of r2, which is the same as just writing "r2", but the HLSL compiler might not like it if all four components are specified on an output (one, two or three are fine).
You can either switch to assembly shaders and translate the fix into assembly (but note that assembly has it's own gotchas to deal with), or add the structured buffer declarations and accesses in HLSL.

To do the later (note - I'm not in front of my gaming box to verify this, so there might be mistakes) take the assembly declaration of the structured buffer:
// Resource bind info for g_rPerInstanceShaderConstants
// {
//
// struct ZoPerInstanceShaderConstants
// {
//
// row_major float4x4 m_worldViewProj;// Offset: 0
// row_major float4x4 m_worldView;// Offset: 64
// row_major float4x4 m_world; // Offset: 128
// float4 m_detailValues; // Offset: 192
// float4 m_debugColor; // Offset: 208
// float4 m_tintColor; // Offset: 224
// float4 m_uvScrolling; // Offset: 240
// float4 m_texCoordScaleBias; // Offset: 256
// float m_glowFactor; // Offset: 272
// float m_softAlphaDepth; // Offset: 276
// float m_dissolveAlpha; // Offset: 280
// uint m_dissolveInverted; // Offset: 284
//
// } $Element; // Offset: 0 Size: 288
//
// }


And translate it into the equivalent HLSL declaration, which is basically just the contained struct - plonk this somewhere at the top of the shader:

struct ZoPerInstanceShaderConstants
{
row_major float4x4 m_worldViewProj;// Offset: 0
row_major float4x4 m_worldView;// Offset: 64
row_major float4x4 m_world; // Offset: 128
float4 m_detailValues; // Offset: 192
float4 m_debugColor; // Offset: 208
float4 m_tintColor; // Offset: 224
float4 m_uvScrolling; // Offset: 240
float4 m_texCoordScaleBias; // Offset: 256
float m_glowFactor; // Offset: 272
float m_softAlphaDepth; // Offset: 276
float m_dissolveAlpha; // Offset: 280
uint m_dissolveInverted; // Offset: 284

};


Find this line and correct it to refer to the correct structure type definition, change from:
StructuredBuffer<g_rPerInstanceShaderConstants> g_rPerInstanceShaderConstants : register(t3);


To (note the part in angle brackets):
StructuredBuffer<ZoPerInstanceShaderConstants> g_rPerInstanceShaderConstants : register(t3);


Ignore this - the manual fix here is what we just did:
// Needs manual fix for instruction: 
// unknown dcl_: dcl_resource_structured t3, 288


For each of these:
// Known bad code for instruction (needs manual fix):
ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r3.w, v10.x, l(272), t3.xxxx


you need to translate them into the correct HLSL. This one should become:
r3.w = g_rPerInstanceShaderConstants[v10.x].m_glowFactor;


Study the relationship between those two lines - notice where r3.w and v10.x came from in the above line. g_rPerInstanceShaderConstants is the name of the structure in the t3 register. m_glowFactor was found by looking up the l(272) offset in the structure definition. (As above, I'm not in front of my gaming computer to verify this, so please excuse any mistakes)

Repeat this process for the remaining ld_structured_indexable lines. The next one has one minor gotcha:
// Known bad code for instruction (needs manual fix):
ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r2.xyzw, v10.x, l(208), t3.xyzw


This should become:
r2 = g_rPerInstanceShaderConstants[v10.x].m_debugColor;


The gotcha here was that I dropped the .xyzw on the r2 output, since "r2.xyzw" refers to all four components of r2, which is the same as just writing "r2", but the HLSL compiler might not like it if all four components are specified on an output (one, two or three are fine).

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 10/26/2018 07:59 PM   
Thank You so much for Your fast help! Have to go to bed now (23:30 for me) and will take a closer look at it tomorrow.
Thank You so much for Your fast help! Have to go to bed now (23:30 for me) and will take a closer look at it tomorrow.

My original display name is 3d4dd - for some reason Nvidia changed it..?!

Posted 10/26/2018 09:30 PM   
(Maybe my update has more relevant informations, see next post!) So far I had no success. Probably I made something wrong when I tried to implement Your suggestions. Maybe we could focus on fixing f8bdf818996f7aae-ps_replace.txt first as I can check the result already in the character selection screen and don't have to load the complete map. The original code was: [code]// specular glow ---- Created with 3Dmigoto v1.2.56 on Fri Oct 26 19:35:33 2018 cbuffer cbPerFrame : register(b0) { row_major float4x4 g_view : packoffset(c0); float4 g_sceneTextureSize : packoffset(c4); float4 g_noiseTextureSize : packoffset(c5); float4 g_terrainWireframeColor : packoffset(c6); float4 g_standardWireframeColor : packoffset(c7); bool g_shouldPancakeShadows : packoffset(c8); float g_glowAmbientOcclusionThreshold : packoffset(c8.y) = {0.0199999996}; } cbuffer cbPerObject_Standard : register(b1) { float4 g_detailValues : packoffset(c0); float4 g_debugColor : packoffset(c1); float4 g_tintColor : packoffset(c2); float g_glowFactor : packoffset(c3); float g_alphaClip : packoffset(c3.y); float g_softAlphaDepth : packoffset(c3.z); float g_dissolveAlpha : packoffset(c3.w); bool g_dissolveInverted : packoffset(c4) = false; bool g_useInstancedRendering : packoffset(c4.y) = false; } cbuffer cbPerObject_Uncommon : register(b2) { row_major float4x4 g_mtxTintPrimary : packoffset(c0); row_major float4x4 g_mtxTintSecondary : packoffset(c4); row_major float4x4 g_mtxTintAccent : packoffset(c8); float4 g_haloColor : packoffset(c12) = {1,0,0,1}; float4 g_tabTargetColor : packoffset(c13) = {1,1,1,1}; float4 g_additiveColor : packoffset(c14) = {0,0,0,0}; float4 g_biomeOrientationAndUVScale : packoffset(c15) = {0,0,0,0}; float4 g_biomeSettings : packoffset(c16) = {0,0,0,0}; float4 g_biomeMultipliers : packoffset(c17) = {0,0,0,0}; float4 g_waveParams : packoffset(c18) = {0,0,0,0}; float4 g_waveDir : packoffset(c19) = {1,0,0,0}; float g_biomeUVChannel : packoffset(c20) = {0}; float g_biomeFresnelOrGlow : packoffset(c20.y) = {0}; float g_distortionFactor : packoffset(c20.z) = {1}; float g_materialBrightness : packoffset(c20.w) = {1}; float g_biomeIgnoreSurfaceNormals : packoffset(c21) = {0}; float g_overlayUVScale : packoffset(c21.y) = {1}; float g_fresnelAlphaFactor : packoffset(c21.z) = {0}; float g_fresnelAlphaPower : packoffset(c21.w) = {0}; int g_overlayUVChannel : packoffset(c22) = {0}; int g_overlayMaskUVChannel : packoffset(c22.y) = {2}; int g_instanceBufferIdxOffset : packoffset(c22.z) = {0}; bool g_shaderBoolean : packoffset(c22.w); bool g_useOverlay : packoffset(c23); bool g_applyFogToAlpha : packoffset(c23.y); } SamplerState AnisoWrap_s : register(s0); Texture2D<float4> g_diffuseTexture : register(t0); Texture2D<float4> g_normalTexture : register(t1); Texture2D<float4> g_specularTexture : register(t2); StructuredBuffer<g_rPerInstanceShaderConstants> g_rPerInstanceShaderConstants : register(t3); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_POSITION0, float4 v1 : COLOR0, float4 v2 : COLOR1, float2 v3 : TEXCOORD0, float2 w3 : TEXCOORD3, float4 v4 : TEXCOORD1, float4 v5 : TEXCOORD2, float4 v6 : TEXCOORD4, float4 v7 : TEXCOORD5, float4 v8 : TEXCOORD6, float4 v9 : TEXCOORD7, nointerpolation uint v10 : TEXCOORD8, float4 v11 : SV_CLIPDISTANCE0, out float4 o0 : SV_TARGET0, out float4 o1 : SV_TARGET1, out float4 o2 : SV_TARGET2, out float4 o3 : SV_TARGET3) { // Needs manual fix for instruction: // unknown dcl_: dcl_resource_structured t3, 288 float4 r0,r1,r2,r3,r4,r5,r6; uint4 bitmask, uiDest; float4 fDest; r0.xyzw = g_diffuseTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw; r1.xyzw = g_specularTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw; r2.xyzw = g_normalTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw; r0.xyz = v1.xyz * r0.xyz; r3.xyz = v1.xyz * r1.xyz; r3.w = dot(v5.xyz, v5.xyz); r3.w = rsqrt(r3.w); r4.xyz = v5.xyz * r3.www; r3.w = dot(v7.xyz, v7.xyz); r3.w = rsqrt(r3.w); r5.xyz = v7.xyz * r3.www; r3.w = dot(v8.xyz, v8.xyz); r3.w = rsqrt(r3.w); r6.xyz = v8.xyz * r3.www; r2.yw = r2.wy * float2(2,2) + float2(-1,-1); r3.w = dot(r2.yw, r2.yw); r3.w = 1 + -r3.w; r3.w = max(0, r3.w); r3.w = sqrt(r3.w); r5.xyz = r2.yyy * -r5.xyz; r5.xyz = r3.www * r4.xyz + r5.xyz; r5.xyz = r2.www * -r6.xyz + r5.xyz; r2.y = dot(r5.xyz, r5.xyz); r2.y = rsqrt(r2.y); r5.xyz = r5.xyz * r2.yyy; if (g_dissolveInverted != 0) { // Known bad code for instruction (needs manual fix): ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r2.y, v10.x, l(272), t3.xxxx r2.y = AnisoWrap[]..swiz; } else { r2.y = g_glowFactor; } r2.xz = r2.xz * r2.yz; r2.y = dot(v4.xyz, v4.xyz); r2.y = rsqrt(r2.y); r6.xyz = v4.xyz * r2.yyy; r0.w = r0.w * v1.w + -g_alphaClip; r0.w = cmp(r0.w < 0); if (r0.w != 0) discard; r0.w = dot(r5.xyz, r6.xyz); r0.w = 1 + -abs(r0.w); r2.y = r0.w * r0.w; r0.w = r2.y * r0.w; r2.y = dot(r4.xyz, r6.xyz); r2.y = 1 + -abs(r2.y); r2.y = r2.y * r2.y; r0.w = r2.y * r0.w; r0.w = r0.w * r2.z; r2.y = max(0, -r2.x); r2.y = 1 + r2.y; r2.y = 1 / r2.y; r2.x = saturate(0.100000001 * r2.x); r2.x = 9.99999997e-007 + r2.x; r2.x = rsqrt(r2.x); r4.w = 1 / r2.x; r2.xzw = r2.yyy * r0.xyz; r1.xyz = -r1.xyz * v1.xyz + float3(1,1,1); o3.xyz = r0.www * r1.xyz + r3.xyz; r1.xyz = g_view._m10_m11_m12 * r5.yyy; r1.xyz = r5.xxx * g_view._m00_m01_m02 + r1.xyz; r1.xyz = r5.zzz * g_view._m20_m21_m22 + r1.xyz; r0.w = 1 + r1.z; o1.xy = r1.xy / r0.ww; if (g_dissolveInverted != 0) { // Known bad code for instruction (needs manual fix): ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r3.xyzw, v10.x, l(208), t3.xyzw r3.x = AnisoWrap[]..swiz; r3.y = AnisoWrap[]..swiz; r3.z = AnisoWrap[]..swiz; r3.w = AnisoWrap[]..swiz; r1.xyz = -r0.xyz * r2.yyy + r3.xyz; r1.xyz = r3.www * r1.xyz + r2.xzw; } else { r0.xyz = -r0.xyz * r2.yyy + g_debugColor.xyz; r1.xyz = g_debugColor.www * r0.xyz + r2.xzw; } r4.xyz = g_additiveColor.xyz + r1.xyz; r0.xyzw = g_tintColor.xyzw * r4.xyzw; o0.xyz = g_materialBrightness * r0.xyz; o0.w = r0.w; o1.zw = float2(0,0); o2.x = -v6.z; o2.yzw = float3(0,0,0); o3.w = r1.w; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // using 3Dmigoto v1.2.56 on Fri Oct 26 19:35:33 2018 // // // Buffer Definitions: // // cbuffer cbPerFrame // { // // row_major float4x4 g_view; // Offset: 0 Size: 64 // float4 g_sceneTextureSize; // Offset: 64 Size: 16 [unused] // float4 g_noiseTextureSize; // Offset: 80 Size: 16 [unused] // float4 g_terrainWireframeColor; // Offset: 96 Size: 16 [unused] // float4 g_standardWireframeColor; // Offset: 112 Size: 16 [unused] // bool g_shouldPancakeShadows; // Offset: 128 Size: 4 [unused] // float g_glowAmbientOcclusionThreshold;// Offset: 132 Size: 4 [unused] // = 0x3ca3d70a // // } // // cbuffer cbPerObject_Standard // { // // float4 g_detailValues; // Offset: 0 Size: 16 [unused] // float4 g_debugColor; // Offset: 16 Size: 16 // float4 g_tintColor; // Offset: 32 Size: 16 // float g_glowFactor; // Offset: 48 Size: 4 // float g_alphaClip; // Offset: 52 Size: 4 // float g_softAlphaDepth; // Offset: 56 Size: 4 [unused] // float g_dissolveAlpha; // Offset: 60 Size: 4 [unused] // bool g_dissolveInverted; // Offset: 64 Size: 4 [unused] // = 0x00000000 // bool g_useInstancedRendering; // Offset: 68 Size: 4 // = 0x00000000 // // } // // cbuffer cbPerObject_Uncommon // { // // row_major float4x4 g_mtxTintPrimary;// Offset: 0 Size: 64 [unused] // row_major float4x4 g_mtxTintSecondary;// Offset: 64 Size: 64 [unused] // row_major float4x4 g_mtxTintAccent;// Offset: 128 Size: 64 [unused] // float4 g_haloColor; // Offset: 192 Size: 16 [unused] // = 0x3f800000 0x00000000 0x00000000 0x3f800000 // float4 g_tabTargetColor; // Offset: 208 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 g_additiveColor; // Offset: 224 Size: 16 // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_biomeOrientationAndUVScale;// Offset: 240 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_biomeSettings; // Offset: 256 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_biomeMultipliers; // Offset: 272 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_waveParams; // Offset: 288 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_waveDir; // Offset: 304 Size: 16 [unused] // = 0x3f800000 0x00000000 0x00000000 0x00000000 // float g_biomeUVChannel; // Offset: 320 Size: 4 [unused] // = 0x00000000 // float g_biomeFresnelOrGlow; // Offset: 324 Size: 4 [unused] // = 0x00000000 // float g_distortionFactor; // Offset: 328 Size: 4 [unused] // = 0x3f800000 // float g_materialBrightness; // Offset: 332 Size: 4 // = 0x3f800000 // float g_biomeIgnoreSurfaceNormals; // Offset: 336 Size: 4 [unused] // = 0x00000000 // float g_overlayUVScale; // Offset: 340 Size: 4 [unused] // = 0x3f800000 // float g_fresnelAlphaFactor; // Offset: 344 Size: 4 [unused] // = 0x00000000 // float g_fresnelAlphaPower; // Offset: 348 Size: 4 [unused] // = 0x00000000 // int g_overlayUVChannel; // Offset: 352 Size: 4 [unused] // = 0x00000000 // int g_overlayMaskUVChannel; // Offset: 356 Size: 4 [unused] // = 0x00000002 // int g_instanceBufferIdxOffset; // Offset: 360 Size: 4 [unused] // = 0x00000000 // bool g_shaderBoolean; // Offset: 364 Size: 4 [unused] // bool g_useOverlay; // Offset: 368 Size: 4 [unused] // bool g_applyFogToAlpha; // Offset: 372 Size: 4 [unused] // // } // // Resource bind info for g_rPerInstanceShaderConstants // { // // struct ZoPerInstanceShaderConstants // { // // row_major float4x4 m_worldViewProj;// Offset: 0 // row_major float4x4 m_worldView;// Offset: 64 // row_major float4x4 m_world; // Offset: 128 // float4 m_detailValues; // Offset: 192 // float4 m_debugColor; // Offset: 208 // float4 m_tintColor; // Offset: 224 // float4 m_uvScrolling; // Offset: 240 // float4 m_texCoordScaleBias; // Offset: 256 // float m_glowFactor; // Offset: 272 // float m_softAlphaDepth; // Offset: 276 // float m_dissolveAlpha; // Offset: 280 // uint m_dissolveInverted; // Offset: 284 // // } $Element; // Offset: 0 Size: 288 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // AnisoWrap sampler NA NA 0 1 // g_diffuseTexture texture float4 2d 0 1 // g_normalTexture texture float4 2d 1 1 // g_specularTexture texture float4 2d 2 1 // g_rPerInstanceShaderConstants texture struct r/o 3 1 // cbPerFrame cbuffer NA NA 0 1 // cbPerObject_Standard cbuffer NA NA 1 1 // cbPerObject_Uncommon cbuffer NA NA 2 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_POSITION 0 xyzw 0 POS float // COLOR 0 xyzw 1 NONE float xyzw // COLOR 1 xyzw 2 NONE float // TEXCOORD 0 xy 3 NONE float xy // TEXCOORD 3 zw 3 NONE float // TEXCOORD 1 xyz 4 NONE float xyz // TEXCOORD 2 xyz 5 NONE float xyz // TEXCOORD 4 xyz 6 NONE float z // TEXCOORD 5 xyz 7 NONE float xyz // TEXCOORD 6 xyz 8 NONE float xyz // TEXCOORD 7 xy 9 NONE float // TEXCOORD 8 x 10 NONE uint x // SV_CLIPDISTANCE 0 xyzw 11 CLIPDST float // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_TARGET 0 xyzw 0 TARGET float xyzw // SV_TARGET 1 xyzw 1 TARGET float xyzw // SV_TARGET 2 xyzw 2 TARGET float xyzw // SV_TARGET 3 xyzw 3 TARGET float xyzw // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[3], immediateIndexed dcl_constantbuffer cb1[5], immediateIndexed dcl_constantbuffer cb2[21], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t2 dcl_resource_structured t3, 288 dcl_input_ps linear v1.xyzw dcl_input_ps linear v3.xy dcl_input_ps linear v4.xyz dcl_input_ps linear v5.xyz dcl_input_ps linear v6.z dcl_input_ps linear v7.xyz dcl_input_ps linear v8.xyz dcl_input_ps constant v10.x dcl_output o0.xyzw dcl_output o1.xyzw dcl_output o2.xyzw dcl_output o3.xyzw dcl_temps 7 sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r0.xyzw, v3.xyxx, t0.xyzw, s0 sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.xyzw, v3.xyxx, t2.xyzw, s0 sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r2.xyzw, v3.xyxx, t1.xyzw, s0 mul r0.xyz, r0.xyzx, v1.xyzx mul r3.xyz, r1.xyzx, v1.xyzx dp3 r3.w, v5.xyzx, v5.xyzx rsq r3.w, r3.w mul r4.xyz, r3.wwww, v5.xyzx dp3 r3.w, v7.xyzx, v7.xyzx rsq r3.w, r3.w mul r5.xyz, r3.wwww, v7.xyzx dp3 r3.w, v8.xyzx, v8.xyzx rsq r3.w, r3.w mul r6.xyz, r3.wwww, v8.xyzx mad r2.yw, r2.wwwy, l(0.000000, 2.000000, 0.000000, 2.000000), l(0.000000, -1.000000, 0.000000, -1.000000) dp2 r3.w, r2.ywyy, r2.ywyy add r3.w, -r3.w, l(1.000000) max r3.w, r3.w, l(0.000000) sqrt r3.w, r3.w mul r5.xyz, -r5.xyzx, r2.yyyy mad r5.xyz, r3.wwww, r4.xyzx, r5.xyzx mad r5.xyz, r2.wwww, -r6.xyzx, r5.xyzx dp3 r2.y, r5.xyzx, r5.xyzx rsq r2.y, r2.y mul r5.xyz, r2.yyyy, r5.xyzx if_nz cb1[4].y ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r2.y, v10.x, l(272), t3.xxxx else mov r2.y, cb1[3].x endif mul r2.xz, r2.yyzy, r2.xxzx dp3 r2.y, v4.xyzx, v4.xyzx rsq r2.y, r2.y mul r6.xyz, r2.yyyy, v4.xyzx mad r0.w, r0.w, v1.w, -cb1[3].y lt r0.w, r0.w, l(0.000000) discard_nz r0.w dp3 r0.w, r5.xyzx, r6.xyzx add r0.w, -|r0.w|, l(1.000000) mul r2.y, r0.w, r0.w mul r0.w, r0.w, r2.y dp3 r2.y, r4.xyzx, r6.xyzx add r2.y, -|r2.y|, l(1.000000) mul r2.y, r2.y, r2.y mul r0.w, r0.w, r2.y mul r0.w, r2.z, r0.w max r2.y, -r2.x, l(0.000000) add r2.y, r2.y, l(1.000000) div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y mul_sat r2.x, r2.x, l(0.100000) add r2.x, r2.x, l(0.000001) rsq r2.x, r2.x div r4.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.x mul r2.xzw, r0.xxyz, r2.yyyy mad r1.xyz, -r1.xyzx, v1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) mad o3.xyz, r0.wwww, r1.xyzx, r3.xyzx mul r1.xyz, r5.yyyy, cb0[1].xyzx mad r1.xyz, r5.xxxx, cb0[0].xyzx, r1.xyzx mad r1.xyz, r5.zzzz, cb0[2].xyzx, r1.xyzx add r0.w, r1.z, l(1.000000) div o1.xy, r1.xyxx, r0.wwww if_nz cb1[4].y ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r3.xyzw, v10.x, l(208), t3.xyzw mad r1.xyz, -r0.xyzx, r2.yyyy, r3.xyzx mad r1.xyz, r3.wwww, r1.xyzx, r2.xzwx else mad r0.xyz, -r0.xyzx, r2.yyyy, cb1[1].xyzx mad r1.xyz, cb1[1].wwww, r0.xyzx, r2.xzwx endif add r4.xyz, r1.xyzx, cb2[14].xyzx mul r0.xyzw, r4.xyzw, cb1[2].xyzw mul o0.xyz, r0.xyzx, cb2[20].wwww mov o0.w, r0.w mov o1.zw, l(0,0,0,0) mov o2.x, -v6.z mov o2.yzw, l(0,0,0,0) mov o3.w, r1.w ret // Approximately 78 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/[/code] I have changed it to (see line 3-17, 76, 134, 171): [code]// specular glow ---- Created with 3Dmigoto v1.2.56 on Sat Oct 27 09:13:36 2018 struct ZoPerInstanceShaderConstants { row_major float4x4 m_worldViewProj;// Offset: 0 row_major float4x4 m_worldView;// Offset: 64 row_major float4x4 m_world; // Offset: 128 float4 m_detailValues; // Offset: 192 float4 m_debugColor; // Offset: 208 float4 m_tintColor; // Offset: 224 float4 m_uvScrolling; // Offset: 240 float4 m_texCoordScaleBias; // Offset: 256 float m_glowFactor; // Offset: 272 float m_softAlphaDepth; // Offset: 276 float m_dissolveAlpha; // Offset: 280 uint m_dissolveInverted; // Offset: 284 }; cbuffer cbPerFrame : register(b0) { row_major float4x4 g_view : packoffset(c0); float4 g_sceneTextureSize : packoffset(c4); float4 g_noiseTextureSize : packoffset(c5); float4 g_terrainWireframeColor : packoffset(c6); float4 g_standardWireframeColor : packoffset(c7); bool g_shouldPancakeShadows : packoffset(c8); float g_glowAmbientOcclusionThreshold : packoffset(c8.y) = {0.0199999996}; } cbuffer cbPerObject_Standard : register(b1) { float4 g_detailValues : packoffset(c0); float4 g_debugColor : packoffset(c1); float4 g_tintColor : packoffset(c2); float g_glowFactor : packoffset(c3); float g_alphaClip : packoffset(c3.y); float g_softAlphaDepth : packoffset(c3.z); float g_dissolveAlpha : packoffset(c3.w); bool g_dissolveInverted : packoffset(c4) = false; bool g_useInstancedRendering : packoffset(c4.y) = false; } cbuffer cbPerObject_Uncommon : register(b2) { row_major float4x4 g_mtxTintPrimary : packoffset(c0); row_major float4x4 g_mtxTintSecondary : packoffset(c4); row_major float4x4 g_mtxTintAccent : packoffset(c8); float4 g_haloColor : packoffset(c12) = {1,0,0,1}; float4 g_tabTargetColor : packoffset(c13) = {1,1,1,1}; float4 g_additiveColor : packoffset(c14) = {0,0,0,0}; float4 g_biomeOrientationAndUVScale : packoffset(c15) = {0,0,0,0}; float4 g_biomeSettings : packoffset(c16) = {0,0,0,0}; float4 g_biomeMultipliers : packoffset(c17) = {0,0,0,0}; float4 g_waveParams : packoffset(c18) = {0,0,0,0}; float4 g_waveDir : packoffset(c19) = {1,0,0,0}; float g_biomeUVChannel : packoffset(c20) = {0}; float g_biomeFresnelOrGlow : packoffset(c20.y) = {0}; float g_distortionFactor : packoffset(c20.z) = {1}; float g_materialBrightness : packoffset(c20.w) = {1}; float g_biomeIgnoreSurfaceNormals : packoffset(c21) = {0}; float g_overlayUVScale : packoffset(c21.y) = {1}; float g_fresnelAlphaFactor : packoffset(c21.z) = {0}; float g_fresnelAlphaPower : packoffset(c21.w) = {0}; int g_overlayUVChannel : packoffset(c22) = {0}; int g_overlayMaskUVChannel : packoffset(c22.y) = {2}; int g_instanceBufferIdxOffset : packoffset(c22.z) = {0}; bool g_shaderBoolean : packoffset(c22.w); bool g_useOverlay : packoffset(c23); bool g_applyFogToAlpha : packoffset(c23.y); } SamplerState AnisoWrap_s : register(s0); Texture2D<float4> g_diffuseTexture : register(t0); Texture2D<float4> g_normalTexture : register(t1); Texture2D<float4> g_specularTexture : register(t2); StructuredBuffer<ZoPerInstanceShaderConstants> g_rPerInstanceShaderConstants : register(t3); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_POSITION0, float4 v1 : COLOR0, float4 v2 : COLOR1, float2 v3 : TEXCOORD0, float2 w3 : TEXCOORD3, float4 v4 : TEXCOORD1, float4 v5 : TEXCOORD2, float4 v6 : TEXCOORD4, float4 v7 : TEXCOORD5, float4 v8 : TEXCOORD6, float4 v9 : TEXCOORD7, nointerpolation uint v10 : TEXCOORD8, float4 v11 : SV_CLIPDISTANCE0, out float4 o0 : SV_TARGET0, out float4 o1 : SV_TARGET1, out float4 o2 : SV_TARGET2, out float4 o3 : SV_TARGET3) { float4 r0,r1,r2,r3,r4,r5,r6; uint4 bitmask, uiDest; float4 fDest; r0.xyzw = g_diffuseTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw; r1.xyzw = g_specularTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw; r2.xyzw = g_normalTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw; r0.xyz = v1.xyz * r0.xyz; r3.xyz = v1.xyz * r1.xyz; r3.w = dot(v5.xyz, v5.xyz); r3.w = rsqrt(r3.w); r4.xyz = v5.xyz * r3.www; r3.w = dot(v7.xyz, v7.xyz); r3.w = rsqrt(r3.w); r5.xyz = v7.xyz * r3.www; r3.w = dot(v8.xyz, v8.xyz); r3.w = rsqrt(r3.w); r6.xyz = v8.xyz * r3.www; r2.yw = r2.wy * float2(2,2) + float2(-1,-1); r3.w = dot(r2.yw, r2.yw); r3.w = 1 + -r3.w; r3.w = max(0, r3.w); r3.w = sqrt(r3.w); r5.xyz = r2.yyy * -r5.xyz; r5.xyz = r3.www * r4.xyz + r5.xyz; r5.xyz = r2.www * -r6.xyz + r5.xyz; r2.y = dot(r5.xyz, r5.xyz); r2.y = rsqrt(r2.y); r5.xyz = r5.xyz * r2.yyy; if (g_dissolveInverted != 0) { r2.y = g_rPerInstanceShaderConstants[v10.x].m_glowFactor; r2.y = AnisoWrap[]..swiz; } else { r2.y = g_glowFactor; } r2.xz = r2.xz * r2.yz; r2.y = dot(v4.xyz, v4.xyz); r2.y = rsqrt(r2.y); r6.xyz = v4.xyz * r2.yyy; r0.w = r0.w * v1.w + -g_alphaClip; r0.w = cmp(r0.w < 0); if (r0.w != 0) discard; r0.w = dot(r5.xyz, r6.xyz); r0.w = 1 + -abs(r0.w); r2.y = r0.w * r0.w; r0.w = r2.y * r0.w; r2.y = dot(r4.xyz, r6.xyz); r2.y = 1 + -abs(r2.y); r2.y = r2.y * r2.y; r0.w = r2.y * r0.w; r0.w = r0.w * r2.z; r2.y = max(0, -r2.x); r2.y = 1 + r2.y; r2.y = 1 / r2.y; r2.x = saturate(0.100000001 * r2.x); r2.x = 9.99999997e-007 + r2.x; r2.x = rsqrt(r2.x); r4.w = 1 / r2.x; r2.xzw = r2.yyy * r0.xyz; r1.xyz = -r1.xyz * v1.xyz + float3(1,1,1); o3.xyz = r0.www * r1.xyz + r3.xyz; r1.xyz = g_view._m10_m11_m12 * r5.yyy; r1.xyz = r5.xxx * g_view._m00_m01_m02 + r1.xyz; r1.xyz = r5.zzz * g_view._m20_m21_m22 + r1.xyz; r0.w = 1 + r1.z; o1.xy = r1.xy / r0.ww; if (g_dissolveInverted != 0) { r3 = g_rPerInstanceShaderConstants[v10.x].m_debugColor; r3.x = AnisoWrap[]..swiz; r3.y = AnisoWrap[]..swiz; r3.z = AnisoWrap[]..swiz; r3.w = AnisoWrap[]..swiz; r1.xyz = -r0.xyz * r2.yyy + r3.xyz; r1.xyz = r3.www * r1.xyz + r2.xzw; } else { r0.xyz = -r0.xyz * r2.yyy + g_debugColor.xyz; r1.xyz = g_debugColor.www * r0.xyz + r2.xzw; } r4.xyz = g_additiveColor.xyz + r1.xyz; r0.xyzw = g_tintColor.xyzw * r4.xyzw; o0.xyz = g_materialBrightness * r0.xyz; o0.w = r0.w; o1.zw = float2(0,0); o2.x = -v6.z; o2.yzw = float3(0,0,0); o3.w = r1.w; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // using 3Dmigoto v1.2.56 on Sat Oct 27 09:13:36 2018 // // // Buffer Definitions: // // cbuffer cbPerFrame // { // // row_major float4x4 g_view; // Offset: 0 Size: 64 // float4 g_sceneTextureSize; // Offset: 64 Size: 16 [unused] // float4 g_noiseTextureSize; // Offset: 80 Size: 16 [unused] // float4 g_terrainWireframeColor; // Offset: 96 Size: 16 [unused] // float4 g_standardWireframeColor; // Offset: 112 Size: 16 [unused] // bool g_shouldPancakeShadows; // Offset: 128 Size: 4 [unused] // float g_glowAmbientOcclusionThreshold;// Offset: 132 Size: 4 [unused] // = 0x3ca3d70a // // } // // cbuffer cbPerObject_Standard // { // // float4 g_detailValues; // Offset: 0 Size: 16 [unused] // float4 g_debugColor; // Offset: 16 Size: 16 // float4 g_tintColor; // Offset: 32 Size: 16 // float g_glowFactor; // Offset: 48 Size: 4 // float g_alphaClip; // Offset: 52 Size: 4 // float g_softAlphaDepth; // Offset: 56 Size: 4 [unused] // float g_dissolveAlpha; // Offset: 60 Size: 4 [unused] // bool g_dissolveInverted; // Offset: 64 Size: 4 [unused] // = 0x00000000 // bool g_useInstancedRendering; // Offset: 68 Size: 4 // = 0x00000000 // // } // // cbuffer cbPerObject_Uncommon // { // // row_major float4x4 g_mtxTintPrimary;// Offset: 0 Size: 64 [unused] // row_major float4x4 g_mtxTintSecondary;// Offset: 64 Size: 64 [unused] // row_major float4x4 g_mtxTintAccent;// Offset: 128 Size: 64 [unused] // float4 g_haloColor; // Offset: 192 Size: 16 [unused] // = 0x3f800000 0x00000000 0x00000000 0x3f800000 // float4 g_tabTargetColor; // Offset: 208 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 g_additiveColor; // Offset: 224 Size: 16 // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_biomeOrientationAndUVScale;// Offset: 240 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_biomeSettings; // Offset: 256 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_biomeMultipliers; // Offset: 272 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_waveParams; // Offset: 288 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_waveDir; // Offset: 304 Size: 16 [unused] // = 0x3f800000 0x00000000 0x00000000 0x00000000 // float g_biomeUVChannel; // Offset: 320 Size: 4 [unused] // = 0x00000000 // float g_biomeFresnelOrGlow; // Offset: 324 Size: 4 [unused] // = 0x00000000 // float g_distortionFactor; // Offset: 328 Size: 4 [unused] // = 0x3f800000 // float g_materialBrightness; // Offset: 332 Size: 4 // = 0x3f800000 // float g_biomeIgnoreSurfaceNormals; // Offset: 336 Size: 4 [unused] // = 0x00000000 // float g_overlayUVScale; // Offset: 340 Size: 4 [unused] // = 0x3f800000 // float g_fresnelAlphaFactor; // Offset: 344 Size: 4 [unused] // = 0x00000000 // float g_fresnelAlphaPower; // Offset: 348 Size: 4 [unused] // = 0x00000000 // int g_overlayUVChannel; // Offset: 352 Size: 4 [unused] // = 0x00000000 // int g_overlayMaskUVChannel; // Offset: 356 Size: 4 [unused] // = 0x00000002 // int g_instanceBufferIdxOffset; // Offset: 360 Size: 4 [unused] // = 0x00000000 // bool g_shaderBoolean; // Offset: 364 Size: 4 [unused] // bool g_useOverlay; // Offset: 368 Size: 4 [unused] // bool g_applyFogToAlpha; // Offset: 372 Size: 4 [unused] // // } // // Resource bind info for g_rPerInstanceShaderConstants // { // // struct ZoPerInstanceShaderConstants // { // // row_major float4x4 m_worldViewProj;// Offset: 0 // row_major float4x4 m_worldView;// Offset: 64 // row_major float4x4 m_world; // Offset: 128 // float4 m_detailValues; // Offset: 192 // float4 m_debugColor; // Offset: 208 // float4 m_tintColor; // Offset: 224 // float4 m_uvScrolling; // Offset: 240 // float4 m_texCoordScaleBias; // Offset: 256 // float m_glowFactor; // Offset: 272 // float m_softAlphaDepth; // Offset: 276 // float m_dissolveAlpha; // Offset: 280 // uint m_dissolveInverted; // Offset: 284 // // } $Element; // Offset: 0 Size: 288 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // AnisoWrap sampler NA NA 0 1 // g_diffuseTexture texture float4 2d 0 1 // g_normalTexture texture float4 2d 1 1 // g_specularTexture texture float4 2d 2 1 // g_rPerInstanceShaderConstants texture struct r/o 3 1 // cbPerFrame cbuffer NA NA 0 1 // cbPerObject_Standard cbuffer NA NA 1 1 // cbPerObject_Uncommon cbuffer NA NA 2 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_POSITION 0 xyzw 0 POS float // COLOR 0 xyzw 1 NONE float xyzw // COLOR 1 xyzw 2 NONE float // TEXCOORD 0 xy 3 NONE float xy // TEXCOORD 3 zw 3 NONE float // TEXCOORD 1 xyz 4 NONE float xyz // TEXCOORD 2 xyz 5 NONE float xyz // TEXCOORD 4 xyz 6 NONE float z // TEXCOORD 5 xyz 7 NONE float xyz // TEXCOORD 6 xyz 8 NONE float xyz // TEXCOORD 7 xy 9 NONE float // TEXCOORD 8 x 10 NONE uint x // SV_CLIPDISTANCE 0 xyzw 11 CLIPDST float // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_TARGET 0 xyzw 0 TARGET float xyzw // SV_TARGET 1 xyzw 1 TARGET float xyzw // SV_TARGET 2 xyzw 2 TARGET float xyzw // SV_TARGET 3 xyzw 3 TARGET float xyzw // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[3], immediateIndexed dcl_constantbuffer cb1[5], immediateIndexed dcl_constantbuffer cb2[21], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t2 dcl_resource_structured t3, 288 dcl_input_ps linear v1.xyzw dcl_input_ps linear v3.xy dcl_input_ps linear v4.xyz dcl_input_ps linear v5.xyz dcl_input_ps linear v6.z dcl_input_ps linear v7.xyz dcl_input_ps linear v8.xyz dcl_input_ps constant v10.x dcl_output o0.xyzw dcl_output o1.xyzw dcl_output o2.xyzw dcl_output o3.xyzw dcl_temps 7 sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r0.xyzw, v3.xyxx, t0.xyzw, s0 sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.xyzw, v3.xyxx, t2.xyzw, s0 sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r2.xyzw, v3.xyxx, t1.xyzw, s0 mul r0.xyz, r0.xyzx, v1.xyzx mul r3.xyz, r1.xyzx, v1.xyzx dp3 r3.w, v5.xyzx, v5.xyzx rsq r3.w, r3.w mul r4.xyz, r3.wwww, v5.xyzx dp3 r3.w, v7.xyzx, v7.xyzx rsq r3.w, r3.w mul r5.xyz, r3.wwww, v7.xyzx dp3 r3.w, v8.xyzx, v8.xyzx rsq r3.w, r3.w mul r6.xyz, r3.wwww, v8.xyzx mad r2.yw, r2.wwwy, l(0.000000, 2.000000, 0.000000, 2.000000), l(0.000000, -1.000000, 0.000000, -1.000000) dp2 r3.w, r2.ywyy, r2.ywyy add r3.w, -r3.w, l(1.000000) max r3.w, r3.w, l(0.000000) sqrt r3.w, r3.w mul r5.xyz, -r5.xyzx, r2.yyyy mad r5.xyz, r3.wwww, r4.xyzx, r5.xyzx mad r5.xyz, r2.wwww, -r6.xyzx, r5.xyzx dp3 r2.y, r5.xyzx, r5.xyzx rsq r2.y, r2.y mul r5.xyz, r2.yyyy, r5.xyzx if_nz cb1[4].y ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r2.y, v10.x, l(272), t3.xxxx else mov r2.y, cb1[3].x endif mul r2.xz, r2.yyzy, r2.xxzx dp3 r2.y, v4.xyzx, v4.xyzx rsq r2.y, r2.y mul r6.xyz, r2.yyyy, v4.xyzx mad r0.w, r0.w, v1.w, -cb1[3].y lt r0.w, r0.w, l(0.000000) discard_nz r0.w dp3 r0.w, r5.xyzx, r6.xyzx add r0.w, -|r0.w|, l(1.000000) mul r2.y, r0.w, r0.w mul r0.w, r0.w, r2.y dp3 r2.y, r4.xyzx, r6.xyzx add r2.y, -|r2.y|, l(1.000000) mul r2.y, r2.y, r2.y mul r0.w, r0.w, r2.y mul r0.w, r2.z, r0.w max r2.y, -r2.x, l(0.000000) add r2.y, r2.y, l(1.000000) div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y mul_sat r2.x, r2.x, l(0.100000) add r2.x, r2.x, l(0.000001) rsq r2.x, r2.x div r4.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.x mul r2.xzw, r0.xxyz, r2.yyyy mad r1.xyz, -r1.xyzx, v1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) mad o3.xyz, r0.wwww, r1.xyzx, r3.xyzx mul r1.xyz, r5.yyyy, cb0[1].xyzx mad r1.xyz, r5.xxxx, cb0[0].xyzx, r1.xyzx mad r1.xyz, r5.zzzz, cb0[2].xyzx, r1.xyzx add r0.w, r1.z, l(1.000000) div o1.xy, r1.xyxx, r0.wwww if_nz cb1[4].y ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r3.xyzw, v10.x, l(208), t3.xyzw mad r1.xyz, -r0.xyzx, r2.yyyy, r3.xyzx mad r1.xyz, r3.wwww, r1.xyzx, r2.xzwx else mad r0.xyz, -r0.xyzx, r2.yyyy, cb1[1].xyzx mad r1.xyz, cb1[1].wwww, r0.xyzx, r2.xzwx endif add r4.xyz, r1.xyzx, cb2[14].xyzx mul r0.xyzw, r4.xyzw, cb1[2].xyzw mul o0.xyz, r0.xyzx, cb2[20].wwww mov o0.w, r0.w mov o1.zw, l(0,0,0,0) mov o2.x, -v6.z mov o2.yzw, l(0,0,0,0) mov o3.w, r1.w ret // Approximately 78 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] BTW should line 17 be "};" or just "}"? Does the fact that there is "t3.xxxx" (line 121 in original shader) in one case and "t3.xyzw" (line 159) in the other case have any meaning for fixing the code? I don't get an error sound when I start the game. But as soon as I make any changes to the shader and reload the shader I get an error sound (used the old 3Dmigoto version included in the original fix). Also inserting my workaround code in the shader BEFORE starting the game has no results as the shader seems to be ignored. My well-tried workaround for the broken specular glow in the game is just to reduce the intensity of the effect by this code (would be inserted in line 109): [code]r1.xyzw = g_specularTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw; r1.w = 0.7 * r1.w;[/code] But as mentioned above it had no effect so far as the shader itself seems to be ignored completely. I have also tested ae831d73076d9e63-ps_replace.txt trying to make the changes You suggested without success. This is the code I used: https://www39.zippyshare.com/v/kANdlNXu/file.html
(Maybe my update has more relevant informations, see next post!)

So far I had no success. Probably I made something wrong when I tried to implement Your suggestions.
Maybe we could focus on fixing f8bdf818996f7aae-ps_replace.txt first as I can check the result already in the character selection screen and don't have to load the complete map.
The original code was:
// specular glow ---- Created with 3Dmigoto v1.2.56 on Fri Oct 26 19:35:33 2018

cbuffer cbPerFrame : register(b0)
{
row_major float4x4 g_view : packoffset(c0);
float4 g_sceneTextureSize : packoffset(c4);
float4 g_noiseTextureSize : packoffset(c5);
float4 g_terrainWireframeColor : packoffset(c6);
float4 g_standardWireframeColor : packoffset(c7);
bool g_shouldPancakeShadows : packoffset(c8);
float g_glowAmbientOcclusionThreshold : packoffset(c8.y) = {0.0199999996};
}

cbuffer cbPerObject_Standard : register(b1)
{
float4 g_detailValues : packoffset(c0);
float4 g_debugColor : packoffset(c1);
float4 g_tintColor : packoffset(c2);
float g_glowFactor : packoffset(c3);
float g_alphaClip : packoffset(c3.y);
float g_softAlphaDepth : packoffset(c3.z);
float g_dissolveAlpha : packoffset(c3.w);
bool g_dissolveInverted : packoffset(c4) = false;
bool g_useInstancedRendering : packoffset(c4.y) = false;
}

cbuffer cbPerObject_Uncommon : register(b2)
{
row_major float4x4 g_mtxTintPrimary : packoffset(c0);
row_major float4x4 g_mtxTintSecondary : packoffset(c4);
row_major float4x4 g_mtxTintAccent : packoffset(c8);
float4 g_haloColor : packoffset(c12) = {1,0,0,1};
float4 g_tabTargetColor : packoffset(c13) = {1,1,1,1};
float4 g_additiveColor : packoffset(c14) = {0,0,0,0};
float4 g_biomeOrientationAndUVScale : packoffset(c15) = {0,0,0,0};
float4 g_biomeSettings : packoffset(c16) = {0,0,0,0};
float4 g_biomeMultipliers : packoffset(c17) = {0,0,0,0};
float4 g_waveParams : packoffset(c18) = {0,0,0,0};
float4 g_waveDir : packoffset(c19) = {1,0,0,0};
float g_biomeUVChannel : packoffset(c20) = {0};
float g_biomeFresnelOrGlow : packoffset(c20.y) = {0};
float g_distortionFactor : packoffset(c20.z) = {1};
float g_materialBrightness : packoffset(c20.w) = {1};
float g_biomeIgnoreSurfaceNormals : packoffset(c21) = {0};
float g_overlayUVScale : packoffset(c21.y) = {1};
float g_fresnelAlphaFactor : packoffset(c21.z) = {0};
float g_fresnelAlphaPower : packoffset(c21.w) = {0};
int g_overlayUVChannel : packoffset(c22) = {0};
int g_overlayMaskUVChannel : packoffset(c22.y) = {2};
int g_instanceBufferIdxOffset : packoffset(c22.z) = {0};
bool g_shaderBoolean : packoffset(c22.w);
bool g_useOverlay : packoffset(c23);
bool g_applyFogToAlpha : packoffset(c23.y);
}

SamplerState AnisoWrap_s : register(s0);
Texture2D<float4> g_diffuseTexture : register(t0);
Texture2D<float4> g_normalTexture : register(t1);
Texture2D<float4> g_specularTexture : register(t2);
StructuredBuffer<g_rPerInstanceShaderConstants> g_rPerInstanceShaderConstants : register(t3);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
float4 v0 : SV_POSITION0,
float4 v1 : COLOR0,
float4 v2 : COLOR1,
float2 v3 : TEXCOORD0,
float2 w3 : TEXCOORD3,
float4 v4 : TEXCOORD1,
float4 v5 : TEXCOORD2,
float4 v6 : TEXCOORD4,
float4 v7 : TEXCOORD5,
float4 v8 : TEXCOORD6,
float4 v9 : TEXCOORD7,
nointerpolation uint v10 : TEXCOORD8,
float4 v11 : SV_CLIPDISTANCE0,
out float4 o0 : SV_TARGET0,
out float4 o1 : SV_TARGET1,
out float4 o2 : SV_TARGET2,
out float4 o3 : SV_TARGET3)
{
// Needs manual fix for instruction:
// unknown dcl_: dcl_resource_structured t3, 288
float4 r0,r1,r2,r3,r4,r5,r6;
uint4 bitmask, uiDest;
float4 fDest;

r0.xyzw = g_diffuseTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw;
r1.xyzw = g_specularTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw;
r2.xyzw = g_normalTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw;
r0.xyz = v1.xyz * r0.xyz;
r3.xyz = v1.xyz * r1.xyz;
r3.w = dot(v5.xyz, v5.xyz);
r3.w = rsqrt(r3.w);
r4.xyz = v5.xyz * r3.www;
r3.w = dot(v7.xyz, v7.xyz);
r3.w = rsqrt(r3.w);
r5.xyz = v7.xyz * r3.www;
r3.w = dot(v8.xyz, v8.xyz);
r3.w = rsqrt(r3.w);
r6.xyz = v8.xyz * r3.www;
r2.yw = r2.wy * float2(2,2) + float2(-1,-1);
r3.w = dot(r2.yw, r2.yw);
r3.w = 1 + -r3.w;
r3.w = max(0, r3.w);
r3.w = sqrt(r3.w);
r5.xyz = r2.yyy * -r5.xyz;
r5.xyz = r3.www * r4.xyz + r5.xyz;
r5.xyz = r2.www * -r6.xyz + r5.xyz;
r2.y = dot(r5.xyz, r5.xyz);
r2.y = rsqrt(r2.y);
r5.xyz = r5.xyz * r2.yyy;
if (g_dissolveInverted != 0) {
// Known bad code for instruction (needs manual fix):
ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r2.y, v10.x, l(272), t3.xxxx
r2.y = AnisoWrap[]..swiz;
} else {
r2.y = g_glowFactor;
}
r2.xz = r2.xz * r2.yz;
r2.y = dot(v4.xyz, v4.xyz);
r2.y = rsqrt(r2.y);
r6.xyz = v4.xyz * r2.yyy;
r0.w = r0.w * v1.w + -g_alphaClip;
r0.w = cmp(r0.w < 0);
if (r0.w != 0) discard;
r0.w = dot(r5.xyz, r6.xyz);
r0.w = 1 + -abs(r0.w);
r2.y = r0.w * r0.w;
r0.w = r2.y * r0.w;
r2.y = dot(r4.xyz, r6.xyz);
r2.y = 1 + -abs(r2.y);
r2.y = r2.y * r2.y;
r0.w = r2.y * r0.w;
r0.w = r0.w * r2.z;
r2.y = max(0, -r2.x);
r2.y = 1 + r2.y;
r2.y = 1 / r2.y;
r2.x = saturate(0.100000001 * r2.x);
r2.x = 9.99999997e-007 + r2.x;
r2.x = rsqrt(r2.x);
r4.w = 1 / r2.x;
r2.xzw = r2.yyy * r0.xyz;
r1.xyz = -r1.xyz * v1.xyz + float3(1,1,1);
o3.xyz = r0.www * r1.xyz + r3.xyz;
r1.xyz = g_view._m10_m11_m12 * r5.yyy;
r1.xyz = r5.xxx * g_view._m00_m01_m02 + r1.xyz;
r1.xyz = r5.zzz * g_view._m20_m21_m22 + r1.xyz;
r0.w = 1 + r1.z;
o1.xy = r1.xy / r0.ww;
if (g_dissolveInverted != 0) {
// Known bad code for instruction (needs manual fix):
ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r3.xyzw, v10.x, l(208), t3.xyzw
r3.x = AnisoWrap[]..swiz;
r3.y = AnisoWrap[]..swiz;
r3.z = AnisoWrap[]..swiz;
r3.w = AnisoWrap[]..swiz;
r1.xyz = -r0.xyz * r2.yyy + r3.xyz;
r1.xyz = r3.www * r1.xyz + r2.xzw;
} else {
r0.xyz = -r0.xyz * r2.yyy + g_debugColor.xyz;
r1.xyz = g_debugColor.www * r0.xyz + r2.xzw;
}
r4.xyz = g_additiveColor.xyz + r1.xyz;
r0.xyzw = g_tintColor.xyzw * r4.xyzw;
o0.xyz = g_materialBrightness * r0.xyz;
o0.w = r0.w;
o1.zw = float2(0,0);
o2.x = -v6.z;
o2.yzw = float3(0,0,0);
o3.w = r1.w;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
// using 3Dmigoto v1.2.56 on Fri Oct 26 19:35:33 2018
//
//
// Buffer Definitions:
//
// cbuffer cbPerFrame
// {
//
// row_major float4x4 g_view; // Offset: 0 Size: 64
// float4 g_sceneTextureSize; // Offset: 64 Size: 16 [unused]
// float4 g_noiseTextureSize; // Offset: 80 Size: 16 [unused]
// float4 g_terrainWireframeColor; // Offset: 96 Size: 16 [unused]
// float4 g_standardWireframeColor; // Offset: 112 Size: 16 [unused]
// bool g_shouldPancakeShadows; // Offset: 128 Size: 4 [unused]
// float g_glowAmbientOcclusionThreshold;// Offset: 132 Size: 4 [unused]
// = 0x3ca3d70a
//
// }
//
// cbuffer cbPerObject_Standard
// {
//
// float4 g_detailValues; // Offset: 0 Size: 16 [unused]
// float4 g_debugColor; // Offset: 16 Size: 16
// float4 g_tintColor; // Offset: 32 Size: 16
// float g_glowFactor; // Offset: 48 Size: 4
// float g_alphaClip; // Offset: 52 Size: 4
// float g_softAlphaDepth; // Offset: 56 Size: 4 [unused]
// float g_dissolveAlpha; // Offset: 60 Size: 4 [unused]
// bool g_dissolveInverted; // Offset: 64 Size: 4 [unused]
// = 0x00000000
// bool g_useInstancedRendering; // Offset: 68 Size: 4
// = 0x00000000
//
// }
//
// cbuffer cbPerObject_Uncommon
// {
//
// row_major float4x4 g_mtxTintPrimary;// Offset: 0 Size: 64 [unused]
// row_major float4x4 g_mtxTintSecondary;// Offset: 64 Size: 64 [unused]
// row_major float4x4 g_mtxTintAccent;// Offset: 128 Size: 64 [unused]
// float4 g_haloColor; // Offset: 192 Size: 16 [unused]
// = 0x3f800000 0x00000000 0x00000000 0x3f800000
// float4 g_tabTargetColor; // Offset: 208 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 g_additiveColor; // Offset: 224 Size: 16
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_biomeOrientationAndUVScale;// Offset: 240 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_biomeSettings; // Offset: 256 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_biomeMultipliers; // Offset: 272 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_waveParams; // Offset: 288 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_waveDir; // Offset: 304 Size: 16 [unused]
// = 0x3f800000 0x00000000 0x00000000 0x00000000
// float g_biomeUVChannel; // Offset: 320 Size: 4 [unused]
// = 0x00000000
// float g_biomeFresnelOrGlow; // Offset: 324 Size: 4 [unused]
// = 0x00000000
// float g_distortionFactor; // Offset: 328 Size: 4 [unused]
// = 0x3f800000
// float g_materialBrightness; // Offset: 332 Size: 4
// = 0x3f800000
// float g_biomeIgnoreSurfaceNormals; // Offset: 336 Size: 4 [unused]
// = 0x00000000
// float g_overlayUVScale; // Offset: 340 Size: 4 [unused]
// = 0x3f800000
// float g_fresnelAlphaFactor; // Offset: 344 Size: 4 [unused]
// = 0x00000000
// float g_fresnelAlphaPower; // Offset: 348 Size: 4 [unused]
// = 0x00000000
// int g_overlayUVChannel; // Offset: 352 Size: 4 [unused]
// = 0x00000000
// int g_overlayMaskUVChannel; // Offset: 356 Size: 4 [unused]
// = 0x00000002
// int g_instanceBufferIdxOffset; // Offset: 360 Size: 4 [unused]
// = 0x00000000
// bool g_shaderBoolean; // Offset: 364 Size: 4 [unused]
// bool g_useOverlay; // Offset: 368 Size: 4 [unused]
// bool g_applyFogToAlpha; // Offset: 372 Size: 4 [unused]
//
// }
//
// Resource bind info for g_rPerInstanceShaderConstants
// {
//
// struct ZoPerInstanceShaderConstants
// {
//
// row_major float4x4 m_worldViewProj;// Offset: 0
// row_major float4x4 m_worldView;// Offset: 64
// row_major float4x4 m_world; // Offset: 128
// float4 m_detailValues; // Offset: 192
// float4 m_debugColor; // Offset: 208
// float4 m_tintColor; // Offset: 224
// float4 m_uvScrolling; // Offset: 240
// float4 m_texCoordScaleBias; // Offset: 256
// float m_glowFactor; // Offset: 272
// float m_softAlphaDepth; // Offset: 276
// float m_dissolveAlpha; // Offset: 280
// uint m_dissolveInverted; // Offset: 284
//
// } $Element; // Offset: 0 Size: 288
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// AnisoWrap sampler NA NA 0 1
// g_diffuseTexture texture float4 2d 0 1
// g_normalTexture texture float4 2d 1 1
// g_specularTexture texture float4 2d 2 1
// g_rPerInstanceShaderConstants texture struct r/o 3 1
// cbPerFrame cbuffer NA NA 0 1
// cbPerObject_Standard cbuffer NA NA 1 1
// cbPerObject_Uncommon cbuffer NA NA 2 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// COLOR 0 xyzw 1 NONE float xyzw
// COLOR 1 xyzw 2 NONE float
// TEXCOORD 0 xy 3 NONE float xy
// TEXCOORD 3 zw 3 NONE float
// TEXCOORD 1 xyz 4 NONE float xyz
// TEXCOORD 2 xyz 5 NONE float xyz
// TEXCOORD 4 xyz 6 NONE float z
// TEXCOORD 5 xyz 7 NONE float xyz
// TEXCOORD 6 xyz 8 NONE float xyz
// TEXCOORD 7 xy 9 NONE float
// TEXCOORD 8 x 10 NONE uint x
// SV_CLIPDISTANCE 0 xyzw 11 CLIPDST float
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
// SV_TARGET 1 xyzw 1 TARGET float xyzw
// SV_TARGET 2 xyzw 2 TARGET float xyzw
// SV_TARGET 3 xyzw 3 TARGET float xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_constantbuffer cb1[5], immediateIndexed
dcl_constantbuffer cb2[21], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_structured t3, 288
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyz
dcl_input_ps linear v6.z
dcl_input_ps linear v7.xyz
dcl_input_ps linear v8.xyz
dcl_input_ps constant v10.x
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_temps 7
sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r0.xyzw, v3.xyxx, t0.xyzw, s0
sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.xyzw, v3.xyxx, t2.xyzw, s0
sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r2.xyzw, v3.xyxx, t1.xyzw, s0
mul r0.xyz, r0.xyzx, v1.xyzx
mul r3.xyz, r1.xyzx, v1.xyzx
dp3 r3.w, v5.xyzx, v5.xyzx
rsq r3.w, r3.w
mul r4.xyz, r3.wwww, v5.xyzx
dp3 r3.w, v7.xyzx, v7.xyzx
rsq r3.w, r3.w
mul r5.xyz, r3.wwww, v7.xyzx
dp3 r3.w, v8.xyzx, v8.xyzx
rsq r3.w, r3.w
mul r6.xyz, r3.wwww, v8.xyzx
mad r2.yw, r2.wwwy, l(0.000000, 2.000000, 0.000000, 2.000000), l(0.000000, -1.000000, 0.000000, -1.000000)
dp2 r3.w, r2.ywyy, r2.ywyy
add r3.w, -r3.w, l(1.000000)
max r3.w, r3.w, l(0.000000)
sqrt r3.w, r3.w
mul r5.xyz, -r5.xyzx, r2.yyyy
mad r5.xyz, r3.wwww, r4.xyzx, r5.xyzx
mad r5.xyz, r2.wwww, -r6.xyzx, r5.xyzx
dp3 r2.y, r5.xyzx, r5.xyzx
rsq r2.y, r2.y
mul r5.xyz, r2.yyyy, r5.xyzx
if_nz cb1[4].y
ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r2.y, v10.x, l(272), t3.xxxx
else
mov r2.y, cb1[3].x
endif
mul r2.xz, r2.yyzy, r2.xxzx
dp3 r2.y, v4.xyzx, v4.xyzx
rsq r2.y, r2.y
mul r6.xyz, r2.yyyy, v4.xyzx
mad r0.w, r0.w, v1.w, -cb1[3].y
lt r0.w, r0.w, l(0.000000)
discard_nz r0.w
dp3 r0.w, r5.xyzx, r6.xyzx
add r0.w, -|r0.w|, l(1.000000)
mul r2.y, r0.w, r0.w
mul r0.w, r0.w, r2.y
dp3 r2.y, r4.xyzx, r6.xyzx
add r2.y, -|r2.y|, l(1.000000)
mul r2.y, r2.y, r2.y
mul r0.w, r0.w, r2.y
mul r0.w, r2.z, r0.w
max r2.y, -r2.x, l(0.000000)
add r2.y, r2.y, l(1.000000)
div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y
mul_sat r2.x, r2.x, l(0.100000)
add r2.x, r2.x, l(0.000001)
rsq r2.x, r2.x
div r4.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.x
mul r2.xzw, r0.xxyz, r2.yyyy
mad r1.xyz, -r1.xyzx, v1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad o3.xyz, r0.wwww, r1.xyzx, r3.xyzx
mul r1.xyz, r5.yyyy, cb0[1].xyzx
mad r1.xyz, r5.xxxx, cb0[0].xyzx, r1.xyzx
mad r1.xyz, r5.zzzz, cb0[2].xyzx, r1.xyzx
add r0.w, r1.z, l(1.000000)
div o1.xy, r1.xyxx, r0.wwww
if_nz cb1[4].y
ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r3.xyzw, v10.x, l(208), t3.xyzw
mad r1.xyz, -r0.xyzx, r2.yyyy, r3.xyzx
mad r1.xyz, r3.wwww, r1.xyzx, r2.xzwx
else
mad r0.xyz, -r0.xyzx, r2.yyyy, cb1[1].xyzx
mad r1.xyz, cb1[1].wwww, r0.xyzx, r2.xzwx
endif
add r4.xyz, r1.xyzx, cb2[14].xyzx
mul r0.xyzw, r4.xyzw, cb1[2].xyzw
mul o0.xyz, r0.xyzx, cb2[20].wwww
mov o0.w, r0.w
mov o1.zw, l(0,0,0,0)
mov o2.x, -v6.z
mov o2.yzw, l(0,0,0,0)
mov o3.w, r1.w
ret
// Approximately 78 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

I have changed it to (see line 3-17, 76, 134, 171):
// specular glow ---- Created with 3Dmigoto v1.2.56 on Sat Oct 27 09:13:36 2018 

struct ZoPerInstanceShaderConstants
{
row_major float4x4 m_worldViewProj;// Offset: 0
row_major float4x4 m_worldView;// Offset: 64
row_major float4x4 m_world; // Offset: 128
float4 m_detailValues; // Offset: 192
float4 m_debugColor; // Offset: 208
float4 m_tintColor; // Offset: 224
float4 m_uvScrolling; // Offset: 240
float4 m_texCoordScaleBias; // Offset: 256
float m_glowFactor; // Offset: 272
float m_softAlphaDepth; // Offset: 276
float m_dissolveAlpha; // Offset: 280
uint m_dissolveInverted; // Offset: 284
};

cbuffer cbPerFrame : register(b0)
{
row_major float4x4 g_view : packoffset(c0);
float4 g_sceneTextureSize : packoffset(c4);
float4 g_noiseTextureSize : packoffset(c5);
float4 g_terrainWireframeColor : packoffset(c6);
float4 g_standardWireframeColor : packoffset(c7);
bool g_shouldPancakeShadows : packoffset(c8);
float g_glowAmbientOcclusionThreshold : packoffset(c8.y) = {0.0199999996};
}

cbuffer cbPerObject_Standard : register(b1)
{
float4 g_detailValues : packoffset(c0);
float4 g_debugColor : packoffset(c1);
float4 g_tintColor : packoffset(c2);
float g_glowFactor : packoffset(c3);
float g_alphaClip : packoffset(c3.y);
float g_softAlphaDepth : packoffset(c3.z);
float g_dissolveAlpha : packoffset(c3.w);
bool g_dissolveInverted : packoffset(c4) = false;
bool g_useInstancedRendering : packoffset(c4.y) = false;
}

cbuffer cbPerObject_Uncommon : register(b2)
{
row_major float4x4 g_mtxTintPrimary : packoffset(c0);
row_major float4x4 g_mtxTintSecondary : packoffset(c4);
row_major float4x4 g_mtxTintAccent : packoffset(c8);
float4 g_haloColor : packoffset(c12) = {1,0,0,1};
float4 g_tabTargetColor : packoffset(c13) = {1,1,1,1};
float4 g_additiveColor : packoffset(c14) = {0,0,0,0};
float4 g_biomeOrientationAndUVScale : packoffset(c15) = {0,0,0,0};
float4 g_biomeSettings : packoffset(c16) = {0,0,0,0};
float4 g_biomeMultipliers : packoffset(c17) = {0,0,0,0};
float4 g_waveParams : packoffset(c18) = {0,0,0,0};
float4 g_waveDir : packoffset(c19) = {1,0,0,0};
float g_biomeUVChannel : packoffset(c20) = {0};
float g_biomeFresnelOrGlow : packoffset(c20.y) = {0};
float g_distortionFactor : packoffset(c20.z) = {1};
float g_materialBrightness : packoffset(c20.w) = {1};
float g_biomeIgnoreSurfaceNormals : packoffset(c21) = {0};
float g_overlayUVScale : packoffset(c21.y) = {1};
float g_fresnelAlphaFactor : packoffset(c21.z) = {0};
float g_fresnelAlphaPower : packoffset(c21.w) = {0};
int g_overlayUVChannel : packoffset(c22) = {0};
int g_overlayMaskUVChannel : packoffset(c22.y) = {2};
int g_instanceBufferIdxOffset : packoffset(c22.z) = {0};
bool g_shaderBoolean : packoffset(c22.w);
bool g_useOverlay : packoffset(c23);
bool g_applyFogToAlpha : packoffset(c23.y);
}

SamplerState AnisoWrap_s : register(s0);
Texture2D<float4> g_diffuseTexture : register(t0);
Texture2D<float4> g_normalTexture : register(t1);
Texture2D<float4> g_specularTexture : register(t2);
StructuredBuffer<ZoPerInstanceShaderConstants> g_rPerInstanceShaderConstants : register(t3);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
float4 v0 : SV_POSITION0,
float4 v1 : COLOR0,
float4 v2 : COLOR1,
float2 v3 : TEXCOORD0,
float2 w3 : TEXCOORD3,
float4 v4 : TEXCOORD1,
float4 v5 : TEXCOORD2,
float4 v6 : TEXCOORD4,
float4 v7 : TEXCOORD5,
float4 v8 : TEXCOORD6,
float4 v9 : TEXCOORD7,
nointerpolation uint v10 : TEXCOORD8,
float4 v11 : SV_CLIPDISTANCE0,
out float4 o0 : SV_TARGET0,
out float4 o1 : SV_TARGET1,
out float4 o2 : SV_TARGET2,
out float4 o3 : SV_TARGET3)
{
float4 r0,r1,r2,r3,r4,r5,r6;
uint4 bitmask, uiDest;
float4 fDest;

r0.xyzw = g_diffuseTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw;
r1.xyzw = g_specularTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw;
r2.xyzw = g_normalTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw;
r0.xyz = v1.xyz * r0.xyz;
r3.xyz = v1.xyz * r1.xyz;
r3.w = dot(v5.xyz, v5.xyz);
r3.w = rsqrt(r3.w);
r4.xyz = v5.xyz * r3.www;
r3.w = dot(v7.xyz, v7.xyz);
r3.w = rsqrt(r3.w);
r5.xyz = v7.xyz * r3.www;
r3.w = dot(v8.xyz, v8.xyz);
r3.w = rsqrt(r3.w);
r6.xyz = v8.xyz * r3.www;
r2.yw = r2.wy * float2(2,2) + float2(-1,-1);
r3.w = dot(r2.yw, r2.yw);
r3.w = 1 + -r3.w;
r3.w = max(0, r3.w);
r3.w = sqrt(r3.w);
r5.xyz = r2.yyy * -r5.xyz;
r5.xyz = r3.www * r4.xyz + r5.xyz;
r5.xyz = r2.www * -r6.xyz + r5.xyz;
r2.y = dot(r5.xyz, r5.xyz);
r2.y = rsqrt(r2.y);
r5.xyz = r5.xyz * r2.yyy;
if (g_dissolveInverted != 0) {
r2.y = g_rPerInstanceShaderConstants[v10.x].m_glowFactor;
r2.y = AnisoWrap[]..swiz;
} else {
r2.y = g_glowFactor;
}
r2.xz = r2.xz * r2.yz;
r2.y = dot(v4.xyz, v4.xyz);
r2.y = rsqrt(r2.y);
r6.xyz = v4.xyz * r2.yyy;
r0.w = r0.w * v1.w + -g_alphaClip;
r0.w = cmp(r0.w < 0);
if (r0.w != 0) discard;
r0.w = dot(r5.xyz, r6.xyz);
r0.w = 1 + -abs(r0.w);
r2.y = r0.w * r0.w;
r0.w = r2.y * r0.w;
r2.y = dot(r4.xyz, r6.xyz);
r2.y = 1 + -abs(r2.y);
r2.y = r2.y * r2.y;
r0.w = r2.y * r0.w;
r0.w = r0.w * r2.z;
r2.y = max(0, -r2.x);
r2.y = 1 + r2.y;
r2.y = 1 / r2.y;
r2.x = saturate(0.100000001 * r2.x);
r2.x = 9.99999997e-007 + r2.x;
r2.x = rsqrt(r2.x);
r4.w = 1 / r2.x;
r2.xzw = r2.yyy * r0.xyz;
r1.xyz = -r1.xyz * v1.xyz + float3(1,1,1);
o3.xyz = r0.www * r1.xyz + r3.xyz;
r1.xyz = g_view._m10_m11_m12 * r5.yyy;
r1.xyz = r5.xxx * g_view._m00_m01_m02 + r1.xyz;
r1.xyz = r5.zzz * g_view._m20_m21_m22 + r1.xyz;
r0.w = 1 + r1.z;
o1.xy = r1.xy / r0.ww;
if (g_dissolveInverted != 0) {
r3 = g_rPerInstanceShaderConstants[v10.x].m_debugColor;
r3.x = AnisoWrap[]..swiz;
r3.y = AnisoWrap[]..swiz;
r3.z = AnisoWrap[]..swiz;
r3.w = AnisoWrap[]..swiz;
r1.xyz = -r0.xyz * r2.yyy + r3.xyz;
r1.xyz = r3.www * r1.xyz + r2.xzw;
} else {
r0.xyz = -r0.xyz * r2.yyy + g_debugColor.xyz;
r1.xyz = g_debugColor.www * r0.xyz + r2.xzw;
}
r4.xyz = g_additiveColor.xyz + r1.xyz;
r0.xyzw = g_tintColor.xyzw * r4.xyzw;
o0.xyz = g_materialBrightness * r0.xyz;
o0.w = r0.w;
o1.zw = float2(0,0);
o2.x = -v6.z;
o2.yzw = float3(0,0,0);
o3.w = r1.w;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
// using 3Dmigoto v1.2.56 on Sat Oct 27 09:13:36 2018
//
//
// Buffer Definitions:
//
// cbuffer cbPerFrame
// {
//
// row_major float4x4 g_view; // Offset: 0 Size: 64
// float4 g_sceneTextureSize; // Offset: 64 Size: 16 [unused]
// float4 g_noiseTextureSize; // Offset: 80 Size: 16 [unused]
// float4 g_terrainWireframeColor; // Offset: 96 Size: 16 [unused]
// float4 g_standardWireframeColor; // Offset: 112 Size: 16 [unused]
// bool g_shouldPancakeShadows; // Offset: 128 Size: 4 [unused]
// float g_glowAmbientOcclusionThreshold;// Offset: 132 Size: 4 [unused]
// = 0x3ca3d70a
//
// }
//
// cbuffer cbPerObject_Standard
// {
//
// float4 g_detailValues; // Offset: 0 Size: 16 [unused]
// float4 g_debugColor; // Offset: 16 Size: 16
// float4 g_tintColor; // Offset: 32 Size: 16
// float g_glowFactor; // Offset: 48 Size: 4
// float g_alphaClip; // Offset: 52 Size: 4
// float g_softAlphaDepth; // Offset: 56 Size: 4 [unused]
// float g_dissolveAlpha; // Offset: 60 Size: 4 [unused]
// bool g_dissolveInverted; // Offset: 64 Size: 4 [unused]
// = 0x00000000
// bool g_useInstancedRendering; // Offset: 68 Size: 4
// = 0x00000000
//
// }
//
// cbuffer cbPerObject_Uncommon
// {
//
// row_major float4x4 g_mtxTintPrimary;// Offset: 0 Size: 64 [unused]
// row_major float4x4 g_mtxTintSecondary;// Offset: 64 Size: 64 [unused]
// row_major float4x4 g_mtxTintAccent;// Offset: 128 Size: 64 [unused]
// float4 g_haloColor; // Offset: 192 Size: 16 [unused]
// = 0x3f800000 0x00000000 0x00000000 0x3f800000
// float4 g_tabTargetColor; // Offset: 208 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 g_additiveColor; // Offset: 224 Size: 16
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_biomeOrientationAndUVScale;// Offset: 240 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_biomeSettings; // Offset: 256 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_biomeMultipliers; // Offset: 272 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_waveParams; // Offset: 288 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_waveDir; // Offset: 304 Size: 16 [unused]
// = 0x3f800000 0x00000000 0x00000000 0x00000000
// float g_biomeUVChannel; // Offset: 320 Size: 4 [unused]
// = 0x00000000
// float g_biomeFresnelOrGlow; // Offset: 324 Size: 4 [unused]
// = 0x00000000
// float g_distortionFactor; // Offset: 328 Size: 4 [unused]
// = 0x3f800000
// float g_materialBrightness; // Offset: 332 Size: 4
// = 0x3f800000
// float g_biomeIgnoreSurfaceNormals; // Offset: 336 Size: 4 [unused]
// = 0x00000000
// float g_overlayUVScale; // Offset: 340 Size: 4 [unused]
// = 0x3f800000
// float g_fresnelAlphaFactor; // Offset: 344 Size: 4 [unused]
// = 0x00000000
// float g_fresnelAlphaPower; // Offset: 348 Size: 4 [unused]
// = 0x00000000
// int g_overlayUVChannel; // Offset: 352 Size: 4 [unused]
// = 0x00000000
// int g_overlayMaskUVChannel; // Offset: 356 Size: 4 [unused]
// = 0x00000002
// int g_instanceBufferIdxOffset; // Offset: 360 Size: 4 [unused]
// = 0x00000000
// bool g_shaderBoolean; // Offset: 364 Size: 4 [unused]
// bool g_useOverlay; // Offset: 368 Size: 4 [unused]
// bool g_applyFogToAlpha; // Offset: 372 Size: 4 [unused]
//
// }
//
// Resource bind info for g_rPerInstanceShaderConstants
// {
//
// struct ZoPerInstanceShaderConstants
// {
//
// row_major float4x4 m_worldViewProj;// Offset: 0
// row_major float4x4 m_worldView;// Offset: 64
// row_major float4x4 m_world; // Offset: 128
// float4 m_detailValues; // Offset: 192
// float4 m_debugColor; // Offset: 208
// float4 m_tintColor; // Offset: 224
// float4 m_uvScrolling; // Offset: 240
// float4 m_texCoordScaleBias; // Offset: 256
// float m_glowFactor; // Offset: 272
// float m_softAlphaDepth; // Offset: 276
// float m_dissolveAlpha; // Offset: 280
// uint m_dissolveInverted; // Offset: 284
//
// } $Element; // Offset: 0 Size: 288
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// AnisoWrap sampler NA NA 0 1
// g_diffuseTexture texture float4 2d 0 1
// g_normalTexture texture float4 2d 1 1
// g_specularTexture texture float4 2d 2 1
// g_rPerInstanceShaderConstants texture struct r/o 3 1
// cbPerFrame cbuffer NA NA 0 1
// cbPerObject_Standard cbuffer NA NA 1 1
// cbPerObject_Uncommon cbuffer NA NA 2 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// COLOR 0 xyzw 1 NONE float xyzw
// COLOR 1 xyzw 2 NONE float
// TEXCOORD 0 xy 3 NONE float xy
// TEXCOORD 3 zw 3 NONE float
// TEXCOORD 1 xyz 4 NONE float xyz
// TEXCOORD 2 xyz 5 NONE float xyz
// TEXCOORD 4 xyz 6 NONE float z
// TEXCOORD 5 xyz 7 NONE float xyz
// TEXCOORD 6 xyz 8 NONE float xyz
// TEXCOORD 7 xy 9 NONE float
// TEXCOORD 8 x 10 NONE uint x
// SV_CLIPDISTANCE 0 xyzw 11 CLIPDST float
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
// SV_TARGET 1 xyzw 1 TARGET float xyzw
// SV_TARGET 2 xyzw 2 TARGET float xyzw
// SV_TARGET 3 xyzw 3 TARGET float xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_constantbuffer cb1[5], immediateIndexed
dcl_constantbuffer cb2[21], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_structured t3, 288
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyz
dcl_input_ps linear v6.z
dcl_input_ps linear v7.xyz
dcl_input_ps linear v8.xyz
dcl_input_ps constant v10.x
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_temps 7
sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r0.xyzw, v3.xyxx, t0.xyzw, s0
sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.xyzw, v3.xyxx, t2.xyzw, s0
sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r2.xyzw, v3.xyxx, t1.xyzw, s0
mul r0.xyz, r0.xyzx, v1.xyzx
mul r3.xyz, r1.xyzx, v1.xyzx
dp3 r3.w, v5.xyzx, v5.xyzx
rsq r3.w, r3.w
mul r4.xyz, r3.wwww, v5.xyzx
dp3 r3.w, v7.xyzx, v7.xyzx
rsq r3.w, r3.w
mul r5.xyz, r3.wwww, v7.xyzx
dp3 r3.w, v8.xyzx, v8.xyzx
rsq r3.w, r3.w
mul r6.xyz, r3.wwww, v8.xyzx
mad r2.yw, r2.wwwy, l(0.000000, 2.000000, 0.000000, 2.000000), l(0.000000, -1.000000, 0.000000, -1.000000)
dp2 r3.w, r2.ywyy, r2.ywyy
add r3.w, -r3.w, l(1.000000)
max r3.w, r3.w, l(0.000000)
sqrt r3.w, r3.w
mul r5.xyz, -r5.xyzx, r2.yyyy
mad r5.xyz, r3.wwww, r4.xyzx, r5.xyzx
mad r5.xyz, r2.wwww, -r6.xyzx, r5.xyzx
dp3 r2.y, r5.xyzx, r5.xyzx
rsq r2.y, r2.y
mul r5.xyz, r2.yyyy, r5.xyzx
if_nz cb1[4].y
ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r2.y, v10.x, l(272), t3.xxxx
else
mov r2.y, cb1[3].x
endif
mul r2.xz, r2.yyzy, r2.xxzx
dp3 r2.y, v4.xyzx, v4.xyzx
rsq r2.y, r2.y
mul r6.xyz, r2.yyyy, v4.xyzx
mad r0.w, r0.w, v1.w, -cb1[3].y
lt r0.w, r0.w, l(0.000000)
discard_nz r0.w
dp3 r0.w, r5.xyzx, r6.xyzx
add r0.w, -|r0.w|, l(1.000000)
mul r2.y, r0.w, r0.w
mul r0.w, r0.w, r2.y
dp3 r2.y, r4.xyzx, r6.xyzx
add r2.y, -|r2.y|, l(1.000000)
mul r2.y, r2.y, r2.y
mul r0.w, r0.w, r2.y
mul r0.w, r2.z, r0.w
max r2.y, -r2.x, l(0.000000)
add r2.y, r2.y, l(1.000000)
div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y
mul_sat r2.x, r2.x, l(0.100000)
add r2.x, r2.x, l(0.000001)
rsq r2.x, r2.x
div r4.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.x
mul r2.xzw, r0.xxyz, r2.yyyy
mad r1.xyz, -r1.xyzx, v1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad o3.xyz, r0.wwww, r1.xyzx, r3.xyzx
mul r1.xyz, r5.yyyy, cb0[1].xyzx
mad r1.xyz, r5.xxxx, cb0[0].xyzx, r1.xyzx
mad r1.xyz, r5.zzzz, cb0[2].xyzx, r1.xyzx
add r0.w, r1.z, l(1.000000)
div o1.xy, r1.xyxx, r0.wwww
if_nz cb1[4].y
ld_structured_indexable(structured_buffer, stride=288)(mixed,mixed,mixed,mixed) r3.xyzw, v10.x, l(208), t3.xyzw
mad r1.xyz, -r0.xyzx, r2.yyyy, r3.xyzx
mad r1.xyz, r3.wwww, r1.xyzx, r2.xzwx
else
mad r0.xyz, -r0.xyzx, r2.yyyy, cb1[1].xyzx
mad r1.xyz, cb1[1].wwww, r0.xyzx, r2.xzwx
endif
add r4.xyz, r1.xyzx, cb2[14].xyzx
mul r0.xyzw, r4.xyzw, cb1[2].xyzw
mul o0.xyz, r0.xyzx, cb2[20].wwww
mov o0.w, r0.w
mov o1.zw, l(0,0,0,0)
mov o2.x, -v6.z
mov o2.yzw, l(0,0,0,0)
mov o3.w, r1.w
ret
// Approximately 78 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

BTW should line 17 be "};" or just "}"?
Does the fact that there is "t3.xxxx" (line 121 in original shader) in one case and "t3.xyzw" (line 159) in the other case have any meaning for fixing the code?

I don't get an error sound when I start the game. But as soon as I make any changes to the shader and reload the shader I get an error sound (used the old 3Dmigoto version included in the original fix). Also inserting my workaround code in the shader BEFORE starting the game has no results as the shader seems to be ignored.
My well-tried workaround for the broken specular glow in the game is just to reduce the intensity of the effect by this code (would be inserted in line 109):
r1.xyzw = g_specularTexture.Sample(AnisoWrap_s, v3.xy, int2(0, 0)).xyzw;
r1.w = 0.7 * r1.w;

But as mentioned above it had no effect so far as the shader itself seems to be ignored completely.

I have also tested ae831d73076d9e63-ps_replace.txt trying to make the changes You suggested without success. This is the code I used: https://www39.zippyshare.com/v/kANdlNXu/file.html

My original display name is 3d4dd - for some reason Nvidia changed it..?!

Posted 10/27/2018 08:37 AM   
Update: Tested the changed shader with a "clean install" of 3Dmigoto (1.3.11) and only f8bdf818996f7aae-ps_replace.txt in ShaderFixes to prevent any conflicts with other fixed shaders. Got the same error beep when reloading the shader after implementing my workaround code and the UI says that there is a problem with "f8bdf818996f7aae-ps_replace.txt(135,10-18): error X3004: undeclared identifier 'AnisoWrap' ". This seems to refer to [code]r2.y = AnisoWrap[]..swiz;[/code] and maybe also [code] r3.x = AnisoWrap[]..swiz; r3.y = AnisoWrap[]..swiz; r3.z = AnisoWrap[]..swiz; r3.w = AnisoWrap[]..swiz; [/code] AnisoWrap[]..swiz never appeared in the ShaderCache before the last update of ESO. So it must be newly introduced. I got 94 new shaders with this code, all of them also with "Needs manual fix...".
Update: Tested the changed shader with a "clean install" of 3Dmigoto (1.3.11) and only f8bdf818996f7aae-ps_replace.txt in ShaderFixes to prevent any conflicts with other fixed shaders.
Got the same error beep when reloading the shader after implementing my workaround code and the UI says that there is a problem with
"f8bdf818996f7aae-ps_replace.txt(135,10-18): error X3004: undeclared identifier 'AnisoWrap' ".
This seems to refer to
r2.y = AnisoWrap[]..swiz;

and maybe also
r3.x = AnisoWrap[]..swiz;
r3.y = AnisoWrap[]..swiz;
r3.z = AnisoWrap[]..swiz;
r3.w = AnisoWrap[]..swiz;

AnisoWrap[]..swiz never appeared in the ShaderCache before the last update of ESO. So it must be newly introduced. I got 94 new shaders with this code, all of them also with "Needs manual fix...".

My original display name is 3d4dd - for some reason Nvidia changed it..?!

Posted 10/27/2018 09:18 AM   
I had those problems a couple years ago with RE7 where HLSL wouldn't have all of code converted properly, such as countbits() throwing an error. Other things like unknown declarations said "manual fix" too. I fixed this issue by sticking with ASM.
I had those problems a couple years ago with RE7 where HLSL wouldn't have all of code converted properly, such as countbits() throwing an error. Other things like unknown declarations said "manual fix" too. I fixed this issue by sticking with ASM.

---
Windows 10 x64 / 1x 980Ti GPU (no SLI, 418.81 driver) / 1920x1080

Posted 10/27/2018 09:20 AM   
  137 / 143    
Scroll To Top