MotoGP 18 - 3D vision
  2 / 3    
Hi DHR, in addition to my above post I tried the same thing with the game "Gravel". I also attach 2 Screenshots here: 1. a PS with the white fog problem but with a skybox with clouds (same as in MotoGP18) 2. a PS #93 with perfect 3D (no fog!!!) but with a missing skybox... Again: I don't know if this helps...
Hi DHR,
in addition to my above post I tried the same thing with the game "Gravel".
I also attach 2 Screenshots here:

1. a PS with the white fog problem but with a skybox with clouds (same as in MotoGP18)
2. a PS #93 with perfect 3D (no fog!!!) but with a missing skybox...

Again: I don't know if this helps...

Win 8.1 pro 64 bit, Gigabyte Z87X-D3H - i7-4770K@3.5 - 32 GB, 2x Geforce TITAN SLI (EVGA), 3x ASUS 3D-Vision-Monitors

#16
Posted 06/14/2018 06:14 PM   
For MotoGP18, can you upload the PS #148 here. Also can you check if there is a VS that produce the same effect (NUM4 or NUM5 to cycle and NUM6 to mark)....and upload here also.
For MotoGP18, can you upload the PS #148 here. Also can you check if there is a VS that produce the same effect (NUM4 or NUM5 to cycle and NUM6 to mark)....and upload here also.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#17
Posted 06/14/2018 10:56 PM   
Hi DHR, I tried what you said. First I tested the pixelshaders again and was a bit confused when the right one had the #150 today (whereas yesterday it had #148). Is this normal that the same shader has different numbers on different days? I saved the right one today (I hope it's no problem that it has another number than yesterday...). In a few seconds after posting this, I will upload/attach the files. I already tried it but got an error from forums.geforce.com ("File has an invalid extension, it should be one of jpg, jpeg, gif, tif, tiff, png, bmp, jps") so I renamed the files which had the extension "txt" and changed them to "jpg". They should work if you rename them back to the extension ".txt"... I will also upload the vertex shader (which I found and had indeed the same effect as the pixel shader). When pressing NUMPAD6 I got an error "error X3018: invalid subscript 'xyzw'" but I think it was no problem because it created the file in the "shaderfixes-folder"... I only uploaded the shader you asked me to and not the other one I wrote (which looked like a photographic negative or a picture from a heat camera ;-)). Please tell me if I did something wrong or if I should do something different and thank you for your help!
Hi DHR,

I tried what you said. First I tested the pixelshaders again and was a bit confused when the right one had the #150 today (whereas yesterday it had #148). Is this normal that the same shader has different numbers on different days? I saved the right one today (I hope it's no problem that it has another number than yesterday...).

In a few seconds after posting this, I will upload/attach the files. I already tried it but got an error from forums.geforce.com ("File has an invalid extension, it should be one of jpg, jpeg, gif, tif, tiff, png, bmp, jps") so I renamed the files which had the extension "txt" and changed them to "jpg". They should work if you rename them back to the extension ".txt"...

I will also upload the vertex shader (which I found and had indeed the same effect as the pixel shader). When pressing NUMPAD6 I got an error "error X3018: invalid subscript 'xyzw'" but I think it was no problem because it created the file in the "shaderfixes-folder"...

I only uploaded the shader you asked me to and not the other one I wrote (which looked like a photographic negative or a picture from a heat camera ;-)).

Please tell me if I did something wrong or if I should do something different and thank you for your help!

Win 8.1 pro 64 bit, Gigabyte Z87X-D3H - i7-4770K@3.5 - 32 GB, 2x Geforce TITAN SLI (EVGA), 3x ASUS 3D-Vision-Monitors

#18
Posted 06/15/2018 01:55 PM   
You doing OK!....we normally also rename txt files to jpg to upload here. that "error X3018: invalid subscript 'xyzw'" is because the VS have some HLSL decompiler issues...is not a problem. Those shaders (VS and PS) don't are know pattern or have some info to make a first approach. Also is very strange that the VS have headers!!...that probably an effect used in earlier Unreal Engine version when we have headers, now UE4 don't have headers. The PS are you sure is the correct one?? maybe there is another PS that produce the same effect.
You doing OK!....we normally also rename txt files to jpg to upload here.

that "error X3018: invalid subscript 'xyzw'" is because the VS have some HLSL decompiler issues...is not a problem.

Those shaders (VS and PS) don't are know pattern or have some info to make a first approach. Also is very strange that the VS have headers!!...that probably an effect used in earlier Unreal Engine version when we have headers, now UE4 don't have headers. The PS are you sure is the correct one?? maybe there is another PS that produce the same effect.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#19
Posted 06/15/2018 03:34 PM   
[quote="DHR"]You doing OK!....we normally also rename txt files to jpg to upload here. that "error X3018: invalid subscript 'xyzw'" is because the VS have some HLSL decompiler issues...is not a problem. Those shaders (VS and PS) don't are know pattern or have some info to make a first approach. Also is very strange that the VS have headers!!...that probably an effect used in earlier Unreal Engine version when we have headers, now UE4 don't have headers. The PS are you sure is the correct one?? maybe there is another PS that produce the same effect.[/quote] There are only two PS which change the image significantly. See my post #15. I uploaded the one you asked for (when the picture looks normal) but not the second one (where the white fog is gone too but the colors of the picture look wierd as shown in my uploaded screenshot in post #15)...
DHR said:You doing OK!....we normally also rename txt files to jpg to upload here.

that "error X3018: invalid subscript 'xyzw'" is because the VS have some HLSL decompiler issues...is not a problem.

Those shaders (VS and PS) don't are know pattern or have some info to make a first approach. Also is very strange that the VS have headers!!...that probably an effect used in earlier Unreal Engine version when we have headers, now UE4 don't have headers. The PS are you sure is the correct one?? maybe there is another PS that produce the same effect.

There are only two PS which change the image significantly. See my post #15. I uploaded the one you asked for (when the picture looks normal) but not the second one (where the white fog is gone too but the colors of the picture look wierd as shown in my uploaded screenshot in post #15)...

Win 8.1 pro 64 bit, Gigabyte Z87X-D3H - i7-4770K@3.5 - 32 GB, 2x Geforce TITAN SLI (EVGA), 3x ASUS 3D-Vision-Monitors

#20
Posted 06/15/2018 04:11 PM   
If is not a problem, you can play without the sky removing that PS like this. This probably need a more deep look. You can do the same in Gravel. Add this lines at the end of the d3dx.ini: [code]ShaderOverride1] Hash=5ab1da8fc2c02ce1 Handling=skip[/code]
If is not a problem, you can play without the sky removing that PS like this. This probably need a more deep look. You can do the same in Gravel.

Add this lines at the end of the d3dx.ini:

ShaderOverride1]
Hash=5ab1da8fc2c02ce1
Handling=skip

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#21
Posted 06/15/2018 04:18 PM   
Thank you so much DHR! It works! I did paste&copy with your above code and got an error but I figured out the problem by myself (I needed to add a square bracket and change the Hash to another value (maybe I uploaded the wrong shader-number). But now it works!!! The only distracting thing is that the sky is black (like racing at night, but with daylight surroundings) ;-) Is it possible to change the background color to bright blue instead of black (wouldn't need the clouds only a blue sky :-))? And can I delete the files in the ShaderFixes-Folder (which I generated by pressing Numpad 3 and 6)? Are those files still needed for the fix to work or is it sufficient to have the Hash-Number in the d3dx.ini? Thank you for helping me! You are a hero!
Thank you so much DHR! It works!
I did paste&copy with your above code and got an error but I figured out the problem by myself (I needed to add a square bracket and change the Hash to another value (maybe I uploaded the wrong shader-number).
But now it works!!!
The only distracting thing is that the sky is black (like racing at night, but with daylight surroundings) ;-)
Is it possible to change the background color to bright blue instead of black (wouldn't need the clouds only a blue sky :-))?

And can I delete the files in the ShaderFixes-Folder (which I generated by pressing Numpad 3 and 6)?
Are those files still needed for the fix to work or is it sufficient to have the Hash-Number in the d3dx.ini?

Thank you for helping me! You are a hero!

Win 8.1 pro 64 bit, Gigabyte Z87X-D3H - i7-4770K@3.5 - 32 GB, 2x Geforce TITAN SLI (EVGA), 3x ASUS 3D-Vision-Monitors

#22
Posted 06/15/2018 05:21 PM   
Any ideas if/how it's possible to replace the black sky with a blue sky?
Any ideas if/how it's possible to replace the black sky with a blue sky?

Win 8.1 pro 64 bit, Gigabyte Z87X-D3H - i7-4770K@3.5 - 32 GB, 2x Geforce TITAN SLI (EVGA), 3x ASUS 3D-Vision-Monitors

#23
Posted 06/18/2018 04:43 PM   
if you want i can have a look @ this game //EDIT: Could it be that you play a track that is dark (in the night -- like th quick race one??) ? I can not see any issue with and without 3D regarding the sky. Its the same in 3D-vanilla and in 3D with Migoto. Here is my WIP for you, fixed 2 shaders manually and halos...the rest is done with the universal fix .... get some UI depth but UI is not perfect, the font is wrong because its the same shader as the rest or a shader i havnt tracked...ill investigate it if i find some tim next to my real live and other projects panding ^^ [url]https://s3.amazonaws.com/losti/MotoGP18_WIP_DHR-UNIVERSAL_V0.1.rar[/url]
if you want i can have a look @ this game

//EDIT:

Could it be that you play a track that is dark (in the night -- like th quick race one??) ? I can not see any issue with and without 3D regarding the sky. Its the same in 3D-vanilla and in 3D with Migoto.

Here is my WIP for you, fixed 2 shaders manually and halos...the rest is done with the universal fix .... get some UI depth but UI is not perfect, the font is wrong because its the same shader as the rest or a shader i havnt tracked...ill investigate it if i find some tim next to my real live and other projects panding ^^

https://s3.amazonaws.com/losti/MotoGP18_WIP_DHR-UNIVERSAL_V0.1.rar

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

#24
Posted 06/18/2018 04:57 PM   
[quote="Losti"]if you want i can have a look @ this game //EDIT: Could it be that you play a track that is dark (in the night -- like th quick race one??) ? I can not see any issue with and without 3D regarding the sky. Its the same in 3D-vanilla and in 3D with Migoto. Here is my WIP for you, fixed 2 shaders manually and halos...the rest is done with the universal fix .... get some UI depth but UI is not perfect, the font is wrong because its the same shader as the rest or a shader i havnt tracked...ill investigate it if i find some tim next to my real live and other projects panding ^^ [url]https://s3.amazonaws.com/losti/MotoGP18_WIP_DHR-UNIVERSAL_V0.1.rar[/url] [/quote] Hello Losti, thank you for your help! No, I don't play a track at night. I'll attach two 2D (!) screenshots (just started the basic tutorial, where you drive at daylight): 1) Black Sky: This is the black sky with my and also with your posted fix. It's the same in 3D and in 2D (when I turn off 3D by pressing the green button on the emitter). I think the sky is black because we removed the skybox-shader in the d3dx.ini ("handling = skip"). 2) Blue Sky: This would be the normal blue sky (even with clouds :-)). I get this when I play vanilla game or when I remove your changes in the d3dx.ini. In 3D of course I get the wrong skybox depth (unplayable, white/blueish fog: I posted some 3D pictures in my posts above). But when I disable 3D (by pressing the green button on the 3D-vision-emitter) you can see on the 2D screenshot that the sky would be blue! Don't know what I did wrong or why it's working for you... So you really get a blue sky? Can you post a screenshot in 3D please? I have Nvidia driver 398.11 by the way... Thank you for taking your time!
Losti said:if you want i can have a look @ this game

//EDIT:

Could it be that you play a track that is dark (in the night -- like th quick race one??) ? I can not see any issue with and without 3D regarding the sky. Its the same in 3D-vanilla and in 3D with Migoto.

Here is my WIP for you, fixed 2 shaders manually and halos...the rest is done with the universal fix .... get some UI depth but UI is not perfect, the font is wrong because its the same shader as the rest or a shader i havnt tracked...ill investigate it if i find some tim next to my real live and other projects panding ^^

https://s3.amazonaws.com/losti/MotoGP18_WIP_DHR-UNIVERSAL_V0.1.rar


Hello Losti,
thank you for your help!
No, I don't play a track at night.
I'll attach two 2D (!) screenshots (just started the basic tutorial, where you drive at daylight):

1) Black Sky: This is the black sky with my and also with your posted fix. It's the same in 3D and in 2D (when I turn off 3D by pressing the green button on the emitter). I think the sky is black because we removed the skybox-shader in the d3dx.ini ("handling = skip").

2) Blue Sky: This would be the normal blue sky (even with clouds :-)). I get this when I play vanilla game or when I remove your changes in the d3dx.ini. In 3D of course I get the wrong skybox depth (unplayable, white/blueish fog: I posted some 3D pictures in my posts above). But when I disable 3D (by pressing the green button on the 3D-vision-emitter) you can see on the 2D screenshot that the sky would be blue!

Don't know what I did wrong or why it's working for you... So you really get a blue sky? Can you post a screenshot in 3D please? I have Nvidia driver 398.11 by the way...

Thank you for taking your time!

Win 8.1 pro 64 bit, Gigabyte Z87X-D3H - i7-4770K@3.5 - 32 GB, 2x Geforce TITAN SLI (EVGA), 3x ASUS 3D-Vision-Monitors

#25
Posted 06/19/2018 03:18 PM   
[quote="3D_Mike"][quote="Losti"]if you want i can have a look @ this game //EDIT: Could it be that you play a track that is dark (in the night -- like th quick race one??) ? I can not see any issue with and without 3D regarding the sky. Its the same in 3D-vanilla and in 3D with Migoto. Here is my WIP for you, fixed 2 shaders manually and halos...the rest is done with the universal fix .... get some UI depth but UI is not perfect, the font is wrong because its the same shader as the rest or a shader i havnt tracked...ill investigate it if i find some tim next to my real live and other projects panding ^^ [url]https://s3.amazonaws.com/losti/MotoGP18_WIP_DHR-UNIVERSAL_V0.1.rar[/url] [/quote] Hello Losti, thank you for your help! No, I don't play a track at night. I'll attach two 2D (!) screenshots (just started the basic tutorial, where you drive at daylight): 1) Black Sky: This is the black sky with my and also with your posted fix. It's the same in 3D and in 2D (when I turn off 3D by pressing the green button on the emitter). I think the sky is black because we removed the skybox-shader in the d3dx.ini ("handling = skip"). 2) Blue Sky: This would be the normal blue sky (even with clouds :-)). I get this when I play vanilla game or when I remove your changes in the d3dx.ini. In 3D of course I get the wrong skybox depth (unplayable, white/blueish fog: I posted some 3D pictures in my posts above). But when I disable 3D (by pressing the green button on the 3D-vision-emitter) you can see on the 2D screenshot that the sky would be blue! Don't know what I did wrong or why it's working for you... So you really get a blue sky? Can you post a screenshot in 3D please? I have Nvidia driver 398.11 by the way... Thank you for taking your time![/quote] AHHHH ok i see what you mean. I can move the skybox to inv (right depth) but it will still cover the whole scene. No idea how to handle this. Hence the problem seems to be in the PS not in the VS but i have no idea how to track done because this is an unknown effect for me. By the way there are more wrong effects but this is not a problem, i can handle this but major issue is the skybox if you cant live with a black one ^^ The PS: [code] // ---- Created with 3Dmigoto v1.3.11 on Tue Jun 19 20:34:49 2018 cbuffer HdrConstants : register(b12) { float4x4 worldToScatteringVolumeMatrix : packoffset(c0); float4x4 invViewProj : packoffset(c4); float4 viewportToTexRegionScaleBias : packoffset(c8); float2 offset : packoffset(c9); float alpha : packoffset(c9.z); float nearDist : packoffset(c9.w); float4 colour2 : packoffset(c10); float4 tanHalfFov : packoffset(c11); float2 tanHalfFovUnused : packoffset(c12); float exposure : packoffset(c12.z); float gamma : packoffset(c12.w); float4 depthToLinFadeDistParams : packoffset(c13); float4 warpHmdWarpParam : packoffset(c14); float3 cubemapGroundColour : packoffset(c15); float ccgcpad : packoffset(c15.w); float2 warpScreenCentre : packoffset(c16); float2 warpScale : packoffset(c16.z); float2 warpScaleIn : packoffset(c17); float2 padHdrConstants1 : packoffset(c17.z); uint2 hiResDimsX : packoffset(c18); uint2 lowResDims : packoffset(c18.z); uint2 fullResDims : packoffset(c19); int numSamples : packoffset(c19.z); float maxFadeDistanceKm : packoffset(c19.w); float3 infraredIntegrationFactors : packoffset(c20); int randomSeed : packoffset(c20.w); float3 viewPos : packoffset(c21); } SamplerState wccSamplerState_s : register(s1); SamplerState wmcSamplerState_s : register(s2); SamplerState cubeSamplerState_s : register(s4); SamplerState cmcSamplerState_s : register(s5); SamplerState samplerStateNearestClamp_s : register(s15); TextureCubeArray<float4> imageCubeArray : register(t0); Texture2D<float4> depthTexture : register(t1); TextureCube<float4> nearFarTexture : register(t2); Texture2D<float4> loss2dTexture : register(t3); Texture3D<float4> inscatterVolumeTexture : register(t4); Texture3D<float4> godraysVolumeTexture : register(t5); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_POSITION0, float2 v1 : TEXCOORD0, float2 w1 : TEXCOORD1, float4 v2 : TEXCOORD2, float2 v3 : TEXCOORD3, out float4 o0 : SV_TARGET0, out float4 o1 : SV_TARGET1) { float4 r0,r1,r2,r3,r4,r5; uint4 bitmask, uiDest; float4 fDest; r0.xy = v2.xy * tanHalfFov.xy + tanHalfFov.zw; r0.x = r0.x * r0.x + 1; r0.x = r0.y * r0.y + r0.x; r0.x = sqrt(r0.x); r0.y = depthTexture.SampleLevel(samplerStateNearestClamp_s, v3.xy, 0).x; r0.z = r0.y * depthToLinFadeDistParams.y + depthToLinFadeDistParams.z; r0.z = depthToLinFadeDistParams.x / r0.z; r0.z = r0.y * depthToLinFadeDistParams.w + r0.z; r0.y = cmp(0 < r0.y); r0.x = r0.z * r0.x; r0.x = r0.y ? r0.x : 1; r1.z = sqrt(r0.x); r0.yzw = invViewProj._m01_m11_m21 * v2.yyy; r0.yzw = invViewProj._m00_m10_m20 * v2.xxx + r0.yzw; r0.yzw = invViewProj._m02_m12_m22 * v2.zzz + r0.yzw; r0.yzw = invViewProj._m03_m13_m23 * v2.www + r0.yzw; r2.x = dot(r0.yzw, r0.yzw); r2.x = rsqrt(r2.x); r3.xyz = r2.xxx * r0.yzw; r0.y = -r0.w * r2.x + 1; r1.w = 0.5 * r0.y; r2.xyzw = loss2dTexture.SampleLevel(cmcSamplerState_s, r1.zw, 0).xyzw; r0.y = max(abs(r3.x), abs(r3.y)); r0.y = 1 / r0.y; r0.z = min(abs(r3.x), abs(r3.y)); r0.y = r0.z * r0.y; r0.z = r0.y * r0.y; r0.w = r0.z * 0.0208350997 + -0.0851330012; r0.w = r0.z * r0.w + 0.180141002; r0.w = r0.z * r0.w + -0.330299497; r0.z = r0.z * r0.w + 0.999866009; r0.w = r0.y * r0.z; r0.w = r0.w * -2 + 1.57079637; r1.w = cmp(abs(r3.y) < abs(r3.x)); r0.w = r1.w ? r0.w : 0; r0.y = r0.y * r0.z + r0.w; r0.zw = cmp(r3.yz < -r3.yz); r0.z = r0.z ? -3.141593 : 0; r0.y = r0.y + r0.z; r0.z = min(r3.x, r3.y); r0.z = cmp(r0.z < -r0.z); r1.w = max(r3.x, r3.y); r1.w = cmp(r1.w >= -r1.w); r0.z = r0.z ? r1.w : 0; r0.y = r0.z ? -r0.y : r0.y; r1.x = 0.159154937 * r0.y; r0.y = abs(r3.z) * -0.0187292993 + 0.0742610022; r0.y = r0.y * abs(r3.z) + -0.212114394; r0.y = r0.y * abs(r3.z) + 1.57072878; r0.z = 1 + -abs(r3.z); r0.z = sqrt(r0.z); r1.w = r0.y * r0.z; r1.w = r1.w * -2 + 3.14159274; r0.w = r0.w ? r1.w : 0; r0.y = r0.y * r0.z + r0.w; r0.y = 1.57079637 + -r0.y; r0.y = r0.y * 0.636619747 + 1; r1.y = 0.5 * r0.y; r1.xyzw = inscatterVolumeTexture.SampleLevel(wmcSamplerState_s, r1.xyz, 0).xyzw; r0.yz = nearFarTexture.SampleLevel(cubeSamplerState_s, r3.xyz, 0).xy; r0.w = max(r0.y, r0.z); r0.y = min(r0.z, r0.y); r0.yz = r0.ww + -r0.yx; r0.x = -nearDist + r0.x; r0.y = saturate(r0.z / r0.y); r0.z = 1 + -r0.y; r0.y = frac(-r0.y); r3.w = floor(r0.z); r4.xyzw = float4(0,0,0,1) + r3.xyzw; r5.xyzw = imageCubeArray.SampleLevel(cubeSamplerState_s, r3.xyzw, 0).xyzw; r4.xyzw = imageCubeArray.SampleLevel(cubeSamplerState_s, r4.xyzw, 0).xyzw; r4.xyzw = r4.xyzw + -r5.xyzw; r4.xyzw = r0.yyyy * r4.xyzw + r5.xyzw; r4.xyzw = float4(-0,-0,-0,-1) + r4.xyzw; r0.y = nearDist + nearDist; r0.y = max(9.99999994e-009, r0.y); r0.x = saturate(r0.x / r0.y); r0.xyzw = r0.xxxx * r4.xyzw + float4(0,0,0,1); r1.xyz = r1.xyz * r0.www; r1.xyzw = r1.xyzw + r0.xyzw; o1.xyzw = r2.xyzw * r0.wwww; r0.xyz = worldToScatteringVolumeMatrix._m01_m11_m21 * r3.yyy; r0.xyz = worldToScatteringVolumeMatrix._m00_m10_m20 * r3.xxx + r0.xyz; r0.xyz = worldToScatteringVolumeMatrix._m02_m12_m22 * r3.zzz + r0.xyz; r0.xyz = worldToScatteringVolumeMatrix._m03_m13_m23 + r0.xyz; r0.w = max(abs(r0.x), abs(r0.y)); r0.w = 1 / r0.w; r2.x = min(abs(r0.x), abs(r0.y)); r0.w = r2.x * r0.w; r2.x = r0.w * r0.w; r2.y = r2.x * 0.0208350997 + -0.0851330012; r2.y = r2.x * r2.y + 0.180141002; r2.y = r2.x * r2.y + -0.330299497; r2.x = r2.x * r2.y + 0.999866009; r2.y = r2.x * r0.w; r2.y = r2.y * -2 + 1.57079637; r2.z = cmp(abs(r0.y) < abs(r0.x)); r2.y = r2.z ? r2.y : 0; r0.w = r0.w * r2.x + r2.y; r2.x = cmp(r0.y < -r0.y); r2.x = r2.x ? -3.141593 : 0; r0.w = r2.x + r0.w; r2.x = min(r0.x, r0.y); r2.x = cmp(r2.x < -r2.x); r2.y = max(r0.x, r0.y); r2.y = cmp(r2.y >= -r2.y); r2.x = r2.y ? r2.x : 0; r0.w = r2.x ? -r0.w : r0.w; r0.w = 0.159154937 * r0.w; r2.x = frac(r0.w); r0.x = dot(r0.xyz, r0.xyz); r2.z = sqrt(r0.x); r0.x = r0.z / r2.z; r0.y = abs(r0.x) * -0.0187292993 + 0.0742610022; r0.y = r0.y * abs(r0.x) + -0.212114394; r0.y = r0.y * abs(r0.x) + 1.57072878; r0.z = 1 + -abs(r0.x); r0.x = cmp(r0.x < -r0.x); r0.z = sqrt(r0.z); r0.w = r0.y * r0.z; r0.w = r0.w * -2 + 3.14159274; r0.x = r0.x ? r0.w : 0; r0.x = r0.y * r0.z + r0.x; r0.x = 1.57079637 + -r0.x; r2.y = r0.x * 0.318309873 + 0.5; r0.xyzw = godraysVolumeTexture.SampleLevel(wccSamplerState_s, r2.xyz, 0).xyzw; o0.xyzw = r1.xyzw * r0.xyzw; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 10.1 // // using 3Dmigoto v1.3.11 on Tue Jun 19 20:34:49 2018 // // // Buffer Definitions: // // cbuffer HdrConstants // { // // float4x4 worldToScatteringVolumeMatrix;// Offset: 0 Size: 64 // float4x4 invViewProj; // Offset: 64 Size: 64 // float4 viewportToTexRegionScaleBias;// Offset: 128 Size: 16 [unused] // float2 offset; // Offset: 144 Size: 8 [unused] // float alpha; // Offset: 152 Size: 4 [unused] // float nearDist; // Offset: 156 Size: 4 // float4 colour2; // Offset: 160 Size: 16 [unused] // float4 tanHalfFov; // Offset: 176 Size: 16 // float2 tanHalfFovUnused; // Offset: 192 Size: 8 [unused] // float exposure; // Offset: 200 Size: 4 [unused] // float gamma; // Offset: 204 Size: 4 [unused] // float4 depthToLinFadeDistParams; // Offset: 208 Size: 16 // float4 warpHmdWarpParam; // Offset: 224 Size: 16 [unused] // float3 cubemapGroundColour; // Offset: 240 Size: 12 [unused] // float ccgcpad; // Offset: 252 Size: 4 [unused] // float2 warpScreenCentre; // Offset: 256 Size: 8 [unused] // float2 warpScale; // Offset: 264 Size: 8 [unused] // float2 warpScaleIn; // Offset: 272 Size: 8 [unused] // float2 padHdrConstants1; // Offset: 280 Size: 8 [unused] // uint2 hiResDimsX; // Offset: 288 Size: 8 [unused] // uint2 lowResDims; // Offset: 296 Size: 8 [unused] // uint2 fullResDims; // Offset: 304 Size: 8 [unused] // int numSamples; // Offset: 312 Size: 4 [unused] // float maxFadeDistanceKm; // Offset: 316 Size: 4 [unused] // float3 infraredIntegrationFactors; // Offset: 320 Size: 12 [unused] // int randomSeed; // Offset: 332 Size: 4 [unused] // float3 viewPos; // Offset: 336 Size: 12 [unused] // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // wccSamplerState sampler NA NA 1 1 // wmcSamplerState sampler NA NA 2 1 // cubeSamplerState sampler NA NA 4 1 // cmcSamplerState sampler NA NA 5 1 // samplerStateNearestClamp sampler NA NA 15 1 // imageCubeArray texture float4 cubearray 0 1 // depthTexture texture float4 2d 1 1 // nearFarTexture texture float4 cube 2 1 // loss2dTexture texture float4 2d 3 1 // inscatterVolumeTexture texture float4 3d 4 1 // godraysVolumeTexture texture float4 3d 5 1 // HdrConstants cbuffer NA NA 12 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_POSITION 0 xyzw 0 POS float // TEXCOORD 0 xy 1 NONE float // TEXCOORD 1 zw 1 NONE float // TEXCOORD 2 xyzw 2 NONE float xyzw // TEXCOORD 3 xy 3 NONE float xy // // // 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 // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb12[14], immediateIndexed dcl_sampler s1, mode_default dcl_sampler s2, mode_default dcl_sampler s4, mode_default dcl_sampler s5, mode_default dcl_sampler s15, mode_default dcl_resource_texturecubearray (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texturecube (float,float,float,float) t2 dcl_resource_texture2d (float,float,float,float) t3 dcl_resource_texture3d (float,float,float,float) t4 dcl_resource_texture3d (float,float,float,float) t5 dcl_input_ps linear v2.xyzw dcl_input_ps linear v3.xy dcl_output o0.xyzw dcl_output o1.xyzw dcl_temps 6 mad r0.xy, v2.xyxx, cb12[11].xyxx, cb12[11].zwzz mad r0.x, r0.x, r0.x, l(1.000000) mad r0.x, r0.y, r0.y, r0.x sqrt r0.x, r0.x sample_l_indexable(texture2d)(float,float,float,float) r0.y, v3.xyxx, t1.yxzw, s15, l(0.000000) mad r0.z, r0.y, cb12[13].y, cb12[13].z div r0.z, cb12[13].x, r0.z mad r0.z, r0.y, cb12[13].w, r0.z lt r0.y, l(0.000000), r0.y mul r0.x, r0.x, r0.z movc r0.x, r0.y, r0.x, l(1.000000) sqrt r1.z, r0.x mul r0.yzw, v2.yyyy, cb12[5].xxyz mad r0.yzw, cb12[4].xxyz, v2.xxxx, r0.yyzw mad r0.yzw, cb12[6].xxyz, v2.zzzz, r0.yyzw mad r0.yzw, cb12[7].xxyz, v2.wwww, r0.yyzw dp3 r2.x, r0.yzwy, r0.yzwy rsq r2.x, r2.x mul r3.xyz, r0.yzwy, r2.xxxx mad r0.y, -r0.w, r2.x, l(1.000000) mul r1.w, r0.y, l(0.500000) sample_l_indexable(texture2d)(float,float,float,float) r2.xyzw, r1.zwzz, t3.xyzw, s5, l(0.000000) max r0.y, |r3.y|, |r3.x| div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y min r0.z, |r3.y|, |r3.x| mul r0.y, r0.y, r0.z mul r0.z, r0.y, r0.y mad r0.w, r0.z, l(0.0208350997), l(-0.085133) mad r0.w, r0.z, r0.w, l(0.180141) mad r0.w, r0.z, r0.w, l(-0.330299497) mad r0.z, r0.z, r0.w, l(0.999866) mul r0.w, r0.z, r0.y mad r0.w, r0.w, l(-2.000000), l(1.57079637) lt r1.w, |r3.y|, |r3.x| and r0.w, r0.w, r1.w mad r0.y, r0.y, r0.z, r0.w lt r0.zw, r3.yyyz, -r3.yyyz and r0.z, r0.z, l(0xc0490fdb) add r0.y, r0.z, r0.y min r0.z, r3.y, r3.x lt r0.z, r0.z, -r0.z max r1.w, r3.y, r3.x ge r1.w, r1.w, -r1.w and r0.z, r0.z, r1.w movc r0.y, r0.z, -r0.y, r0.y mul r1.x, r0.y, l(0.159154937) mad r0.y, |r3.z|, l(-0.0187292993), l(0.074261) mad r0.y, r0.y, |r3.z|, l(-0.212114394) mad r0.y, r0.y, |r3.z|, l(1.57072878) add r0.z, -|r3.z|, l(1.000000) sqrt r0.z, r0.z mul r1.w, r0.z, r0.y mad r1.w, r1.w, l(-2.000000), l(3.14159274) and r0.w, r0.w, r1.w mad r0.y, r0.y, r0.z, r0.w add r0.y, -r0.y, l(1.57079637) mad r0.y, r0.y, l(0.636619747), l(1.000000) mul r1.y, r0.y, l(0.500000) sample_l_indexable(texture3d)(float,float,float,float) r1.xyzw, r1.xyzx, t4.xyzw, s2, l(0.000000) sample_l_indexable(texturecube)(float,float,float,float) r0.yz, r3.xyzx, t2.zxyw, s4, l(0.000000) max r0.w, r0.z, r0.y min r0.y, r0.y, r0.z add r0.yz, -r0.yyxy, r0.wwww add r0.x, r0.x, -cb12[9].w div_sat r0.y, r0.z, r0.y add r0.z, -r0.y, l(1.000000) frc r0.y, -r0.y round_ni r3.w, r0.z add r4.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 1.000000) sample_l_indexable(texturecubearray)(float,float,float,float) r5.xyzw, r3.xyzw, t0.xyzw, s4, l(0.000000) sample_l_indexable(texturecubearray)(float,float,float,float) r4.xyzw, r4.xyzw, t0.xyzw, s4, l(0.000000) add r4.xyzw, -r5.xyzw, r4.xyzw mad r4.xyzw, r0.yyyy, r4.xyzw, r5.xyzw add r4.xyzw, r4.xyzw, l(-0.000000, -0.000000, -0.000000, -1.000000) add r0.y, cb12[9].w, cb12[9].w max r0.y, r0.y, l(9.999999939E-009) div_sat r0.x, r0.x, r0.y mad r0.xyzw, r0.xxxx, r4.xyzw, l(0.000000, 0.000000, 0.000000, 1.000000) mul r1.xyz, r0.wwww, r1.xyzx add r1.xyzw, r0.xyzw, r1.xyzw mul o1.xyzw, r0.wwww, r2.xyzw mul r0.xyz, r3.yyyy, cb12[1].xyzx mad r0.xyz, cb12[0].xyzx, r3.xxxx, r0.xyzx mad r0.xyz, cb12[2].xyzx, r3.zzzz, r0.xyzx add r0.xyz, r0.xyzx, cb12[3].xyzx max r0.w, |r0.y|, |r0.x| div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w min r2.x, |r0.y|, |r0.x| mul r0.w, r0.w, r2.x mul r2.x, r0.w, r0.w mad r2.y, r2.x, l(0.0208350997), l(-0.085133) mad r2.y, r2.x, r2.y, l(0.180141) mad r2.y, r2.x, r2.y, l(-0.330299497) mad r2.x, r2.x, r2.y, l(0.999866) mul r2.y, r0.w, r2.x mad r2.y, r2.y, l(-2.000000), l(1.57079637) lt r2.z, |r0.y|, |r0.x| and r2.y, r2.z, r2.y mad r0.w, r0.w, r2.x, r2.y lt r2.x, r0.y, -r0.y and r2.x, r2.x, l(0xc0490fdb) add r0.w, r0.w, r2.x min r2.x, r0.y, r0.x lt r2.x, r2.x, -r2.x max r2.y, r0.y, r0.x ge r2.y, r2.y, -r2.y and r2.x, r2.y, r2.x movc r0.w, r2.x, -r0.w, r0.w mul r0.w, r0.w, l(0.159154937) frc r2.x, r0.w dp3 r0.x, r0.xyzx, r0.xyzx sqrt r2.z, r0.x div r0.x, r0.z, r2.z mad r0.y, |r0.x|, l(-0.0187292993), l(0.074261) mad r0.y, r0.y, |r0.x|, l(-0.212114394) mad r0.y, r0.y, |r0.x|, l(1.57072878) add r0.z, -|r0.x|, l(1.000000) lt r0.x, r0.x, -r0.x sqrt r0.z, r0.z mul r0.w, r0.z, r0.y mad r0.w, r0.w, l(-2.000000), l(3.14159274) and r0.x, r0.x, r0.w mad r0.x, r0.y, r0.z, r0.x add r0.x, -r0.x, l(1.57079637) mad r2.y, r0.x, l(0.318309873), l(0.500000) sample_l_indexable(texture3d)(float,float,float,float) r0.xyzw, r2.xyzx, t5.xyzw, s1, l(0.000000) mul o0.xyzw, r0.xyzw, r1.xyzw ret // Approximately 128 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code]
3D_Mike said:
Losti said:if you want i can have a look @ this game

//EDIT:

Could it be that you play a track that is dark (in the night -- like th quick race one??) ? I can not see any issue with and without 3D regarding the sky. Its the same in 3D-vanilla and in 3D with Migoto.

Here is my WIP for you, fixed 2 shaders manually and halos...the rest is done with the universal fix .... get some UI depth but UI is not perfect, the font is wrong because its the same shader as the rest or a shader i havnt tracked...ill investigate it if i find some tim next to my real live and other projects panding ^^

https://s3.amazonaws.com/losti/MotoGP18_WIP_DHR-UNIVERSAL_V0.1.rar


Hello Losti,
thank you for your help!
No, I don't play a track at night.
I'll attach two 2D (!) screenshots (just started the basic tutorial, where you drive at daylight):

1) Black Sky: This is the black sky with my and also with your posted fix. It's the same in 3D and in 2D (when I turn off 3D by pressing the green button on the emitter). I think the sky is black because we removed the skybox-shader in the d3dx.ini ("handling = skip").

2) Blue Sky: This would be the normal blue sky (even with clouds :-)). I get this when I play vanilla game or when I remove your changes in the d3dx.ini. In 3D of course I get the wrong skybox depth (unplayable, white/blueish fog: I posted some 3D pictures in my posts above). But when I disable 3D (by pressing the green button on the 3D-vision-emitter) you can see on the 2D screenshot that the sky would be blue!

Don't know what I did wrong or why it's working for you... So you really get a blue sky? Can you post a screenshot in 3D please? I have Nvidia driver 398.11 by the way...

Thank you for taking your time!


AHHHH ok i see what you mean. I can move the skybox to inv (right depth) but it will still cover the whole scene. No idea how to handle this. Hence the problem seems to be in the PS not in the VS but i have no idea how to track done because this is an unknown effect for me.

By the way there are more wrong effects but this is not a problem, i can handle this but major issue is the skybox if you cant live with a black one ^^

The PS:

// ---- Created with 3Dmigoto v1.3.11 on Tue Jun 19 20:34:49 2018

cbuffer HdrConstants : register(b12)
{
float4x4 worldToScatteringVolumeMatrix : packoffset(c0);
float4x4 invViewProj : packoffset(c4);
float4 viewportToTexRegionScaleBias : packoffset(c8);
float2 offset : packoffset(c9);
float alpha : packoffset(c9.z);
float nearDist : packoffset(c9.w);
float4 colour2 : packoffset(c10);
float4 tanHalfFov : packoffset(c11);
float2 tanHalfFovUnused : packoffset(c12);
float exposure : packoffset(c12.z);
float gamma : packoffset(c12.w);
float4 depthToLinFadeDistParams : packoffset(c13);
float4 warpHmdWarpParam : packoffset(c14);
float3 cubemapGroundColour : packoffset(c15);
float ccgcpad : packoffset(c15.w);
float2 warpScreenCentre : packoffset(c16);
float2 warpScale : packoffset(c16.z);
float2 warpScaleIn : packoffset(c17);
float2 padHdrConstants1 : packoffset(c17.z);
uint2 hiResDimsX : packoffset(c18);
uint2 lowResDims : packoffset(c18.z);
uint2 fullResDims : packoffset(c19);
int numSamples : packoffset(c19.z);
float maxFadeDistanceKm : packoffset(c19.w);
float3 infraredIntegrationFactors : packoffset(c20);
int randomSeed : packoffset(c20.w);
float3 viewPos : packoffset(c21);
}

SamplerState wccSamplerState_s : register(s1);
SamplerState wmcSamplerState_s : register(s2);
SamplerState cubeSamplerState_s : register(s4);
SamplerState cmcSamplerState_s : register(s5);
SamplerState samplerStateNearestClamp_s : register(s15);
TextureCubeArray<float4> imageCubeArray : register(t0);
Texture2D<float4> depthTexture : register(t1);
TextureCube<float4> nearFarTexture : register(t2);
Texture2D<float4> loss2dTexture : register(t3);
Texture3D<float4> inscatterVolumeTexture : register(t4);
Texture3D<float4> godraysVolumeTexture : register(t5);


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


void main(
float4 v0 : SV_POSITION0,
float2 v1 : TEXCOORD0,
float2 w1 : TEXCOORD1,
float4 v2 : TEXCOORD2,
float2 v3 : TEXCOORD3,
out float4 o0 : SV_TARGET0,
out float4 o1 : SV_TARGET1)
{
float4 r0,r1,r2,r3,r4,r5;
uint4 bitmask, uiDest;
float4 fDest;

r0.xy = v2.xy * tanHalfFov.xy + tanHalfFov.zw;
r0.x = r0.x * r0.x + 1;
r0.x = r0.y * r0.y + r0.x;
r0.x = sqrt(r0.x);
r0.y = depthTexture.SampleLevel(samplerStateNearestClamp_s, v3.xy, 0).x;
r0.z = r0.y * depthToLinFadeDistParams.y + depthToLinFadeDistParams.z;
r0.z = depthToLinFadeDistParams.x / r0.z;
r0.z = r0.y * depthToLinFadeDistParams.w + r0.z;
r0.y = cmp(0 < r0.y);
r0.x = r0.z * r0.x;
r0.x = r0.y ? r0.x : 1;
r1.z = sqrt(r0.x);
r0.yzw = invViewProj._m01_m11_m21 * v2.yyy;
r0.yzw = invViewProj._m00_m10_m20 * v2.xxx + r0.yzw;
r0.yzw = invViewProj._m02_m12_m22 * v2.zzz + r0.yzw;
r0.yzw = invViewProj._m03_m13_m23 * v2.www + r0.yzw;
r2.x = dot(r0.yzw, r0.yzw);
r2.x = rsqrt(r2.x);
r3.xyz = r2.xxx * r0.yzw;
r0.y = -r0.w * r2.x + 1;
r1.w = 0.5 * r0.y;
r2.xyzw = loss2dTexture.SampleLevel(cmcSamplerState_s, r1.zw, 0).xyzw;
r0.y = max(abs(r3.x), abs(r3.y));
r0.y = 1 / r0.y;
r0.z = min(abs(r3.x), abs(r3.y));
r0.y = r0.z * r0.y;
r0.z = r0.y * r0.y;
r0.w = r0.z * 0.0208350997 + -0.0851330012;
r0.w = r0.z * r0.w + 0.180141002;
r0.w = r0.z * r0.w + -0.330299497;
r0.z = r0.z * r0.w + 0.999866009;
r0.w = r0.y * r0.z;
r0.w = r0.w * -2 + 1.57079637;
r1.w = cmp(abs(r3.y) < abs(r3.x));
r0.w = r1.w ? r0.w : 0;
r0.y = r0.y * r0.z + r0.w;
r0.zw = cmp(r3.yz < -r3.yz);
r0.z = r0.z ? -3.141593 : 0;
r0.y = r0.y + r0.z;
r0.z = min(r3.x, r3.y);
r0.z = cmp(r0.z < -r0.z);
r1.w = max(r3.x, r3.y);
r1.w = cmp(r1.w >= -r1.w);
r0.z = r0.z ? r1.w : 0;
r0.y = r0.z ? -r0.y : r0.y;
r1.x = 0.159154937 * r0.y;
r0.y = abs(r3.z) * -0.0187292993 + 0.0742610022;
r0.y = r0.y * abs(r3.z) + -0.212114394;
r0.y = r0.y * abs(r3.z) + 1.57072878;
r0.z = 1 + -abs(r3.z);
r0.z = sqrt(r0.z);
r1.w = r0.y * r0.z;
r1.w = r1.w * -2 + 3.14159274;
r0.w = r0.w ? r1.w : 0;
r0.y = r0.y * r0.z + r0.w;
r0.y = 1.57079637 + -r0.y;
r0.y = r0.y * 0.636619747 + 1;
r1.y = 0.5 * r0.y;
r1.xyzw = inscatterVolumeTexture.SampleLevel(wmcSamplerState_s, r1.xyz, 0).xyzw;
r0.yz = nearFarTexture.SampleLevel(cubeSamplerState_s, r3.xyz, 0).xy;
r0.w = max(r0.y, r0.z);
r0.y = min(r0.z, r0.y);
r0.yz = r0.ww + -r0.yx;
r0.x = -nearDist + r0.x;
r0.y = saturate(r0.z / r0.y);
r0.z = 1 + -r0.y;
r0.y = frac(-r0.y);
r3.w = floor(r0.z);
r4.xyzw = float4(0,0,0,1) + r3.xyzw;
r5.xyzw = imageCubeArray.SampleLevel(cubeSamplerState_s, r3.xyzw, 0).xyzw;
r4.xyzw = imageCubeArray.SampleLevel(cubeSamplerState_s, r4.xyzw, 0).xyzw;
r4.xyzw = r4.xyzw + -r5.xyzw;
r4.xyzw = r0.yyyy * r4.xyzw + r5.xyzw;
r4.xyzw = float4(-0,-0,-0,-1) + r4.xyzw;
r0.y = nearDist + nearDist;
r0.y = max(9.99999994e-009, r0.y);
r0.x = saturate(r0.x / r0.y);
r0.xyzw = r0.xxxx * r4.xyzw + float4(0,0,0,1);
r1.xyz = r1.xyz * r0.www;
r1.xyzw = r1.xyzw + r0.xyzw;
o1.xyzw = r2.xyzw * r0.wwww;
r0.xyz = worldToScatteringVolumeMatrix._m01_m11_m21 * r3.yyy;
r0.xyz = worldToScatteringVolumeMatrix._m00_m10_m20 * r3.xxx + r0.xyz;
r0.xyz = worldToScatteringVolumeMatrix._m02_m12_m22 * r3.zzz + r0.xyz;
r0.xyz = worldToScatteringVolumeMatrix._m03_m13_m23 + r0.xyz;
r0.w = max(abs(r0.x), abs(r0.y));
r0.w = 1 / r0.w;
r2.x = min(abs(r0.x), abs(r0.y));
r0.w = r2.x * r0.w;
r2.x = r0.w * r0.w;
r2.y = r2.x * 0.0208350997 + -0.0851330012;
r2.y = r2.x * r2.y + 0.180141002;
r2.y = r2.x * r2.y + -0.330299497;
r2.x = r2.x * r2.y + 0.999866009;
r2.y = r2.x * r0.w;
r2.y = r2.y * -2 + 1.57079637;
r2.z = cmp(abs(r0.y) < abs(r0.x));
r2.y = r2.z ? r2.y : 0;
r0.w = r0.w * r2.x + r2.y;
r2.x = cmp(r0.y < -r0.y);
r2.x = r2.x ? -3.141593 : 0;
r0.w = r2.x + r0.w;
r2.x = min(r0.x, r0.y);
r2.x = cmp(r2.x < -r2.x);
r2.y = max(r0.x, r0.y);
r2.y = cmp(r2.y >= -r2.y);
r2.x = r2.y ? r2.x : 0;
r0.w = r2.x ? -r0.w : r0.w;
r0.w = 0.159154937 * r0.w;
r2.x = frac(r0.w);
r0.x = dot(r0.xyz, r0.xyz);
r2.z = sqrt(r0.x);
r0.x = r0.z / r2.z;
r0.y = abs(r0.x) * -0.0187292993 + 0.0742610022;
r0.y = r0.y * abs(r0.x) + -0.212114394;
r0.y = r0.y * abs(r0.x) + 1.57072878;
r0.z = 1 + -abs(r0.x);
r0.x = cmp(r0.x < -r0.x);
r0.z = sqrt(r0.z);
r0.w = r0.y * r0.z;
r0.w = r0.w * -2 + 3.14159274;
r0.x = r0.x ? r0.w : 0;
r0.x = r0.y * r0.z + r0.x;
r0.x = 1.57079637 + -r0.x;
r2.y = r0.x * 0.318309873 + 0.5;
r0.xyzw = godraysVolumeTexture.SampleLevel(wccSamplerState_s, r2.xyz, 0).xyzw;
o0.xyzw = r1.xyzw * r0.xyzw;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
// using 3Dmigoto v1.3.11 on Tue Jun 19 20:34:49 2018
//
//
// Buffer Definitions:
//
// cbuffer HdrConstants
// {
//
// float4x4 worldToScatteringVolumeMatrix;// Offset: 0 Size: 64
// float4x4 invViewProj; // Offset: 64 Size: 64
// float4 viewportToTexRegionScaleBias;// Offset: 128 Size: 16 [unused]
// float2 offset; // Offset: 144 Size: 8 [unused]
// float alpha; // Offset: 152 Size: 4 [unused]
// float nearDist; // Offset: 156 Size: 4
// float4 colour2; // Offset: 160 Size: 16 [unused]
// float4 tanHalfFov; // Offset: 176 Size: 16
// float2 tanHalfFovUnused; // Offset: 192 Size: 8 [unused]
// float exposure; // Offset: 200 Size: 4 [unused]
// float gamma; // Offset: 204 Size: 4 [unused]
// float4 depthToLinFadeDistParams; // Offset: 208 Size: 16
// float4 warpHmdWarpParam; // Offset: 224 Size: 16 [unused]
// float3 cubemapGroundColour; // Offset: 240 Size: 12 [unused]
// float ccgcpad; // Offset: 252 Size: 4 [unused]
// float2 warpScreenCentre; // Offset: 256 Size: 8 [unused]
// float2 warpScale; // Offset: 264 Size: 8 [unused]
// float2 warpScaleIn; // Offset: 272 Size: 8 [unused]
// float2 padHdrConstants1; // Offset: 280 Size: 8 [unused]
// uint2 hiResDimsX; // Offset: 288 Size: 8 [unused]
// uint2 lowResDims; // Offset: 296 Size: 8 [unused]
// uint2 fullResDims; // Offset: 304 Size: 8 [unused]
// int numSamples; // Offset: 312 Size: 4 [unused]
// float maxFadeDistanceKm; // Offset: 316 Size: 4 [unused]
// float3 infraredIntegrationFactors; // Offset: 320 Size: 12 [unused]
// int randomSeed; // Offset: 332 Size: 4 [unused]
// float3 viewPos; // Offset: 336 Size: 12 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// wccSamplerState sampler NA NA 1 1
// wmcSamplerState sampler NA NA 2 1
// cubeSamplerState sampler NA NA 4 1
// cmcSamplerState sampler NA NA 5 1
// samplerStateNearestClamp sampler NA NA 15 1
// imageCubeArray texture float4 cubearray 0 1
// depthTexture texture float4 2d 1 1
// nearFarTexture texture float4 cube 2 1
// loss2dTexture texture float4 2d 3 1
// inscatterVolumeTexture texture float4 3d 4 1
// godraysVolumeTexture texture float4 3d 5 1
// HdrConstants cbuffer NA NA 12 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float
// TEXCOORD 1 zw 1 NONE float
// TEXCOORD 2 xyzw 2 NONE float xyzw
// TEXCOORD 3 xy 3 NONE float xy
//
//
// 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
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb12[14], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s15, mode_default
dcl_resource_texturecubearray (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texturecube (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture3d (float,float,float,float) t4
dcl_resource_texture3d (float,float,float,float) t5
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xy
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_temps 6
mad r0.xy, v2.xyxx, cb12[11].xyxx, cb12[11].zwzz
mad r0.x, r0.x, r0.x, l(1.000000)
mad r0.x, r0.y, r0.y, r0.x
sqrt r0.x, r0.x
sample_l_indexable(texture2d)(float,float,float,float) r0.y, v3.xyxx, t1.yxzw, s15, l(0.000000)
mad r0.z, r0.y, cb12[13].y, cb12[13].z
div r0.z, cb12[13].x, r0.z
mad r0.z, r0.y, cb12[13].w, r0.z
lt r0.y, l(0.000000), r0.y
mul r0.x, r0.x, r0.z
movc r0.x, r0.y, r0.x, l(1.000000)
sqrt r1.z, r0.x
mul r0.yzw, v2.yyyy, cb12[5].xxyz
mad r0.yzw, cb12[4].xxyz, v2.xxxx, r0.yyzw
mad r0.yzw, cb12[6].xxyz, v2.zzzz, r0.yyzw
mad r0.yzw, cb12[7].xxyz, v2.wwww, r0.yyzw
dp3 r2.x, r0.yzwy, r0.yzwy
rsq r2.x, r2.x
mul r3.xyz, r0.yzwy, r2.xxxx
mad r0.y, -r0.w, r2.x, l(1.000000)
mul r1.w, r0.y, l(0.500000)
sample_l_indexable(texture2d)(float,float,float,float) r2.xyzw, r1.zwzz, t3.xyzw, s5, l(0.000000)
max r0.y, |r3.y|, |r3.x|
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y
min r0.z, |r3.y|, |r3.x|
mul r0.y, r0.y, r0.z
mul r0.z, r0.y, r0.y
mad r0.w, r0.z, l(0.0208350997), l(-0.085133)
mad r0.w, r0.z, r0.w, l(0.180141)
mad r0.w, r0.z, r0.w, l(-0.330299497)
mad r0.z, r0.z, r0.w, l(0.999866)
mul r0.w, r0.z, r0.y
mad r0.w, r0.w, l(-2.000000), l(1.57079637)
lt r1.w, |r3.y|, |r3.x|
and r0.w, r0.w, r1.w
mad r0.y, r0.y, r0.z, r0.w
lt r0.zw, r3.yyyz, -r3.yyyz
and r0.z, r0.z, l(0xc0490fdb)
add r0.y, r0.z, r0.y
min r0.z, r3.y, r3.x
lt r0.z, r0.z, -r0.z
max r1.w, r3.y, r3.x
ge r1.w, r1.w, -r1.w
and r0.z, r0.z, r1.w
movc r0.y, r0.z, -r0.y, r0.y
mul r1.x, r0.y, l(0.159154937)
mad r0.y, |r3.z|, l(-0.0187292993), l(0.074261)
mad r0.y, r0.y, |r3.z|, l(-0.212114394)
mad r0.y, r0.y, |r3.z|, l(1.57072878)
add r0.z, -|r3.z|, l(1.000000)
sqrt r0.z, r0.z
mul r1.w, r0.z, r0.y
mad r1.w, r1.w, l(-2.000000), l(3.14159274)
and r0.w, r0.w, r1.w
mad r0.y, r0.y, r0.z, r0.w
add r0.y, -r0.y, l(1.57079637)
mad r0.y, r0.y, l(0.636619747), l(1.000000)
mul r1.y, r0.y, l(0.500000)
sample_l_indexable(texture3d)(float,float,float,float) r1.xyzw, r1.xyzx, t4.xyzw, s2, l(0.000000)
sample_l_indexable(texturecube)(float,float,float,float) r0.yz, r3.xyzx, t2.zxyw, s4, l(0.000000)
max r0.w, r0.z, r0.y
min r0.y, r0.y, r0.z
add r0.yz, -r0.yyxy, r0.wwww
add r0.x, r0.x, -cb12[9].w
div_sat r0.y, r0.z, r0.y
add r0.z, -r0.y, l(1.000000)
frc r0.y, -r0.y
round_ni r3.w, r0.z
add r4.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 1.000000)
sample_l_indexable(texturecubearray)(float,float,float,float) r5.xyzw, r3.xyzw, t0.xyzw, s4, l(0.000000)
sample_l_indexable(texturecubearray)(float,float,float,float) r4.xyzw, r4.xyzw, t0.xyzw, s4, l(0.000000)
add r4.xyzw, -r5.xyzw, r4.xyzw
mad r4.xyzw, r0.yyyy, r4.xyzw, r5.xyzw
add r4.xyzw, r4.xyzw, l(-0.000000, -0.000000, -0.000000, -1.000000)
add r0.y, cb12[9].w, cb12[9].w
max r0.y, r0.y, l(9.999999939E-009)
div_sat r0.x, r0.x, r0.y
mad r0.xyzw, r0.xxxx, r4.xyzw, l(0.000000, 0.000000, 0.000000, 1.000000)
mul r1.xyz, r0.wwww, r1.xyzx
add r1.xyzw, r0.xyzw, r1.xyzw
mul o1.xyzw, r0.wwww, r2.xyzw
mul r0.xyz, r3.yyyy, cb12[1].xyzx
mad r0.xyz, cb12[0].xyzx, r3.xxxx, r0.xyzx
mad r0.xyz, cb12[2].xyzx, r3.zzzz, r0.xyzx
add r0.xyz, r0.xyzx, cb12[3].xyzx
max r0.w, |r0.y|, |r0.x|
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
min r2.x, |r0.y|, |r0.x|
mul r0.w, r0.w, r2.x
mul r2.x, r0.w, r0.w
mad r2.y, r2.x, l(0.0208350997), l(-0.085133)
mad r2.y, r2.x, r2.y, l(0.180141)
mad r2.y, r2.x, r2.y, l(-0.330299497)
mad r2.x, r2.x, r2.y, l(0.999866)
mul r2.y, r0.w, r2.x
mad r2.y, r2.y, l(-2.000000), l(1.57079637)
lt r2.z, |r0.y|, |r0.x|
and r2.y, r2.z, r2.y
mad r0.w, r0.w, r2.x, r2.y
lt r2.x, r0.y, -r0.y
and r2.x, r2.x, l(0xc0490fdb)
add r0.w, r0.w, r2.x
min r2.x, r0.y, r0.x
lt r2.x, r2.x, -r2.x
max r2.y, r0.y, r0.x
ge r2.y, r2.y, -r2.y
and r2.x, r2.y, r2.x
movc r0.w, r2.x, -r0.w, r0.w
mul r0.w, r0.w, l(0.159154937)
frc r2.x, r0.w
dp3 r0.x, r0.xyzx, r0.xyzx
sqrt r2.z, r0.x
div r0.x, r0.z, r2.z
mad r0.y, |r0.x|, l(-0.0187292993), l(0.074261)
mad r0.y, r0.y, |r0.x|, l(-0.212114394)
mad r0.y, r0.y, |r0.x|, l(1.57072878)
add r0.z, -|r0.x|, l(1.000000)
lt r0.x, r0.x, -r0.x
sqrt r0.z, r0.z
mul r0.w, r0.z, r0.y
mad r0.w, r0.w, l(-2.000000), l(3.14159274)
and r0.x, r0.x, r0.w
mad r0.x, r0.y, r0.z, r0.x
add r0.x, -r0.x, l(1.57079637)
mad r2.y, r0.x, l(0.318309873), l(0.500000)
sample_l_indexable(texture3d)(float,float,float,float) r0.xyzw, r2.xyzx, t5.xyzw, s1, l(0.000000)
mul o0.xyzw, r0.xyzw, r1.xyzw
ret
// Approximately 128 instruction slots used

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

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

#26
Posted 06/19/2018 06:39 PM   
Hmmm, so it seems the UE4 universal fix doesn‘t work anymore with the latest games (at least concerning skybox) because the game „Gravel“ has the same problem. Is it possible to push the skybox-layer (shader?) at maximum depth so that it won‘t cover any other object in the foreground? Or is there something as a background which could just be a blue wall/sphere (without clouds - but better a blue background than a black one)?
Hmmm, so it seems the UE4 universal fix doesn‘t work anymore with the latest games (at least concerning skybox) because the game „Gravel“ has the same problem.
Is it possible to push the skybox-layer (shader?) at maximum depth so that it won‘t cover any other object in the foreground?
Or is there something as a background which could just be a blue wall/sphere (without clouds - but better a blue background than a black one)?

Win 8.1 pro 64 bit, Gigabyte Z87X-D3H - i7-4770K@3.5 - 32 GB, 2x Geforce TITAN SLI (EVGA), 3x ASUS 3D-Vision-Monitors

#27
Posted 06/19/2018 07:54 PM   
@3D_Mike If both games (MotoGP18 and Gravel) are using those shaders with headers, is because they are using an old version of the UE4 (vanilla UE4 shaders don't have headers!) or is a custom shader for those games...
@3D_Mike
If both games (MotoGP18 and Gravel) are using those shaders with headers, is because they are using an old version of the UE4 (vanilla UE4 shaders don't have headers!) or is a custom shader for those games...

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#28
Posted 06/19/2018 11:31 PM   
[quote="3D_Mike"]Hmmm, so it seems the UE4 universal fix doesn‘t work anymore with the latest games (at least concerning skybox) because the game „Gravel“ has the same problem. Is it possible to push the skybox-layer (shader?) at maximum depth so that it won‘t cover any other object in the foreground? Or is there something as a background which could just be a blue wall/sphere (without clouds - but better a blue background than a black one)? [/quote] THe UE4 universal fix is working very well and some shaders left can be manually fixed but THIS skybox shader is a mystery. The problem is NOT the 3D- depth it selfe, the Problem is the way the shader renders. I need to check some lines to identify the resposible one and ill have a look what i can do here. //EDIT Fixed the other Stuff but the HUD and the skybox is remaining and some minor reflectionsi cant track down https://s3.amazonaws.com/losti/MotoGP18_WIP_DHR-UNIVERSAL_V0.2.rar i have tryed something but cant fix the overlaying thing of the skybox. Hence its still disabled.
3D_Mike said:Hmmm, so it seems the UE4 universal fix doesn‘t work anymore with the latest games (at least concerning skybox) because the game „Gravel“ has the same problem.
Is it possible to push the skybox-layer (shader?) at maximum depth so that it won‘t cover any other object in the foreground?
Or is there something as a background which could just be a blue wall/sphere (without clouds - but better a blue background than a black one)?


THe UE4 universal fix is working very well and some shaders left can be manually fixed but THIS skybox shader is a mystery. The problem is NOT the 3D- depth it selfe, the Problem is the way the shader renders. I need to check some lines to identify the resposible one and ill have a look what i can do here.

//EDIT

Fixed the other Stuff but the HUD and the skybox is remaining and some minor reflectionsi cant track down
https://s3.amazonaws.com/losti/MotoGP18_WIP_DHR-UNIVERSAL_V0.2.rar

i have tryed something but cant fix the overlaying thing of the skybox. Hence its still disabled.

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

#29
Posted 06/20/2018 05:42 AM   
Okay guys. No problem and thank you for your help! I just thought that these two games would work flawlessly in 3D because of UE4 and the universal fix... I fear the black sky is too distracting for me to enjoy them in 3D, but I‘m grateful that you tried to fix it. Thank you, 3D-heroes! :-)
Okay guys. No problem and thank you for your help!
I just thought that these two games would work flawlessly in 3D because of UE4 and the universal fix...
I fear the black sky is too distracting for me to enjoy them in 3D, but I‘m grateful that you tried to fix it.
Thank you, 3D-heroes! :-)

Win 8.1 pro 64 bit, Gigabyte Z87X-D3H - i7-4770K@3.5 - 32 GB, 2x Geforce TITAN SLI (EVGA), 3x ASUS 3D-Vision-Monitors

#30
Posted 06/20/2018 02:18 PM   
  2 / 3    
Scroll To Top