Prey 2017
  12 / 17    
@masterotaku I test your Sun Halo in the helicopter scene and i have the same hash when i hunt, so i suppose i miss that one (and the others). I was confussing with another halo that already fixed in the helicopter. Now the mistery is solve :) I update the fix with another ShaderRegex (Halo 3 variant) for those Halo type, so this will cover all the Halos you catch and probably others we both miss.
@masterotaku
I test your Sun Halo in the helicopter scene and i have the same hash when i hunt, so i suppose i miss that one (and the others). I was confussing with another halo that already fixed in the helicopter. Now the mistery is solve :)

I update the fix with another ShaderRegex (Halo 3 variant) for those Halo type, so this will cover all the Halos you catch and probably others we both miss.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 12/18/2017 09:36 PM   
Congrats DHR, the game looks very nice and is enjoyable now :) One question I have: are you planning to finish your 3Dfix for MAFIA 3 anytime soon, it would be wonderful ;) Cheers!
Congrats DHR, the game looks very nice and is enjoyable now :)

One question I have: are you planning to finish your 3Dfix for MAFIA 3 anytime soon, it would be wonderful ;)
Cheers!

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 12/18/2017 10:15 PM   
[quote="DHR"]@masterotaku I test your Sun Halo in the helicopter scene and i have the same hash when i hunt, so i suppose i miss that one (and the others). I was confussing with another halo that already fixed in the helicopter. Now the mistery is solve :) I update the fix with another ShaderRegex (Halo 3 variant) for those Halo type, so this will cover all the Halos you catch and probably others we both miss.[/quote] Great. That will take care of everything with the same pattern. There is an issue I found in the arboretum, that maybe you saw already. There is a small fake pond (it's actually a glass screen) with a waterfall, and the pond has a double depth (haloing) problem. Even without the fix, the effect disappears after a few seconds of being near it, but the shader is so strange... 4402d3785f8a6f8e-vs_replace.txt: [code] //Water haloing arboretum. // ---- Created with 3Dmigoto v1.2.67 on Sun Dec 17 23:31:39 2017 cbuffer PER_BATCH : register(b0) { float4 VS_SunColor : packoffset(c0); float4 WaterRipplesLookupParams : packoffset(c1); } cbuffer PER_INSTANCE : register(b1) { row_major float3x4 ObjWorldMatrix : packoffset(c0); } cbuffer PER_MATERIAL : register(b3) { float4 MatSpecColor : packoffset(c31); float3 __0bendDetailFrequency__1bendDetailLeafAmplitude__2bendDetailBranchAmplitude__3 : packoffset(c40); float4 __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling : packoffset(c44); float3 __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3 : packoffset(c45); float4 __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul : packoffset(c47); float3 __0__1__2VertexWaveScale__3 : packoffset(c49); } cbuffer CBPerViewGlobal : register(b13) { row_major float4x4 CV_ViewProjZeroMatr : packoffset(c0); float4 CV_AnimGenParams : packoffset(c4); row_major float4x4 CV_ViewProjMatr : packoffset(c5); row_major float4x4 CV_ViewProjNearestMatr : packoffset(c9); row_major float4x4 CV_InvViewProj : packoffset(c13); row_major float4x4 CV_PrevViewProjMatr : packoffset(c17); row_major float4x4 CV_PrevViewProjNearestMatr : packoffset(c21); row_major float3x4 CV_ScreenToWorldBasis : packoffset(c25); float4 CV_TessInfo : packoffset(c28); float4 CV_CameraFrontVector : packoffset(c29); float4 CV_CameraUpVector : packoffset(c30); float4 CV_ScreenSize : packoffset(c31); float4 CV_HPosScale : packoffset(c32); float4 CV_ProjRatio : packoffset(c33); float4 CV_NearestScaled : packoffset(c34); float4 CV_NearFarClipDist : packoffset(c35); float4 CV_SunLightDir : packoffset(c36); float4 CV_SunColor : packoffset(c37); float4 CV_SkyColor : packoffset(c38); float4 CV_FogColor : packoffset(c39); float4 CV_TerrainInfo : packoffset(c40); float4 CV_DecalZFightingRemedy : packoffset(c41); row_major float4x4 CV_FrustumPlaneEquation : packoffset(c42); float4 CV_WindGridOffset : packoffset(c46); row_major float4x4 CV_ViewMatr : packoffset(c47); row_major float4x4 CV_InvViewMatr : packoffset(c51); float CV_LookingGlass_SunSelector : packoffset(c55); float CV_LookingGlass_DepthScalar : packoffset(c55.y); float CV_PADDING0 : packoffset(c55.z); float CV_PADDING1 : packoffset(c55.w); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : POSITION0, float2 v1 : TEXCOORD0, float4 v2 : COLOR0, out float4 o0 : TEXCOORD0, out float4 o1 : TEXCOORD1, out float4 o2 : TEXCOORD2, out float4 o3 : TEXCOORD3, out float4 o4 : TEXCOORD4, out float4 o5 : TEXCOORD5) { float4 r0,r1,r2; uint4 bitmask, uiDest; float4 fDest; float4 stereo = StereoParams.Load(0); r0.x = 1; r0.z = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.y; r0.xyzw = v1.xyxy * r0.xxzz; r1.x = __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3.z * CV_AnimGenParams.z; r1.xyzw = float4(0.25,0,1,0) * r1.xxxx; r2.x = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.y; r2.z = 2; r0.xyzw = r0.xyzw * r2.xxzz + r1.xyzw; o0.zw = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.zz * r0.zw; o0.xy = r0.xy; o1.xyzw = float4(1,1,0.858578682,1); r0.xyz = v0.xyz; r0.w = 1; r1.z = dot(ObjWorldMatrix._m20_m21_m22_m23, r0.xyzw); r1.w = CV_ScreenToWorldBasis._m23 + -r1.z; r2.x = cmp(0 < r1.w); r2.y = cmp(r1.w < 0); o2.z = r1.w; r1.w = (int)-r2.x + (int)r2.y; o2.w = (int)r1.w; r1.x = dot(ObjWorldMatrix._m00_m01_m02_m03, r0.xyzw); r1.y = dot(ObjWorldMatrix._m10_m11_m12_m13, r0.xyzw); o2.x = CV_ScreenToWorldBasis._m03 + -r1.x; o4.xyz = r1.xyz; o2.y = CV_ScreenToWorldBasis._m13 + -r1.y; r0.xyz = MatSpecColor.xyz * VS_SunColor.xyz; o3.xyz = VS_SunColor.www * r0.xyz; o3.w = 1; o4.w = v0.z; o5.xyzw = float4(1,1,1,1); return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546 // // using 3Dmigoto v1.2.67 on Sun Dec 17 23:31:39 2017 // // // Buffer Definitions: // // cbuffer PER_BATCH // { // // float4 VS_SunColor; // Offset: 0 Size: 16 // float4 WaterRipplesLookupParams; // Offset: 16 Size: 16 [unused] // // } // // cbuffer PER_INSTANCE // { // // row_major float3x4 ObjWorldMatrix; // Offset: 0 Size: 48 // // } // // cbuffer PER_MATERIAL // { // // float4 MatSpecColor; // Offset: 496 Size: 16 // float3 __0bendDetailFrequency__1bendDetailLeafAmplitude__2bendDetailBranchAmplitude__3;// Offset: 640 Size: 12 [unused] // float4 __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling;// Offset: 704 Size: 16 // float3 __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3;// Offset: 720 Size: 12 // float4 __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul;// Offset: 752 Size: 16 [unused] // float3 __0__1__2VertexWaveScale__3;// Offset: 784 Size: 12 [unused] // // } // // cbuffer CBPerViewGlobal // { // // row_major float4x4 CV_ViewProjZeroMatr;// Offset: 0 Size: 64 [unused] // float4 CV_AnimGenParams; // Offset: 64 Size: 16 // row_major float4x4 CV_ViewProjMatr;// Offset: 80 Size: 64 [unused] // row_major float4x4 CV_ViewProjNearestMatr;// Offset: 144 Size: 64 [unused] // row_major float4x4 CV_InvViewProj; // Offset: 208 Size: 64 [unused] // row_major float4x4 CV_PrevViewProjMatr;// Offset: 272 Size: 64 [unused] // row_major float4x4 CV_PrevViewProjNearestMatr;// Offset: 336 Size: 64 [unused] // row_major float3x4 CV_ScreenToWorldBasis;// Offset: 400 Size: 48 // float4 CV_TessInfo; // Offset: 448 Size: 16 [unused] // float4 CV_CameraFrontVector; // Offset: 464 Size: 16 [unused] // float4 CV_CameraUpVector; // Offset: 480 Size: 16 [unused] // float4 CV_ScreenSize; // Offset: 496 Size: 16 [unused] // float4 CV_HPosScale; // Offset: 512 Size: 16 [unused] // float4 CV_ProjRatio; // Offset: 528 Size: 16 [unused] // float4 CV_NearestScaled; // Offset: 544 Size: 16 [unused] // float4 CV_NearFarClipDist; // Offset: 560 Size: 16 [unused] // float4 CV_SunLightDir; // Offset: 576 Size: 16 [unused] // float4 CV_SunColor; // Offset: 592 Size: 16 [unused] // float4 CV_SkyColor; // Offset: 608 Size: 16 [unused] // float4 CV_FogColor; // Offset: 624 Size: 16 [unused] // float4 CV_TerrainInfo; // Offset: 640 Size: 16 [unused] // float4 CV_DecalZFightingRemedy; // Offset: 656 Size: 16 [unused] // row_major float4x4 CV_FrustumPlaneEquation;// Offset: 672 Size: 64 [unused] // float4 CV_WindGridOffset; // Offset: 736 Size: 16 [unused] // row_major float4x4 CV_ViewMatr; // Offset: 752 Size: 64 [unused] // row_major float4x4 CV_InvViewMatr; // Offset: 816 Size: 64 [unused] // float CV_LookingGlass_SunSelector; // Offset: 880 Size: 4 [unused] // float CV_LookingGlass_DepthScalar; // Offset: 884 Size: 4 [unused] // float CV_PADDING0; // Offset: 888 Size: 4 [unused] // float CV_PADDING1; // Offset: 892 Size: 4 [unused] // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // PER_BATCH cbuffer NA NA 0 1 // PER_INSTANCE cbuffer NA NA 1 1 // PER_MATERIAL cbuffer NA NA 3 1 // CBPerViewGlobal cbuffer NA NA 13 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyz // TEXCOORD 0 xy 1 NONE float xy // COLOR 0 xyzw 2 NONE float // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // TEXCOORD 0 xyzw 0 NONE float xyzw // TEXCOORD 1 xyzw 1 NONE float xyzw // TEXCOORD 2 xyzw 2 NONE float xyzw // TEXCOORD 3 xyzw 3 NONE float xyzw // TEXCOORD 4 xyzw 4 NONE float xyzw // TEXCOORD 5 xyzw 5 NONE float xyzw // vs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[1], immediateIndexed dcl_constantbuffer cb1[3], immediateIndexed dcl_constantbuffer cb3[46], immediateIndexed dcl_constantbuffer cb13[28], immediateIndexed dcl_input v0.xyz dcl_input v1.xy dcl_output o0.xyzw dcl_output o1.xyzw dcl_output o2.xyzw dcl_output o3.xyzw dcl_output o4.xyzw dcl_output o5.xyzw dcl_temps 3 mov r0.x, l(1.000000) mov r0.z, cb3[44].y mul r0.xyzw, r0.xxzz, v1.xyxy mul r1.x, cb13[4].z, cb3[45].z mul r1.xyzw, r1.xxxx, l(0.250000, 0.000000, 1.000000, 0.000000) mov r2.x, cb3[44].y mov r2.z, l(2.000000) mad r0.xyzw, r0.xyzw, r2.xxzz, r1.xyzw mul o0.zw, r0.zzzw, cb3[44].zzzz mov o0.xy, r0.xyxx mov o1.xyzw, l(1.000000,1.000000,0.858578682,1.000000) mov r0.xyz, v0.xyzx mov r0.w, l(1.000000) dp4 r1.z, cb1[2].xyzw, r0.xyzw add r1.w, -r1.z, cb13[27].w lt r2.x, l(0.000000), r1.w lt r2.y, r1.w, l(0.000000) mov o2.z, r1.w iadd r1.w, -r2.x, r2.y itof o2.w, r1.w dp4 r1.x, cb1[0].xyzw, r0.xyzw dp4 r1.y, cb1[1].xyzw, r0.xyzw add o2.x, -r1.x, cb13[25].w mov o4.xyz, r1.xyzx add o2.y, -r1.y, cb13[26].w mul r0.xyz, cb0[0].xyzx, cb3[31].xyzx mul o3.xyz, r0.xyzx, cb0[0].wwww mov o3.w, l(1.000000) mov o4.w, v0.z mov o5.xyzw, l(1.000000,1.000000,1.000000,1.000000) ret // Approximately 31 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] 63558936e6975f95-ps_replace.txt: [code] //Water haloing arboretum PS. // ---- Created with 3Dmigoto v1.2.67 on Sun Dec 17 23:37:38 2017 cbuffer PER_BATCH : register(b0) { float4 cFogColorDensity : packoffset(c0); float4 vfHeightDensityRampParams : packoffset(c1); float4 vfScatteringParams : packoffset(c2); float4 vfGlobalEnvProbeParams0 : packoffset(c3); float4 vfScatteringBlendParams : packoffset(c4); float4 PS_WorldViewPos : packoffset(c5); float4 vfScatteringColor : packoffset(c6); float4 vfDistributionParams : packoffset(c7); float4 vfSamplingParams : packoffset(c8); float4 vBBoxMin : packoffset(c9); float4 vfScatteringSecondaryColor : packoffset(c10); float3 vfColGradDelta : packoffset(c11); float4 vfRampParams : packoffset(c12); float4 vfColGradRadial : packoffset(c13); float4 vfGlobalEnvProbeParams1 : packoffset(c14); float4 vfSunDir : packoffset(c15); float4 vBBoxMax : packoffset(c16); float4 PS_NearFarClipDist : packoffset(c17); float4 vfColGradParams : packoffset(c18); float4 vfHeightDensityParams : packoffset(c19); float4 PS_ScreenSize : packoffset(c20); float3 CameraFrontVector : packoffset(c21); float3 vfColGradBase : packoffset(c22); float4 vfDistanceParams : packoffset(c23); float4 vfParams : packoffset(c24); float4 vfTimeParams : packoffset(c25); } cbuffer PER_INSTANCE : register(b1) { float4 SceneSelection : packoffset(c0); } cbuffer PER_MATERIAL : register(b3) { float4 MatSpecColor : packoffset(c31); float3 __0bendDetailFrequency__1bendDetailLeafAmplitude__2bendDetailBranchAmplitude__3 : packoffset(c40); float4 __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling : packoffset(c44); float3 __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3 : packoffset(c45); float4 __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul : packoffset(c47); float3 __0__1__2VertexWaveScale__3 : packoffset(c49); } cbuffer CBPerViewGlobal : register(b13) { row_major float4x4 CV_ViewProjZeroMatr : packoffset(c0); float4 CV_AnimGenParams : packoffset(c4); row_major float4x4 CV_ViewProjMatr : packoffset(c5); row_major float4x4 CV_ViewProjNearestMatr : packoffset(c9); row_major float4x4 CV_InvViewProj : packoffset(c13); row_major float4x4 CV_PrevViewProjMatr : packoffset(c17); row_major float4x4 CV_PrevViewProjNearestMatr : packoffset(c21); row_major float3x4 CV_ScreenToWorldBasis : packoffset(c25); float4 CV_TessInfo : packoffset(c28); float4 CV_CameraFrontVector : packoffset(c29); float4 CV_CameraUpVector : packoffset(c30); float4 CV_ScreenSize : packoffset(c31); float4 CV_HPosScale : packoffset(c32); float4 CV_ProjRatio : packoffset(c33); float4 CV_NearestScaled : packoffset(c34); float4 CV_NearFarClipDist : packoffset(c35); float4 CV_SunLightDir : packoffset(c36); float4 CV_SunColor : packoffset(c37); float4 CV_SkyColor : packoffset(c38); float4 CV_FogColor : packoffset(c39); float4 CV_TerrainInfo : packoffset(c40); float4 CV_DecalZFightingRemedy : packoffset(c41); row_major float4x4 CV_FrustumPlaneEquation : packoffset(c42); float4 CV_WindGridOffset : packoffset(c46); row_major float4x4 CV_ViewMatr : packoffset(c47); row_major float4x4 CV_InvViewMatr : packoffset(c51); float CV_LookingGlass_SunSelector : packoffset(c55); float CV_LookingGlass_DepthScalar : packoffset(c55.y); float CV_PADDING0 : packoffset(c55.z); float CV_PADDING1 : packoffset(c55.w); } SamplerState sceneDepthSampler_s : register(s1); SamplerState WaterNormalsSampler_s : register(s2); SamplerState ssMaterialTrilinearClamp_s : register(s4); Texture2D<float4> WaterNormalsSampler : register(t0); Texture2D<float4> sceneDepthSampler : register(t1); Texture2D<float4> WaterDynRipplesSampler : register(t2); TextureCube<float4> envCubeTex : register(t3); Texture2D<float4> refractionTex : register(t4); Texture2D<float4> sceneMaskDeviceTex : register(t26); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_Position0, float4 v1 : TEXCOORD0, float4 v2 : TEXCOORD1, float4 v3 : TEXCOORD2, float4 v4 : TEXCOORD3, float4 v5 : TEXCOORD4, float4 v6 : TEXCOORD5, out float4 o0 : SV_Target0) { float4 r0,r1,r2,r3,r4,r5,r6,r7; uint4 bitmask, uiDest; float4 fDest; float4 stereo = StereoParams.Load(0); r0.xy = (int2)v0.xy; r0.zw = float2(0,0); r0.x = sceneMaskDeviceTex.Load(r0.xyz).x; r0.x = v0.z + -r0.x; r0.y = CV_LookingGlass_DepthScalar * SceneSelection.x; r0.x = r0.y * r0.x; r0.x = cmp(r0.x < 0); if (r0.x != 0) discard; r0.xy = float2(0.5,0.5) * v1.zw; r0.z = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.y * __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.z; r0.xy = r0.xy / r0.zz; //r0.x+=stereo.x*(r0.z-stereo.y); r0.zw = float2(0.25,0.25) * v1.xy; r1.xyz = WaterNormalsSampler.Sample(WaterNormalsSampler_s, r0.zw).xyw; r1.xyz = float3(0.150000006,0.150000006,0.100000001) * r1.xyz; r0.z = dot(v3.xyz, v3.xyz); r0.z = rsqrt(r0.z); r2.xyz = v3.xyz * r0.zzz; r1.xyzw = r2.xyxy * r1.zzzz + r1.xyxy; r0.zw = v1.xy * float2(1,1) + r1.zw; r3.xyz = WaterNormalsSampler.Sample(WaterNormalsSampler_s, r0.zw).xyw; r3.xyz = float3(0.150000006,0.150000006,0.100000001) * r3.xyz; r3.xyzw = r2.xyxy * r3.zzzz + r3.xyxy; r1.xyzw = r3.xyzw + r1.xyzw; r0.zw = r1.zw * float2(0.0399999991,0.0399999991) + v6.xy; r3.xyz = WaterDynRipplesSampler.Sample(ssMaterialTrilinearClamp_s, r0.zw).xyz; r3.xyz = r3.xyz * float3(0.150000006,0.150000006,0.100000001) + float3(-0.075000003,-0.075000003,0); r3.xyz = v6.www * r3.xyz; r3.xyzw = r2.xyxy * r3.zzzz + r3.xyxy; r1.xyzw = r3.xyzw * float4(4,4,4,4) + r1.xyzw; r0.z = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.y + __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.y; r0.z = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.z * r0.z; r0.xy = r0.xy * r0.zz + r1.xy; r0.xy = WaterNormalsSampler.Sample(WaterNormalsSampler_s, r0.xy).xy; r0.xy = __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3.xx * r0.xy; r3.xyzw = v1.xyxy / __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.yyyy; r4.xyzw = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.yyyy * float4(0.25,0.25,1,1); r1.xyzw = r3.xyzw * r4.xyzw + r1.xyzw; r3.xyz = WaterNormalsSampler.Sample(WaterNormalsSampler_s, r1.xy).xyz; r1.xyz = WaterNormalsSampler.Sample(WaterNormalsSampler_s, r1.zw).xyz; r0.z = 0; r0.xyz = r3.xyz + r0.xyz; r0.xyz = r0.xyz + r1.xyz; r1.xy = WaterDynRipplesSampler.Sample(ssMaterialTrilinearClamp_s, v6.xy).xy; r1.xy = r1.xy * float2(2,2) + float2(-1,-1); r1.xy = v6.ww * r1.xy; r0.xy = r0.xy * __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3.yy + -r1.xy; r0.w = dot(r0.xyz, r0.xyz); r0.w = rsqrt(r0.w); r1.xyz = r0.xyz * r0.www + float3(-0,-0,-1); r0.xyz = r0.xyz * r0.www; r1.xyz = r1.xyz * float3(0.300000012,0.300000012,0.300000012) + float3(0,0,1); r3.xyz = PS_WorldViewPos.xyz + -v5.xyz; r0.w = dot(r3.xyz, r1.xyz); r0.w = r0.w + r0.w; r1.xyz = r1.xyz * -r0.www + r3.xyz; r0.w = dot(r1.xyz, r1.xyz); r0.w = rsqrt(r0.w); r1.xyz = r1.xyz * r0.www; r3.xyz = cmp(float3(0,0,0) < r1.xyz); r4.xyz = vBBoxMax.xyz + vBBoxMin.xyz; r5.xyz = -r4.xyz * float3(0.5,0.5,0.5) + vBBoxMax.xyz; r6.xyz = float3(0.5,0.5,0.5) * r4.xyz; r5.xyz = __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul.yyy * r5.xyz + r6.xyz; r5.xyz = -v5.xyz + r5.xyz; r5.xyz = r5.xyz / r1.xyz; r7.xyz = -r4.xyz * float3(0.5,0.5,0.5) + vBBoxMin.xyz; r6.xyz = __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul.yyy * r7.xyz + r6.xyz; r6.xyz = -v5.xyz + r6.xyz; r6.xyz = r6.xyz / r1.xyz; r3.xyz = r3.xyz ? r6.xyz : r5.xyz; r0.w = min(r3.x, r3.y); r0.w = min(r0.w, r3.z); r1.xyz = r1.xyz * r0.www + v5.xyz; r1.xyz = -r4.xyz * float3(0.5,0.5,0.5) + r1.xyz; r0.w = -MatSpecColor.w * 6 + 6; r1.xyz = envCubeTex.SampleLevel(ssMaterialTrilinearClamp_s, r1.xyz, r0.w).xyz; r1.xyz = MatSpecColor.xyz * r1.xyz; r0.w = dot(-r2.xyz, r0.xyz); r0.w = r0.w + r0.w; r3.xyz = r0.xyz * -r0.www + -r2.xyz; r0.w = saturate(dot(CV_SunLightDir.xyz, r3.xyz)); r0.w = log2(r0.w); r3.xy = MatSpecColor.ww * float2(1020,127.5); r3.xy = r3.xy * r0.ww; r3.xy = exp2(r3.xy); r3.zw = MatSpecColor.ww * float2(162.338089,20.2922611) + float2(0.318309993,0.318309993); r0.w = dot(r3.zw, r3.xy); r1.w = saturate(dot(r0.xyz, CV_SunLightDir.xyz)); r0.w = r1.w * r0.w; r3.xyz = v4.xyz * r0.www; r1.xyz = r1.xyz * __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul.www + r3.xyz; r3.xy = v2.xy / v2.ww; r0.w = sceneDepthSampler.Sample(sceneDepthSampler_s, r3.xy).x; r1.w = r0.w * PS_NearFarClipDist.y + -v2.w; r0.w = PS_NearFarClipDist.y * r0.w; r1.w = saturate(__0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.x * r1.w); r3.zw = r1.ww * r0.xy; r0.x = dot(r2.xyz, r0.xyz); r0.y = dot(r2.xyz, CameraFrontVector.xyz); r0.x = -r0.x * v3.w + 1; r2.xy = float2(0.100000001,0.100000001) * r3.zw; r2.xy = v2.zz * r2.xy; r2.zw = r2.xy * CV_HPosScale.xy + r3.xy; r2.xy = CV_HPosScale.xy * r2.xy; r0.z = sceneDepthSampler.Sample(sceneDepthSampler_s, r2.zw).x; r4.y = PS_NearFarClipDist.y * r0.z; r5.xyzw = r2.xyxy * float4(1.02499998,1.02499998,0.985000014,0.985000014) + r3.xyxy; r0.z = sceneDepthSampler.Sample(sceneDepthSampler_s, r5.zw).x; r2.z = sceneDepthSampler.Sample(sceneDepthSampler_s, r5.xy).x; r4.z = PS_NearFarClipDist.y * r0.z; r4.x = PS_NearFarClipDist.y * r2.z; r0.z = r2.z * PS_NearFarClipDist.y + -r0.w; r4.xyz = cmp(v2.www < r4.xyz); r4.xyz = r4.xyz ? float3(1,1,1) : 0; r2.zw = r4.xx * r2.xy; r2.zw = r2.zw * float2(1.02499998,1.02499998) + r3.xy; r5.x = refractionTex.Sample(ssMaterialTrilinearClamp_s, r2.zw).x; r2.zw = r4.zz * r2.xy; r2.xy = r2.xy * r4.yy + r3.xy; r2.zw = r2.zw * float2(0.985000014,0.985000014) + r3.xy; r5.z = refractionTex.Sample(ssMaterialTrilinearClamp_s, r2.zw).z; r0.z = r4.x * r0.z + r0.w; r5.y = refractionTex.Sample(ssMaterialTrilinearClamp_s, r2.xy).y; r2.xyz = r5.xyz / CV_SunLightDir.www; r2.xyz = -cFogColorDensity.xyz + r2.xyz; r0.w = dot(v3.xyz, CameraFrontVector.xyz); r0.z = r0.z + -r0.w; r0.z = max(0, r0.z); r0.z = -cFogColorDensity.w * r0.z; r0.y = r0.z / r0.y; r0.y = exp2(r0.y); r0.y = min(1, r0.y); r0.yzw = r0.yyy * r2.xyz + cFogColorDensity.xyz; r1.xyz = r1.xyz + -r0.yzw; r2.x = r0.x * r0.x; r2.x = r2.x * r2.x; r0.x = r2.x * r0.x; r0.x = saturate(r0.x * 0.949999988 + 0.0500000007); r2.x = saturate(-0.330000013 + v2.w); r1.w = r2.x * r1.w; r0.x = r1.w * r0.x; r0.xyz = r0.xxx * r1.xyz + r0.yzw; r0.w = saturate(v5.z * vfColGradParams.x + vfColGradParams.y); r1.x = 2 + -r0.w; r0.w = r1.x * r0.w; r1.xyz = r0.www * vfColGradDelta.xyz + vfColGradBase.xyz; r2.xyz = -PS_WorldViewPos.xyz + v5.xyz; r0.w = dot(r2.xyz, r2.xyz); r2.w = rsqrt(r0.w); r0.w = sqrt(r0.w); r2.xyw = r2.xyz * r2.www; r2.x = dot(r2.xyw, vfSunDir.xyz); r2.x = r2.x * -vfColGradParams.z + vfColGradParams.z; r2.x = exp2(r2.x); r2.y = saturate(vfColGradRadial.w * r0.w); r2.y = log2(r2.y); r2.y = vfColGradParams.w * r2.y; r2.y = exp2(r2.y); r2.x = r2.y * r2.x; r1.xyz = r2.xxx * vfColGradRadial.xyz + r1.xyz; r1.xyz = r1.xyz + -r0.xyz; r1.xyz = r1.www * r1.xyz + r0.xyz; r0.xyz = -r1.xyz + r0.xyz; r1.w = vfParams.x * r2.z + vfParams.z; r2.x = vfParams.x * r2.z; r1.w = 1.44269502 * r1.w; r1.w = exp2(r1.w); r1.w = -vfParams.w + r1.w; r1.w = r1.w / r2.x; r2.x = cmp(0.00999999978 < abs(r2.x)); r1.w = r2.x ? r1.w : vfParams.w; r2.x = vfParams.y * r0.w; r0.w = saturate(r0.w * vfRampParams.x + vfRampParams.y); r1.w = r2.x * r1.w; r1.w = exp2(-r1.w); r1.w = min(1, r1.w); r1.w = 1 + -r1.w; r2.x = 2 + -r0.w; r0.w = r2.x * r0.w; r0.w = r0.w * vfRampParams.z + vfRampParams.w; r0.w = -r1.w * r0.w + 1; r0.w = saturate(max(vfSunDir.w, r0.w)); r0.xyz = r0.www * r0.xyz + r1.xyz; o0.xyz = CV_SunLightDir.www * r0.xyz; o0.w = 1; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546 // // using 3Dmigoto v1.2.67 on Sun Dec 17 23:37:38 2017 // // // Buffer Definitions: // // cbuffer PER_BATCH // { // // float4 cFogColorDensity; // Offset: 0 Size: 16 // float4 vfHeightDensityRampParams; // Offset: 16 Size: 16 [unused] // float4 vfScatteringParams; // Offset: 32 Size: 16 [unused] // float4 vfGlobalEnvProbeParams0; // Offset: 48 Size: 16 [unused] // float4 vfScatteringBlendParams; // Offset: 64 Size: 16 [unused] // float4 PS_WorldViewPos; // Offset: 80 Size: 16 // float4 vfScatteringColor; // Offset: 96 Size: 16 [unused] // float4 vfDistributionParams; // Offset: 112 Size: 16 [unused] // float4 vfSamplingParams; // Offset: 128 Size: 16 [unused] // float4 vBBoxMin; // Offset: 144 Size: 16 // float4 vfScatteringSecondaryColor; // Offset: 160 Size: 16 [unused] // float3 vfColGradDelta; // Offset: 176 Size: 12 // float4 vfRampParams; // Offset: 192 Size: 16 // float4 vfColGradRadial; // Offset: 208 Size: 16 // float4 vfGlobalEnvProbeParams1; // Offset: 224 Size: 16 [unused] // float4 vfSunDir; // Offset: 240 Size: 16 // float4 vBBoxMax; // Offset: 256 Size: 16 // float4 PS_NearFarClipDist; // Offset: 272 Size: 16 // float4 vfColGradParams; // Offset: 288 Size: 16 // float4 vfHeightDensityParams; // Offset: 304 Size: 16 [unused] // float4 PS_ScreenSize; // Offset: 320 Size: 16 [unused] // float3 CameraFrontVector; // Offset: 336 Size: 12 // float3 vfColGradBase; // Offset: 352 Size: 12 // float4 vfDistanceParams; // Offset: 368 Size: 16 [unused] // float4 vfParams; // Offset: 384 Size: 16 // float4 vfTimeParams; // Offset: 400 Size: 16 [unused] // // } // // cbuffer PER_INSTANCE // { // // float4 SceneSelection; // Offset: 0 Size: 16 // // } // // cbuffer PER_MATERIAL // { // // float4 MatSpecColor; // Offset: 496 Size: 16 // float3 __0bendDetailFrequency__1bendDetailLeafAmplitude__2bendDetailBranchAmplitude__3;// Offset: 640 Size: 12 [unused] // float4 __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling;// Offset: 704 Size: 16 // float3 __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3;// Offset: 720 Size: 12 // float4 __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul;// Offset: 752 Size: 16 // float3 __0__1__2VertexWaveScale__3;// Offset: 784 Size: 12 [unused] // // } // // cbuffer CBPerViewGlobal // { // // row_major float4x4 CV_ViewProjZeroMatr;// Offset: 0 Size: 64 [unused] // float4 CV_AnimGenParams; // Offset: 64 Size: 16 [unused] // row_major float4x4 CV_ViewProjMatr;// Offset: 80 Size: 64 [unused] // row_major float4x4 CV_ViewProjNearestMatr;// Offset: 144 Size: 64 [unused] // row_major float4x4 CV_InvViewProj; // Offset: 208 Size: 64 [unused] // row_major float4x4 CV_PrevViewProjMatr;// Offset: 272 Size: 64 [unused] // row_major float4x4 CV_PrevViewProjNearestMatr;// Offset: 336 Size: 64 [unused] // row_major float3x4 CV_ScreenToWorldBasis;// Offset: 400 Size: 48 [unused] // float4 CV_TessInfo; // Offset: 448 Size: 16 [unused] // float4 CV_CameraFrontVector; // Offset: 464 Size: 16 [unused] // float4 CV_CameraUpVector; // Offset: 480 Size: 16 [unused] // float4 CV_ScreenSize; // Offset: 496 Size: 16 [unused] // float4 CV_HPosScale; // Offset: 512 Size: 16 // float4 CV_ProjRatio; // Offset: 528 Size: 16 [unused] // float4 CV_NearestScaled; // Offset: 544 Size: 16 [unused] // float4 CV_NearFarClipDist; // Offset: 560 Size: 16 [unused] // float4 CV_SunLightDir; // Offset: 576 Size: 16 // float4 CV_SunColor; // Offset: 592 Size: 16 [unused] // float4 CV_SkyColor; // Offset: 608 Size: 16 [unused] // float4 CV_FogColor; // Offset: 624 Size: 16 [unused] // float4 CV_TerrainInfo; // Offset: 640 Size: 16 [unused] // float4 CV_DecalZFightingRemedy; // Offset: 656 Size: 16 [unused] // row_major float4x4 CV_FrustumPlaneEquation;// Offset: 672 Size: 64 [unused] // float4 CV_WindGridOffset; // Offset: 736 Size: 16 [unused] // row_major float4x4 CV_ViewMatr; // Offset: 752 Size: 64 [unused] // row_major float4x4 CV_InvViewMatr; // Offset: 816 Size: 64 [unused] // float CV_LookingGlass_SunSelector; // Offset: 880 Size: 4 [unused] // float CV_LookingGlass_DepthScalar; // Offset: 884 Size: 4 // float CV_PADDING0; // Offset: 888 Size: 4 [unused] // float CV_PADDING1; // Offset: 892 Size: 4 [unused] // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // sceneDepthSampler sampler NA NA 1 1 // WaterNormalsSampler sampler NA NA 2 1 // ssMaterialTrilinearClamp sampler NA NA 4 1 // WaterNormalsSampler texture float4 2d 0 1 // sceneDepthSampler texture float4 2d 1 1 // WaterDynRipplesSampler texture float4 2d 2 1 // envCubeTex texture float4 cube 3 1 // refractionTex texture float4 2d 4 1 // sceneMaskDeviceTex texture float4 2d 26 1 // PER_BATCH cbuffer NA NA 0 1 // PER_INSTANCE cbuffer NA NA 1 1 // PER_MATERIAL cbuffer NA NA 3 1 // CBPerViewGlobal cbuffer NA NA 13 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float xyz // TEXCOORD 0 xyzw 1 NONE float xyzw // TEXCOORD 1 xyzw 2 NONE float xyzw // TEXCOORD 2 xyzw 3 NONE float xyzw // TEXCOORD 3 xyzw 4 NONE float xyz // TEXCOORD 4 xyzw 5 NONE float xyz // TEXCOORD 5 xyzw 6 NONE float xy w // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Target 0 xyzw 0 TARGET float xyzw // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[25], immediateIndexed dcl_constantbuffer cb1[1], immediateIndexed dcl_constantbuffer cb3[48], immediateIndexed dcl_constantbuffer cb13[56], immediateIndexed dcl_sampler s1, mode_default dcl_sampler s2, mode_default dcl_sampler s4, 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_texturecube (float,float,float,float) t3 dcl_resource_texture2d (float,float,float,float) t4 dcl_resource_texture2d (float,float,float,float) t26 dcl_input_ps_siv linear noperspective v0.xyz, position dcl_input_ps linear v1.xyzw dcl_input_ps linear v2.xyzw dcl_input_ps linear v3.xyzw dcl_input_ps linear v4.xyz dcl_input_ps linear v5.xyz dcl_input_ps linear v6.xyw dcl_output o0.xyzw dcl_temps 8 ftoi r0.xy, v0.xyxx mov r0.zw, l(0,0,0,0) ld_indexable(texture2d)(float,float,float,float) r0.x, r0.xyzw, t26.xyzw add r0.x, -r0.x, v0.z mul r0.y, cb1[0].x, cb13[55].y mul r0.x, r0.x, r0.y lt r0.x, r0.x, l(0.000000) discard_nz r0.x mul r0.xy, v1.zwzz, l(0.500000, 0.500000, 0.000000, 0.000000) mul r0.z, cb3[44].z, cb3[44].y div r0.xy, r0.xyxx, r0.zzzz mul r0.zw, v1.xxxy, l(0.000000, 0.000000, 0.250000, 0.250000) sample_indexable(texture2d)(float,float,float,float) r1.xyz, r0.zwzz, t0.xywz, s2 mul r1.xyz, r1.xyzx, l(0.150000, 0.150000, 0.100000, 0.000000) dp3 r0.z, v3.xyzx, v3.xyzx rsq r0.z, r0.z mul r2.xyz, r0.zzzz, v3.xyzx mad r1.xyzw, r2.xyxy, r1.zzzz, r1.xyxy mad r0.zw, v1.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000), r1.zzzw sample_indexable(texture2d)(float,float,float,float) r3.xyz, r0.zwzz, t0.xywz, s2 mul r3.xyz, r3.xyzx, l(0.150000, 0.150000, 0.100000, 0.000000) mad r3.xyzw, r2.xyxy, r3.zzzz, r3.xyxy add r1.xyzw, r1.xyzw, r3.xyzw mad r0.zw, r1.zzzw, l(0.000000, 0.000000, 0.040000, 0.040000), v6.xxxy sample_indexable(texture2d)(float,float,float,float) r3.xyz, r0.zwzz, t2.xyzw, s4 mad r3.xyz, r3.xyzx, l(0.150000, 0.150000, 0.100000, 0.000000), l(-0.075000, -0.075000, 0.000000, 0.000000) mul r3.xyz, r3.xyzx, v6.wwww mad r3.xyzw, r2.xyxy, r3.zzzz, r3.xyxy mad r1.xyzw, r3.xyzw, l(4.000000, 4.000000, 4.000000, 4.000000), r1.xyzw add r0.z, cb3[44].y, cb3[44].y mul r0.z, r0.z, cb3[44].z mad r0.xy, r0.xyxx, r0.zzzz, r1.xyxx sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t0.xyzw, s2 mul r0.xy, r0.xyxx, cb3[45].xxxx div r3.xyzw, v1.xyxy, cb3[44].yyyy mul r4.xyzw, l(0.250000, 0.250000, 1.000000, 1.000000), cb3[44].yyyy mad r1.xyzw, r3.xyzw, r4.xyzw, r1.xyzw sample_indexable(texture2d)(float,float,float,float) r3.xyz, r1.xyxx, t0.xyzw, s2 sample_indexable(texture2d)(float,float,float,float) r1.xyz, r1.zwzz, t0.xyzw, s2 mov r0.z, l(0) add r0.xyz, r0.xyzx, r3.xyzx add r0.xyz, r1.xyzx, r0.xyzx sample_indexable(texture2d)(float,float,float,float) r1.xy, v6.xyxx, t2.xyzw, s4 mad r1.xy, r1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000) mul r1.xy, r1.xyxx, v6.wwww mad r0.xy, r0.xyxx, cb3[45].yyyy, -r1.xyxx dp3 r0.w, r0.xyzx, r0.xyzx rsq r0.w, r0.w mad r1.xyz, r0.xyzx, r0.wwww, l(-0.000000, -0.000000, -1.000000, 0.000000) mul r0.xyz, r0.wwww, r0.xyzx mad r1.xyz, r1.xyzx, l(0.300000, 0.300000, 0.300000, 0.000000), l(0.000000, 0.000000, 1.000000, 0.000000) add r3.xyz, -v5.xyzx, cb0[5].xyzx dp3 r0.w, r3.xyzx, r1.xyzx add r0.w, r0.w, r0.w mad r1.xyz, r1.xyzx, -r0.wwww, r3.xyzx dp3 r0.w, r1.xyzx, r1.xyzx rsq r0.w, r0.w mul r1.xyz, r0.wwww, r1.xyzx lt r3.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r1.xyzx add r4.xyz, cb0[9].xyzx, cb0[16].xyzx mad r5.xyz, -r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), cb0[16].xyzx mul r6.xyz, r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000) mad r5.xyz, cb3[47].yyyy, r5.xyzx, r6.xyzx add r5.xyz, r5.xyzx, -v5.xyzx div r5.xyz, r5.xyzx, r1.xyzx mad r7.xyz, -r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), cb0[9].xyzx mad r6.xyz, cb3[47].yyyy, r7.xyzx, r6.xyzx add r6.xyz, r6.xyzx, -v5.xyzx div r6.xyz, r6.xyzx, r1.xyzx movc r3.xyz, r3.xyzx, r6.xyzx, r5.xyzx min r0.w, r3.y, r3.x min r0.w, r3.z, r0.w mad r1.xyz, r1.xyzx, r0.wwww, v5.xyzx mad r1.xyz, -r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), r1.xyzx mad r0.w, -cb3[31].w, l(6.000000), l(6.000000) sample_l_indexable(texturecube)(float,float,float,float) r1.xyz, r1.xyzx, t3.xyzw, s4, r0.w mul r1.xyz, r1.xyzx, cb3[31].xyzx dp3 r0.w, -r2.xyzx, r0.xyzx add r0.w, r0.w, r0.w mad r3.xyz, r0.xyzx, -r0.wwww, -r2.xyzx dp3_sat r0.w, cb13[36].xyzx, r3.xyzx log r0.w, r0.w mul r3.xy, l(1020.000000, 127.500000, 0.000000, 0.000000), cb3[31].wwww mul r3.xy, r0.wwww, r3.xyxx exp r3.xy, r3.xyxx mad r3.zw, cb3[31].wwww, l(0.000000, 0.000000, 162.338089, 20.292261), l(0.000000, 0.000000, 0.318310, 0.318310) dp2 r0.w, r3.zwzz, r3.xyxx dp3_sat r1.w, r0.xyzx, cb13[36].xyzx mul r0.w, r0.w, r1.w mul r3.xyz, r0.wwww, v4.xyzx mad r1.xyz, r1.xyzx, cb3[47].wwww, r3.xyzx div r3.xy, v2.xyxx, v2.wwww sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s1 mad r1.w, r0.w, cb0[17].y, -v2.w mul r0.w, r0.w, cb0[17].y mul_sat r1.w, r1.w, cb3[44].x mul r3.zw, r0.xxxy, r1.wwww dp3 r0.x, r2.xyzx, r0.xyzx dp3 r0.y, r2.xyzx, cb0[21].xyzx mad r0.x, -r0.x, v3.w, l(1.000000) mul r2.xy, r3.zwzz, l(0.100000, 0.100000, 0.000000, 0.000000) mul r2.xy, r2.xyxx, v2.zzzz mad r2.zw, r2.xxxy, cb13[32].xxxy, r3.xxxy mul r2.xy, r2.xyxx, cb13[32].xyxx sample_indexable(texture2d)(float,float,float,float) r0.z, r2.zwzz, t1.yzxw, s1 mul r4.y, r0.z, cb0[17].y mad r5.xyzw, r2.xyxy, l(1.025000, 1.025000, 0.985000, 0.985000), r3.xyxy sample_indexable(texture2d)(float,float,float,float) r0.z, r5.zwzz, t1.yzxw, s1 sample_indexable(texture2d)(float,float,float,float) r2.z, r5.xyxx, t1.yzxw, s1 mul r4.z, r0.z, cb0[17].y mul r4.x, r2.z, cb0[17].y mad r0.z, r2.z, cb0[17].y, -r0.w lt r4.xyz, v2.wwww, r4.xyzx and r4.xyz, r4.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0) mul r2.zw, r2.xxxy, r4.xxxx mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 1.025000, 1.025000), r3.xxxy sample_indexable(texture2d)(float,float,float,float) r5.x, r2.zwzz, t4.xyzw, s4 mul r2.zw, r2.xxxy, r4.zzzz mad r2.xy, r2.xyxx, r4.yyyy, r3.xyxx mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 0.985000, 0.985000), r3.xxxy sample_indexable(texture2d)(float,float,float,float) r5.z, r2.zwzz, t4.xyzw, s4 mad r0.z, r4.x, r0.z, r0.w sample_indexable(texture2d)(float,float,float,float) r5.y, r2.xyxx, t4.xyzw, s4 div r2.xyz, r5.xyzx, cb13[36].wwww add r2.xyz, r2.xyzx, -cb0[0].xyzx dp3 r0.w, v3.xyzx, cb0[21].xyzx add r0.z, -r0.w, r0.z max r0.z, r0.z, l(0.000000) mul r0.z, r0.z, -cb0[0].w div r0.y, r0.z, r0.y exp r0.y, r0.y min r0.y, r0.y, l(1.000000) mad r0.yzw, r0.yyyy, r2.xxyz, cb0[0].xxyz add r1.xyz, -r0.yzwy, r1.xyzx mul r2.x, r0.x, r0.x mul r2.x, r2.x, r2.x mul r0.x, r0.x, r2.x mad_sat r0.x, r0.x, l(0.950000), l(0.050000) add_sat r2.x, v2.w, l(-0.330000) mul r1.w, r1.w, r2.x mul r0.x, r0.x, r1.w mad r0.xyz, r0.xxxx, r1.xyzx, r0.yzwy mad_sat r0.w, v5.z, cb0[18].x, cb0[18].y add r1.x, -r0.w, l(2.000000) mul r0.w, r0.w, r1.x mad r1.xyz, r0.wwww, cb0[11].xyzx, cb0[22].xyzx add r2.xyz, v5.xyzx, -cb0[5].xyzx dp3 r0.w, r2.xyzx, r2.xyzx rsq r2.w, r0.w sqrt r0.w, r0.w mul r2.xyw, r2.wwww, r2.xyxz dp3 r2.x, r2.xywx, cb0[15].xyzx mad r2.x, r2.x, -cb0[18].z, cb0[18].z exp r2.x, r2.x mul_sat r2.y, r0.w, cb0[13].w log r2.y, r2.y mul r2.y, r2.y, cb0[18].w exp r2.y, r2.y mul r2.x, r2.x, r2.y mad r1.xyz, r2.xxxx, cb0[13].xyzx, r1.xyzx add r1.xyz, -r0.xyzx, r1.xyzx mad r1.xyz, r1.wwww, r1.xyzx, r0.xyzx add r0.xyz, r0.xyzx, -r1.xyzx mad r1.w, cb0[24].x, r2.z, cb0[24].z mul r2.x, r2.z, cb0[24].x mul r1.w, r1.w, l(1.442695) exp r1.w, r1.w add r1.w, r1.w, -cb0[24].w div r1.w, r1.w, r2.x lt r2.x, l(0.010000), |r2.x| movc r1.w, r2.x, r1.w, cb0[24].w mul r2.x, r0.w, cb0[24].y mad_sat r0.w, r0.w, cb0[12].x, cb0[12].y mul r1.w, r1.w, r2.x exp r1.w, -r1.w min r1.w, r1.w, l(1.000000) add r1.w, -r1.w, l(1.000000) add r2.x, -r0.w, l(2.000000) mul r0.w, r0.w, r2.x mad r0.w, r0.w, cb0[12].z, cb0[12].w mad r0.w, -r1.w, r0.w, l(1.000000) max_sat r0.w, r0.w, cb0[15].w mad r0.xyz, r0.wwww, r0.xyzx, r1.xyzx mul o0.xyz, r0.xyzx, cb13[36].wwww mov o0.w, l(1.000000) ret // Approximately 186 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] I don't know what to do about it. It doesn't even have an SV_POSITION (at least in name). And I think I tried changing all texcoords in the VS and some places in the PS, without any good result. I think this is the correct save file: https://s3.amazonaws.com/masterotaku/Prey/manual0.7z If it's correct, you are in front of a bush. Turn around and the pond should be there, free of mimics.
DHR said:@masterotaku
I test your Sun Halo in the helicopter scene and i have the same hash when i hunt, so i suppose i miss that one (and the others). I was confussing with another halo that already fixed in the helicopter. Now the mistery is solve :)

I update the fix with another ShaderRegex (Halo 3 variant) for those Halo type, so this will cover all the Halos you catch and probably others we both miss.


Great. That will take care of everything with the same pattern.

There is an issue I found in the arboretum, that maybe you saw already. There is a small fake pond (it's actually a glass screen) with a waterfall, and the pond has a double depth (haloing) problem. Even without the fix, the effect disappears after a few seconds of being near it, but the shader is so strange...

4402d3785f8a6f8e-vs_replace.txt:

//Water haloing arboretum.
// ---- Created with 3Dmigoto v1.2.67 on Sun Dec 17 23:31:39 2017

cbuffer PER_BATCH : register(b0)
{
float4 VS_SunColor : packoffset(c0);
float4 WaterRipplesLookupParams : packoffset(c1);
}

cbuffer PER_INSTANCE : register(b1)
{
row_major float3x4 ObjWorldMatrix : packoffset(c0);
}

cbuffer PER_MATERIAL : register(b3)
{
float4 MatSpecColor : packoffset(c31);
float3 __0bendDetailFrequency__1bendDetailLeafAmplitude__2bendDetailBranchAmplitude__3 : packoffset(c40);
float4 __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling : packoffset(c44);
float3 __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3 : packoffset(c45);
float4 __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul : packoffset(c47);
float3 __0__1__2VertexWaveScale__3 : packoffset(c49);
}

cbuffer CBPerViewGlobal : register(b13)
{
row_major float4x4 CV_ViewProjZeroMatr : packoffset(c0);
float4 CV_AnimGenParams : packoffset(c4);
row_major float4x4 CV_ViewProjMatr : packoffset(c5);
row_major float4x4 CV_ViewProjNearestMatr : packoffset(c9);
row_major float4x4 CV_InvViewProj : packoffset(c13);
row_major float4x4 CV_PrevViewProjMatr : packoffset(c17);
row_major float4x4 CV_PrevViewProjNearestMatr : packoffset(c21);
row_major float3x4 CV_ScreenToWorldBasis : packoffset(c25);
float4 CV_TessInfo : packoffset(c28);
float4 CV_CameraFrontVector : packoffset(c29);
float4 CV_CameraUpVector : packoffset(c30);
float4 CV_ScreenSize : packoffset(c31);
float4 CV_HPosScale : packoffset(c32);
float4 CV_ProjRatio : packoffset(c33);
float4 CV_NearestScaled : packoffset(c34);
float4 CV_NearFarClipDist : packoffset(c35);
float4 CV_SunLightDir : packoffset(c36);
float4 CV_SunColor : packoffset(c37);
float4 CV_SkyColor : packoffset(c38);
float4 CV_FogColor : packoffset(c39);
float4 CV_TerrainInfo : packoffset(c40);
float4 CV_DecalZFightingRemedy : packoffset(c41);
row_major float4x4 CV_FrustumPlaneEquation : packoffset(c42);
float4 CV_WindGridOffset : packoffset(c46);
row_major float4x4 CV_ViewMatr : packoffset(c47);
row_major float4x4 CV_InvViewMatr : packoffset(c51);
float CV_LookingGlass_SunSelector : packoffset(c55);
float CV_LookingGlass_DepthScalar : packoffset(c55.y);
float CV_PADDING0 : packoffset(c55.z);
float CV_PADDING1 : packoffset(c55.w);
}



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


void main(
float4 v0 : POSITION0,
float2 v1 : TEXCOORD0,
float4 v2 : COLOR0,
out float4 o0 : TEXCOORD0,
out float4 o1 : TEXCOORD1,
out float4 o2 : TEXCOORD2,
out float4 o3 : TEXCOORD3,
out float4 o4 : TEXCOORD4,
out float4 o5 : TEXCOORD5)
{
float4 r0,r1,r2;
uint4 bitmask, uiDest;
float4 fDest;

float4 stereo = StereoParams.Load(0);

r0.x = 1;
r0.z = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.y;
r0.xyzw = v1.xyxy * r0.xxzz;
r1.x = __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3.z * CV_AnimGenParams.z;
r1.xyzw = float4(0.25,0,1,0) * r1.xxxx;
r2.x = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.y;
r2.z = 2;
r0.xyzw = r0.xyzw * r2.xxzz + r1.xyzw;
o0.zw = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.zz * r0.zw;
o0.xy = r0.xy;
o1.xyzw = float4(1,1,0.858578682,1);
r0.xyz = v0.xyz;
r0.w = 1;
r1.z = dot(ObjWorldMatrix._m20_m21_m22_m23, r0.xyzw);
r1.w = CV_ScreenToWorldBasis._m23 + -r1.z;
r2.x = cmp(0 < r1.w);
r2.y = cmp(r1.w < 0);
o2.z = r1.w;
r1.w = (int)-r2.x + (int)r2.y;
o2.w = (int)r1.w;
r1.x = dot(ObjWorldMatrix._m00_m01_m02_m03, r0.xyzw);
r1.y = dot(ObjWorldMatrix._m10_m11_m12_m13, r0.xyzw);
o2.x = CV_ScreenToWorldBasis._m03 + -r1.x;
o4.xyz = r1.xyz;
o2.y = CV_ScreenToWorldBasis._m13 + -r1.y;
r0.xyz = MatSpecColor.xyz * VS_SunColor.xyz;
o3.xyz = VS_SunColor.www * r0.xyz;
o3.w = 1;
o4.w = v0.z;
o5.xyzw = float4(1,1,1,1);
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
// using 3Dmigoto v1.2.67 on Sun Dec 17 23:31:39 2017
//
//
// Buffer Definitions:
//
// cbuffer PER_BATCH
// {
//
// float4 VS_SunColor; // Offset: 0 Size: 16
// float4 WaterRipplesLookupParams; // Offset: 16 Size: 16 [unused]
//
// }
//
// cbuffer PER_INSTANCE
// {
//
// row_major float3x4 ObjWorldMatrix; // Offset: 0 Size: 48
//
// }
//
// cbuffer PER_MATERIAL
// {
//
// float4 MatSpecColor; // Offset: 496 Size: 16
// float3 __0bendDetailFrequency__1bendDetailLeafAmplitude__2bendDetailBranchAmplitude__3;// Offset: 640 Size: 12 [unused]
// float4 __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling;// Offset: 704 Size: 16
// float3 __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3;// Offset: 720 Size: 12
// float4 __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul;// Offset: 752 Size: 16 [unused]
// float3 __0__1__2VertexWaveScale__3;// Offset: 784 Size: 12 [unused]
//
// }
//
// cbuffer CBPerViewGlobal
// {
//
// row_major float4x4 CV_ViewProjZeroMatr;// Offset: 0 Size: 64 [unused]
// float4 CV_AnimGenParams; // Offset: 64 Size: 16
// row_major float4x4 CV_ViewProjMatr;// Offset: 80 Size: 64 [unused]
// row_major float4x4 CV_ViewProjNearestMatr;// Offset: 144 Size: 64 [unused]
// row_major float4x4 CV_InvViewProj; // Offset: 208 Size: 64 [unused]
// row_major float4x4 CV_PrevViewProjMatr;// Offset: 272 Size: 64 [unused]
// row_major float4x4 CV_PrevViewProjNearestMatr;// Offset: 336 Size: 64 [unused]
// row_major float3x4 CV_ScreenToWorldBasis;// Offset: 400 Size: 48
// float4 CV_TessInfo; // Offset: 448 Size: 16 [unused]
// float4 CV_CameraFrontVector; // Offset: 464 Size: 16 [unused]
// float4 CV_CameraUpVector; // Offset: 480 Size: 16 [unused]
// float4 CV_ScreenSize; // Offset: 496 Size: 16 [unused]
// float4 CV_HPosScale; // Offset: 512 Size: 16 [unused]
// float4 CV_ProjRatio; // Offset: 528 Size: 16 [unused]
// float4 CV_NearestScaled; // Offset: 544 Size: 16 [unused]
// float4 CV_NearFarClipDist; // Offset: 560 Size: 16 [unused]
// float4 CV_SunLightDir; // Offset: 576 Size: 16 [unused]
// float4 CV_SunColor; // Offset: 592 Size: 16 [unused]
// float4 CV_SkyColor; // Offset: 608 Size: 16 [unused]
// float4 CV_FogColor; // Offset: 624 Size: 16 [unused]
// float4 CV_TerrainInfo; // Offset: 640 Size: 16 [unused]
// float4 CV_DecalZFightingRemedy; // Offset: 656 Size: 16 [unused]
// row_major float4x4 CV_FrustumPlaneEquation;// Offset: 672 Size: 64 [unused]
// float4 CV_WindGridOffset; // Offset: 736 Size: 16 [unused]
// row_major float4x4 CV_ViewMatr; // Offset: 752 Size: 64 [unused]
// row_major float4x4 CV_InvViewMatr; // Offset: 816 Size: 64 [unused]
// float CV_LookingGlass_SunSelector; // Offset: 880 Size: 4 [unused]
// float CV_LookingGlass_DepthScalar; // Offset: 884 Size: 4 [unused]
// float CV_PADDING0; // Offset: 888 Size: 4 [unused]
// float CV_PADDING1; // Offset: 892 Size: 4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// PER_BATCH cbuffer NA NA 0 1
// PER_INSTANCE cbuffer NA NA 1 1
// PER_MATERIAL cbuffer NA NA 3 1
// CBPerViewGlobal cbuffer NA NA 13 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyz
// TEXCOORD 0 xy 1 NONE float xy
// COLOR 0 xyzw 2 NONE float
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD 0 xyzw 0 NONE float xyzw
// TEXCOORD 1 xyzw 1 NONE float xyzw
// TEXCOORD 2 xyzw 2 NONE float xyzw
// TEXCOORD 3 xyzw 3 NONE float xyzw
// TEXCOORD 4 xyzw 4 NONE float xyzw
// TEXCOORD 5 xyzw 5 NONE float xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[1], immediateIndexed
dcl_constantbuffer cb1[3], immediateIndexed
dcl_constantbuffer cb3[46], immediateIndexed
dcl_constantbuffer cb13[28], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_temps 3
mov r0.x, l(1.000000)
mov r0.z, cb3[44].y
mul r0.xyzw, r0.xxzz, v1.xyxy
mul r1.x, cb13[4].z, cb3[45].z
mul r1.xyzw, r1.xxxx, l(0.250000, 0.000000, 1.000000, 0.000000)
mov r2.x, cb3[44].y
mov r2.z, l(2.000000)
mad r0.xyzw, r0.xyzw, r2.xxzz, r1.xyzw
mul o0.zw, r0.zzzw, cb3[44].zzzz
mov o0.xy, r0.xyxx
mov o1.xyzw, l(1.000000,1.000000,0.858578682,1.000000)
mov r0.xyz, v0.xyzx
mov r0.w, l(1.000000)
dp4 r1.z, cb1[2].xyzw, r0.xyzw
add r1.w, -r1.z, cb13[27].w
lt r2.x, l(0.000000), r1.w
lt r2.y, r1.w, l(0.000000)
mov o2.z, r1.w
iadd r1.w, -r2.x, r2.y
itof o2.w, r1.w
dp4 r1.x, cb1[0].xyzw, r0.xyzw
dp4 r1.y, cb1[1].xyzw, r0.xyzw
add o2.x, -r1.x, cb13[25].w
mov o4.xyz, r1.xyzx
add o2.y, -r1.y, cb13[26].w
mul r0.xyz, cb0[0].xyzx, cb3[31].xyzx
mul o3.xyz, r0.xyzx, cb0[0].wwww
mov o3.w, l(1.000000)
mov o4.w, v0.z
mov o5.xyzw, l(1.000000,1.000000,1.000000,1.000000)
ret
// Approximately 31 instruction slots used

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



63558936e6975f95-ps_replace.txt:

//Water haloing arboretum PS.
// ---- Created with 3Dmigoto v1.2.67 on Sun Dec 17 23:37:38 2017

cbuffer PER_BATCH : register(b0)
{
float4 cFogColorDensity : packoffset(c0);
float4 vfHeightDensityRampParams : packoffset(c1);
float4 vfScatteringParams : packoffset(c2);
float4 vfGlobalEnvProbeParams0 : packoffset(c3);
float4 vfScatteringBlendParams : packoffset(c4);
float4 PS_WorldViewPos : packoffset(c5);
float4 vfScatteringColor : packoffset(c6);
float4 vfDistributionParams : packoffset(c7);
float4 vfSamplingParams : packoffset(c8);
float4 vBBoxMin : packoffset(c9);
float4 vfScatteringSecondaryColor : packoffset(c10);
float3 vfColGradDelta : packoffset(c11);
float4 vfRampParams : packoffset(c12);
float4 vfColGradRadial : packoffset(c13);
float4 vfGlobalEnvProbeParams1 : packoffset(c14);
float4 vfSunDir : packoffset(c15);
float4 vBBoxMax : packoffset(c16);
float4 PS_NearFarClipDist : packoffset(c17);
float4 vfColGradParams : packoffset(c18);
float4 vfHeightDensityParams : packoffset(c19);
float4 PS_ScreenSize : packoffset(c20);
float3 CameraFrontVector : packoffset(c21);
float3 vfColGradBase : packoffset(c22);
float4 vfDistanceParams : packoffset(c23);
float4 vfParams : packoffset(c24);
float4 vfTimeParams : packoffset(c25);
}

cbuffer PER_INSTANCE : register(b1)
{
float4 SceneSelection : packoffset(c0);
}

cbuffer PER_MATERIAL : register(b3)
{
float4 MatSpecColor : packoffset(c31);
float3 __0bendDetailFrequency__1bendDetailLeafAmplitude__2bendDetailBranchAmplitude__3 : packoffset(c40);
float4 __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling : packoffset(c44);
float3 __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3 : packoffset(c45);
float4 __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul : packoffset(c47);
float3 __0__1__2VertexWaveScale__3 : packoffset(c49);
}

cbuffer CBPerViewGlobal : register(b13)
{
row_major float4x4 CV_ViewProjZeroMatr : packoffset(c0);
float4 CV_AnimGenParams : packoffset(c4);
row_major float4x4 CV_ViewProjMatr : packoffset(c5);
row_major float4x4 CV_ViewProjNearestMatr : packoffset(c9);
row_major float4x4 CV_InvViewProj : packoffset(c13);
row_major float4x4 CV_PrevViewProjMatr : packoffset(c17);
row_major float4x4 CV_PrevViewProjNearestMatr : packoffset(c21);
row_major float3x4 CV_ScreenToWorldBasis : packoffset(c25);
float4 CV_TessInfo : packoffset(c28);
float4 CV_CameraFrontVector : packoffset(c29);
float4 CV_CameraUpVector : packoffset(c30);
float4 CV_ScreenSize : packoffset(c31);
float4 CV_HPosScale : packoffset(c32);
float4 CV_ProjRatio : packoffset(c33);
float4 CV_NearestScaled : packoffset(c34);
float4 CV_NearFarClipDist : packoffset(c35);
float4 CV_SunLightDir : packoffset(c36);
float4 CV_SunColor : packoffset(c37);
float4 CV_SkyColor : packoffset(c38);
float4 CV_FogColor : packoffset(c39);
float4 CV_TerrainInfo : packoffset(c40);
float4 CV_DecalZFightingRemedy : packoffset(c41);
row_major float4x4 CV_FrustumPlaneEquation : packoffset(c42);
float4 CV_WindGridOffset : packoffset(c46);
row_major float4x4 CV_ViewMatr : packoffset(c47);
row_major float4x4 CV_InvViewMatr : packoffset(c51);
float CV_LookingGlass_SunSelector : packoffset(c55);
float CV_LookingGlass_DepthScalar : packoffset(c55.y);
float CV_PADDING0 : packoffset(c55.z);
float CV_PADDING1 : packoffset(c55.w);
}

SamplerState sceneDepthSampler_s : register(s1);
SamplerState WaterNormalsSampler_s : register(s2);
SamplerState ssMaterialTrilinearClamp_s : register(s4);
Texture2D<float4> WaterNormalsSampler : register(t0);
Texture2D<float4> sceneDepthSampler : register(t1);
Texture2D<float4> WaterDynRipplesSampler : register(t2);
TextureCube<float4> envCubeTex : register(t3);
Texture2D<float4> refractionTex : register(t4);
Texture2D<float4> sceneMaskDeviceTex : register(t26);


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


void main(
float4 v0 : SV_Position0,
float4 v1 : TEXCOORD0,
float4 v2 : TEXCOORD1,
float4 v3 : TEXCOORD2,
float4 v4 : TEXCOORD3,
float4 v5 : TEXCOORD4,
float4 v6 : TEXCOORD5,
out float4 o0 : SV_Target0)
{
float4 r0,r1,r2,r3,r4,r5,r6,r7;
uint4 bitmask, uiDest;
float4 fDest;

float4 stereo = StereoParams.Load(0);

r0.xy = (int2)v0.xy;
r0.zw = float2(0,0);
r0.x = sceneMaskDeviceTex.Load(r0.xyz).x;
r0.x = v0.z + -r0.x;
r0.y = CV_LookingGlass_DepthScalar * SceneSelection.x;
r0.x = r0.y * r0.x;
r0.x = cmp(r0.x < 0);
if (r0.x != 0) discard;
r0.xy = float2(0.5,0.5) * v1.zw;
r0.z = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.y * __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.z;
r0.xy = r0.xy / r0.zz;

//r0.x+=stereo.x*(r0.z-stereo.y);

r0.zw = float2(0.25,0.25) * v1.xy;
r1.xyz = WaterNormalsSampler.Sample(WaterNormalsSampler_s, r0.zw).xyw;
r1.xyz = float3(0.150000006,0.150000006,0.100000001) * r1.xyz;
r0.z = dot(v3.xyz, v3.xyz);
r0.z = rsqrt(r0.z);

r2.xyz = v3.xyz * r0.zzz;
r1.xyzw = r2.xyxy * r1.zzzz + r1.xyxy;
r0.zw = v1.xy * float2(1,1) + r1.zw;
r3.xyz = WaterNormalsSampler.Sample(WaterNormalsSampler_s, r0.zw).xyw;
r3.xyz = float3(0.150000006,0.150000006,0.100000001) * r3.xyz;
r3.xyzw = r2.xyxy * r3.zzzz + r3.xyxy;
r1.xyzw = r3.xyzw + r1.xyzw;
r0.zw = r1.zw * float2(0.0399999991,0.0399999991) + v6.xy;
r3.xyz = WaterDynRipplesSampler.Sample(ssMaterialTrilinearClamp_s, r0.zw).xyz;
r3.xyz = r3.xyz * float3(0.150000006,0.150000006,0.100000001) + float3(-0.075000003,-0.075000003,0);
r3.xyz = v6.www * r3.xyz;
r3.xyzw = r2.xyxy * r3.zzzz + r3.xyxy;
r1.xyzw = r3.xyzw * float4(4,4,4,4) + r1.xyzw;
r0.z = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.y + __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.y;
r0.z = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.z * r0.z;
r0.xy = r0.xy * r0.zz + r1.xy;
r0.xy = WaterNormalsSampler.Sample(WaterNormalsSampler_s, r0.xy).xy;
r0.xy = __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3.xx * r0.xy;
r3.xyzw = v1.xyxy / __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.yyyy;
r4.xyzw = __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.yyyy * float4(0.25,0.25,1,1);
r1.xyzw = r3.xyzw * r4.xyzw + r1.xyzw;
r3.xyz = WaterNormalsSampler.Sample(WaterNormalsSampler_s, r1.xy).xyz;
r1.xyz = WaterNormalsSampler.Sample(WaterNormalsSampler_s, r1.zw).xyz;
r0.z = 0;
r0.xyz = r3.xyz + r0.xyz;
r0.xyz = r0.xyz + r1.xyz;
r1.xy = WaterDynRipplesSampler.Sample(ssMaterialTrilinearClamp_s, v6.xy).xy;
r1.xy = r1.xy * float2(2,2) + float2(-1,-1);
r1.xy = v6.ww * r1.xy;
r0.xy = r0.xy * __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3.yy + -r1.xy;
r0.w = dot(r0.xyz, r0.xyz);
r0.w = rsqrt(r0.w);
r1.xyz = r0.xyz * r0.www + float3(-0,-0,-1);
r0.xyz = r0.xyz * r0.www;
r1.xyz = r1.xyz * float3(0.300000012,0.300000012,0.300000012) + float3(0,0,1);
r3.xyz = PS_WorldViewPos.xyz + -v5.xyz;
r0.w = dot(r3.xyz, r1.xyz);
r0.w = r0.w + r0.w;
r1.xyz = r1.xyz * -r0.www + r3.xyz;
r0.w = dot(r1.xyz, r1.xyz);
r0.w = rsqrt(r0.w);
r1.xyz = r1.xyz * r0.www;
r3.xyz = cmp(float3(0,0,0) < r1.xyz);
r4.xyz = vBBoxMax.xyz + vBBoxMin.xyz;
r5.xyz = -r4.xyz * float3(0.5,0.5,0.5) + vBBoxMax.xyz;
r6.xyz = float3(0.5,0.5,0.5) * r4.xyz;
r5.xyz = __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul.yyy * r5.xyz + r6.xyz;
r5.xyz = -v5.xyz + r5.xyz;
r5.xyz = r5.xyz / r1.xyz;
r7.xyz = -r4.xyz * float3(0.5,0.5,0.5) + vBBoxMin.xyz;
r6.xyz = __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul.yyy * r7.xyz + r6.xyz;
r6.xyz = -v5.xyz + r6.xyz;
r6.xyz = r6.xyz / r1.xyz;
r3.xyz = r3.xyz ? r6.xyz : r5.xyz;
r0.w = min(r3.x, r3.y);
r0.w = min(r0.w, r3.z);
r1.xyz = r1.xyz * r0.www + v5.xyz;
r1.xyz = -r4.xyz * float3(0.5,0.5,0.5) + r1.xyz;
r0.w = -MatSpecColor.w * 6 + 6;
r1.xyz = envCubeTex.SampleLevel(ssMaterialTrilinearClamp_s, r1.xyz, r0.w).xyz;
r1.xyz = MatSpecColor.xyz * r1.xyz;
r0.w = dot(-r2.xyz, r0.xyz);
r0.w = r0.w + r0.w;
r3.xyz = r0.xyz * -r0.www + -r2.xyz;
r0.w = saturate(dot(CV_SunLightDir.xyz, r3.xyz));
r0.w = log2(r0.w);
r3.xy = MatSpecColor.ww * float2(1020,127.5);
r3.xy = r3.xy * r0.ww;
r3.xy = exp2(r3.xy);
r3.zw = MatSpecColor.ww * float2(162.338089,20.2922611) + float2(0.318309993,0.318309993);
r0.w = dot(r3.zw, r3.xy);
r1.w = saturate(dot(r0.xyz, CV_SunLightDir.xyz));
r0.w = r1.w * r0.w;
r3.xyz = v4.xyz * r0.www;
r1.xyz = r1.xyz * __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul.www + r3.xyz;
r3.xy = v2.xy / v2.ww;
r0.w = sceneDepthSampler.Sample(sceneDepthSampler_s, r3.xy).x;
r1.w = r0.w * PS_NearFarClipDist.y + -v2.w;
r0.w = PS_NearFarClipDist.y * r0.w;
r1.w = saturate(__0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling.x * r1.w);
r3.zw = r1.ww * r0.xy;
r0.x = dot(r2.xyz, r0.xyz);
r0.y = dot(r2.xyz, CameraFrontVector.xyz);
r0.x = -r0.x * v3.w + 1;
r2.xy = float2(0.100000001,0.100000001) * r3.zw;
r2.xy = v2.zz * r2.xy;
r2.zw = r2.xy * CV_HPosScale.xy + r3.xy;
r2.xy = CV_HPosScale.xy * r2.xy;
r0.z = sceneDepthSampler.Sample(sceneDepthSampler_s, r2.zw).x;
r4.y = PS_NearFarClipDist.y * r0.z;
r5.xyzw = r2.xyxy * float4(1.02499998,1.02499998,0.985000014,0.985000014) + r3.xyxy;
r0.z = sceneDepthSampler.Sample(sceneDepthSampler_s, r5.zw).x;
r2.z = sceneDepthSampler.Sample(sceneDepthSampler_s, r5.xy).x;
r4.z = PS_NearFarClipDist.y * r0.z;
r4.x = PS_NearFarClipDist.y * r2.z;
r0.z = r2.z * PS_NearFarClipDist.y + -r0.w;
r4.xyz = cmp(v2.www < r4.xyz);
r4.xyz = r4.xyz ? float3(1,1,1) : 0;
r2.zw = r4.xx * r2.xy;
r2.zw = r2.zw * float2(1.02499998,1.02499998) + r3.xy;
r5.x = refractionTex.Sample(ssMaterialTrilinearClamp_s, r2.zw).x;
r2.zw = r4.zz * r2.xy;
r2.xy = r2.xy * r4.yy + r3.xy;
r2.zw = r2.zw * float2(0.985000014,0.985000014) + r3.xy;
r5.z = refractionTex.Sample(ssMaterialTrilinearClamp_s, r2.zw).z;
r0.z = r4.x * r0.z + r0.w;
r5.y = refractionTex.Sample(ssMaterialTrilinearClamp_s, r2.xy).y;
r2.xyz = r5.xyz / CV_SunLightDir.www;
r2.xyz = -cFogColorDensity.xyz + r2.xyz;
r0.w = dot(v3.xyz, CameraFrontVector.xyz);
r0.z = r0.z + -r0.w;
r0.z = max(0, r0.z);
r0.z = -cFogColorDensity.w * r0.z;
r0.y = r0.z / r0.y;
r0.y = exp2(r0.y);
r0.y = min(1, r0.y);
r0.yzw = r0.yyy * r2.xyz + cFogColorDensity.xyz;
r1.xyz = r1.xyz + -r0.yzw;
r2.x = r0.x * r0.x;
r2.x = r2.x * r2.x;
r0.x = r2.x * r0.x;
r0.x = saturate(r0.x * 0.949999988 + 0.0500000007);
r2.x = saturate(-0.330000013 + v2.w);
r1.w = r2.x * r1.w;
r0.x = r1.w * r0.x;
r0.xyz = r0.xxx * r1.xyz + r0.yzw;
r0.w = saturate(v5.z * vfColGradParams.x + vfColGradParams.y);
r1.x = 2 + -r0.w;
r0.w = r1.x * r0.w;
r1.xyz = r0.www * vfColGradDelta.xyz + vfColGradBase.xyz;
r2.xyz = -PS_WorldViewPos.xyz + v5.xyz;
r0.w = dot(r2.xyz, r2.xyz);
r2.w = rsqrt(r0.w);
r0.w = sqrt(r0.w);
r2.xyw = r2.xyz * r2.www;
r2.x = dot(r2.xyw, vfSunDir.xyz);
r2.x = r2.x * -vfColGradParams.z + vfColGradParams.z;
r2.x = exp2(r2.x);
r2.y = saturate(vfColGradRadial.w * r0.w);
r2.y = log2(r2.y);
r2.y = vfColGradParams.w * r2.y;
r2.y = exp2(r2.y);
r2.x = r2.y * r2.x;
r1.xyz = r2.xxx * vfColGradRadial.xyz + r1.xyz;
r1.xyz = r1.xyz + -r0.xyz;
r1.xyz = r1.www * r1.xyz + r0.xyz;
r0.xyz = -r1.xyz + r0.xyz;
r1.w = vfParams.x * r2.z + vfParams.z;
r2.x = vfParams.x * r2.z;
r1.w = 1.44269502 * r1.w;
r1.w = exp2(r1.w);
r1.w = -vfParams.w + r1.w;
r1.w = r1.w / r2.x;
r2.x = cmp(0.00999999978 < abs(r2.x));
r1.w = r2.x ? r1.w : vfParams.w;
r2.x = vfParams.y * r0.w;
r0.w = saturate(r0.w * vfRampParams.x + vfRampParams.y);
r1.w = r2.x * r1.w;
r1.w = exp2(-r1.w);
r1.w = min(1, r1.w);
r1.w = 1 + -r1.w;
r2.x = 2 + -r0.w;
r0.w = r2.x * r0.w;
r0.w = r0.w * vfRampParams.z + vfRampParams.w;
r0.w = -r1.w * r0.w + 1;
r0.w = saturate(max(vfSunDir.w, r0.w));
r0.xyz = r0.www * r0.xyz + r1.xyz;
o0.xyz = CV_SunLightDir.www * r0.xyz;
o0.w = 1;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
// using 3Dmigoto v1.2.67 on Sun Dec 17 23:37:38 2017
//
//
// Buffer Definitions:
//
// cbuffer PER_BATCH
// {
//
// float4 cFogColorDensity; // Offset: 0 Size: 16
// float4 vfHeightDensityRampParams; // Offset: 16 Size: 16 [unused]
// float4 vfScatteringParams; // Offset: 32 Size: 16 [unused]
// float4 vfGlobalEnvProbeParams0; // Offset: 48 Size: 16 [unused]
// float4 vfScatteringBlendParams; // Offset: 64 Size: 16 [unused]
// float4 PS_WorldViewPos; // Offset: 80 Size: 16
// float4 vfScatteringColor; // Offset: 96 Size: 16 [unused]
// float4 vfDistributionParams; // Offset: 112 Size: 16 [unused]
// float4 vfSamplingParams; // Offset: 128 Size: 16 [unused]
// float4 vBBoxMin; // Offset: 144 Size: 16
// float4 vfScatteringSecondaryColor; // Offset: 160 Size: 16 [unused]
// float3 vfColGradDelta; // Offset: 176 Size: 12
// float4 vfRampParams; // Offset: 192 Size: 16
// float4 vfColGradRadial; // Offset: 208 Size: 16
// float4 vfGlobalEnvProbeParams1; // Offset: 224 Size: 16 [unused]
// float4 vfSunDir; // Offset: 240 Size: 16
// float4 vBBoxMax; // Offset: 256 Size: 16
// float4 PS_NearFarClipDist; // Offset: 272 Size: 16
// float4 vfColGradParams; // Offset: 288 Size: 16
// float4 vfHeightDensityParams; // Offset: 304 Size: 16 [unused]
// float4 PS_ScreenSize; // Offset: 320 Size: 16 [unused]
// float3 CameraFrontVector; // Offset: 336 Size: 12
// float3 vfColGradBase; // Offset: 352 Size: 12
// float4 vfDistanceParams; // Offset: 368 Size: 16 [unused]
// float4 vfParams; // Offset: 384 Size: 16
// float4 vfTimeParams; // Offset: 400 Size: 16 [unused]
//
// }
//
// cbuffer PER_INSTANCE
// {
//
// float4 SceneSelection; // Offset: 0 Size: 16
//
// }
//
// cbuffer PER_MATERIAL
// {
//
// float4 MatSpecColor; // Offset: 496 Size: 16
// float3 __0bendDetailFrequency__1bendDetailLeafAmplitude__2bendDetailBranchAmplitude__3;// Offset: 640 Size: 12 [unused]
// float4 __0SoftIntersectionFactor__1Tilling__2DetailTilling__3RainTilling;// Offset: 704 Size: 16
// float3 __0DetailNormalsScale__1NormalsScale__2WaterFlowSpeed__3;// Offset: 720 Size: 12
// float4 __0__1EnvCubeScale__2RealtimeReflMul__3EnvCubeReflMul;// Offset: 752 Size: 16
// float3 __0__1__2VertexWaveScale__3;// Offset: 784 Size: 12 [unused]
//
// }
//
// cbuffer CBPerViewGlobal
// {
//
// row_major float4x4 CV_ViewProjZeroMatr;// Offset: 0 Size: 64 [unused]
// float4 CV_AnimGenParams; // Offset: 64 Size: 16 [unused]
// row_major float4x4 CV_ViewProjMatr;// Offset: 80 Size: 64 [unused]
// row_major float4x4 CV_ViewProjNearestMatr;// Offset: 144 Size: 64 [unused]
// row_major float4x4 CV_InvViewProj; // Offset: 208 Size: 64 [unused]
// row_major float4x4 CV_PrevViewProjMatr;// Offset: 272 Size: 64 [unused]
// row_major float4x4 CV_PrevViewProjNearestMatr;// Offset: 336 Size: 64 [unused]
// row_major float3x4 CV_ScreenToWorldBasis;// Offset: 400 Size: 48 [unused]
// float4 CV_TessInfo; // Offset: 448 Size: 16 [unused]
// float4 CV_CameraFrontVector; // Offset: 464 Size: 16 [unused]
// float4 CV_CameraUpVector; // Offset: 480 Size: 16 [unused]
// float4 CV_ScreenSize; // Offset: 496 Size: 16 [unused]
// float4 CV_HPosScale; // Offset: 512 Size: 16
// float4 CV_ProjRatio; // Offset: 528 Size: 16 [unused]
// float4 CV_NearestScaled; // Offset: 544 Size: 16 [unused]
// float4 CV_NearFarClipDist; // Offset: 560 Size: 16 [unused]
// float4 CV_SunLightDir; // Offset: 576 Size: 16
// float4 CV_SunColor; // Offset: 592 Size: 16 [unused]
// float4 CV_SkyColor; // Offset: 608 Size: 16 [unused]
// float4 CV_FogColor; // Offset: 624 Size: 16 [unused]
// float4 CV_TerrainInfo; // Offset: 640 Size: 16 [unused]
// float4 CV_DecalZFightingRemedy; // Offset: 656 Size: 16 [unused]
// row_major float4x4 CV_FrustumPlaneEquation;// Offset: 672 Size: 64 [unused]
// float4 CV_WindGridOffset; // Offset: 736 Size: 16 [unused]
// row_major float4x4 CV_ViewMatr; // Offset: 752 Size: 64 [unused]
// row_major float4x4 CV_InvViewMatr; // Offset: 816 Size: 64 [unused]
// float CV_LookingGlass_SunSelector; // Offset: 880 Size: 4 [unused]
// float CV_LookingGlass_DepthScalar; // Offset: 884 Size: 4
// float CV_PADDING0; // Offset: 888 Size: 4 [unused]
// float CV_PADDING1; // Offset: 892 Size: 4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// sceneDepthSampler sampler NA NA 1 1
// WaterNormalsSampler sampler NA NA 2 1
// ssMaterialTrilinearClamp sampler NA NA 4 1
// WaterNormalsSampler texture float4 2d 0 1
// sceneDepthSampler texture float4 2d 1 1
// WaterDynRipplesSampler texture float4 2d 2 1
// envCubeTex texture float4 cube 3 1
// refractionTex texture float4 2d 4 1
// sceneMaskDeviceTex texture float4 2d 26 1
// PER_BATCH cbuffer NA NA 0 1
// PER_INSTANCE cbuffer NA NA 1 1
// PER_MATERIAL cbuffer NA NA 3 1
// CBPerViewGlobal cbuffer NA NA 13 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xyz
// TEXCOORD 0 xyzw 1 NONE float xyzw
// TEXCOORD 1 xyzw 2 NONE float xyzw
// TEXCOORD 2 xyzw 3 NONE float xyzw
// TEXCOORD 3 xyzw 4 NONE float xyz
// TEXCOORD 4 xyzw 5 NONE float xyz
// TEXCOORD 5 xyzw 6 NONE float xy w
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[25], immediateIndexed
dcl_constantbuffer cb1[1], immediateIndexed
dcl_constantbuffer cb3[48], immediateIndexed
dcl_constantbuffer cb13[56], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s4, 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_texturecube (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t26
dcl_input_ps_siv linear noperspective v0.xyz, position
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xyzw
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyz
dcl_input_ps linear v6.xyw
dcl_output o0.xyzw
dcl_temps 8
ftoi r0.xy, v0.xyxx
mov r0.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r0.x, r0.xyzw, t26.xyzw
add r0.x, -r0.x, v0.z
mul r0.y, cb1[0].x, cb13[55].y
mul r0.x, r0.x, r0.y
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mul r0.xy, v1.zwzz, l(0.500000, 0.500000, 0.000000, 0.000000)
mul r0.z, cb3[44].z, cb3[44].y
div r0.xy, r0.xyxx, r0.zzzz
mul r0.zw, v1.xxxy, l(0.000000, 0.000000, 0.250000, 0.250000)
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r0.zwzz, t0.xywz, s2
mul r1.xyz, r1.xyzx, l(0.150000, 0.150000, 0.100000, 0.000000)
dp3 r0.z, v3.xyzx, v3.xyzx
rsq r0.z, r0.z
mul r2.xyz, r0.zzzz, v3.xyzx
mad r1.xyzw, r2.xyxy, r1.zzzz, r1.xyxy
mad r0.zw, v1.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000), r1.zzzw
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r0.zwzz, t0.xywz, s2
mul r3.xyz, r3.xyzx, l(0.150000, 0.150000, 0.100000, 0.000000)
mad r3.xyzw, r2.xyxy, r3.zzzz, r3.xyxy
add r1.xyzw, r1.xyzw, r3.xyzw
mad r0.zw, r1.zzzw, l(0.000000, 0.000000, 0.040000, 0.040000), v6.xxxy
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r0.zwzz, t2.xyzw, s4
mad r3.xyz, r3.xyzx, l(0.150000, 0.150000, 0.100000, 0.000000), l(-0.075000, -0.075000, 0.000000, 0.000000)
mul r3.xyz, r3.xyzx, v6.wwww
mad r3.xyzw, r2.xyxy, r3.zzzz, r3.xyxy
mad r1.xyzw, r3.xyzw, l(4.000000, 4.000000, 4.000000, 4.000000), r1.xyzw
add r0.z, cb3[44].y, cb3[44].y
mul r0.z, r0.z, cb3[44].z
mad r0.xy, r0.xyxx, r0.zzzz, r1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t0.xyzw, s2
mul r0.xy, r0.xyxx, cb3[45].xxxx
div r3.xyzw, v1.xyxy, cb3[44].yyyy
mul r4.xyzw, l(0.250000, 0.250000, 1.000000, 1.000000), cb3[44].yyyy
mad r1.xyzw, r3.xyzw, r4.xyzw, r1.xyzw
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r1.xyxx, t0.xyzw, s2
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r1.zwzz, t0.xyzw, s2
mov r0.z, l(0)
add r0.xyz, r0.xyzx, r3.xyzx
add r0.xyz, r1.xyzx, r0.xyzx
sample_indexable(texture2d)(float,float,float,float) r1.xy, v6.xyxx, t2.xyzw, s4
mad r1.xy, r1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r1.xy, r1.xyxx, v6.wwww
mad r0.xy, r0.xyxx, cb3[45].yyyy, -r1.xyxx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mad r1.xyz, r0.xyzx, r0.wwww, l(-0.000000, -0.000000, -1.000000, 0.000000)
mul r0.xyz, r0.wwww, r0.xyzx
mad r1.xyz, r1.xyzx, l(0.300000, 0.300000, 0.300000, 0.000000), l(0.000000, 0.000000, 1.000000, 0.000000)
add r3.xyz, -v5.xyzx, cb0[5].xyzx
dp3 r0.w, r3.xyzx, r1.xyzx
add r0.w, r0.w, r0.w
mad r1.xyz, r1.xyzx, -r0.wwww, r3.xyzx
dp3 r0.w, r1.xyzx, r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, r1.xyzx
lt r3.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r1.xyzx
add r4.xyz, cb0[9].xyzx, cb0[16].xyzx
mad r5.xyz, -r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), cb0[16].xyzx
mul r6.xyz, r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
mad r5.xyz, cb3[47].yyyy, r5.xyzx, r6.xyzx
add r5.xyz, r5.xyzx, -v5.xyzx
div r5.xyz, r5.xyzx, r1.xyzx
mad r7.xyz, -r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), cb0[9].xyzx
mad r6.xyz, cb3[47].yyyy, r7.xyzx, r6.xyzx
add r6.xyz, r6.xyzx, -v5.xyzx
div r6.xyz, r6.xyzx, r1.xyzx
movc r3.xyz, r3.xyzx, r6.xyzx, r5.xyzx
min r0.w, r3.y, r3.x
min r0.w, r3.z, r0.w
mad r1.xyz, r1.xyzx, r0.wwww, v5.xyzx
mad r1.xyz, -r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), r1.xyzx
mad r0.w, -cb3[31].w, l(6.000000), l(6.000000)
sample_l_indexable(texturecube)(float,float,float,float) r1.xyz, r1.xyzx, t3.xyzw, s4, r0.w
mul r1.xyz, r1.xyzx, cb3[31].xyzx
dp3 r0.w, -r2.xyzx, r0.xyzx
add r0.w, r0.w, r0.w
mad r3.xyz, r0.xyzx, -r0.wwww, -r2.xyzx
dp3_sat r0.w, cb13[36].xyzx, r3.xyzx
log r0.w, r0.w
mul r3.xy, l(1020.000000, 127.500000, 0.000000, 0.000000), cb3[31].wwww
mul r3.xy, r0.wwww, r3.xyxx
exp r3.xy, r3.xyxx
mad r3.zw, cb3[31].wwww, l(0.000000, 0.000000, 162.338089, 20.292261), l(0.000000, 0.000000, 0.318310, 0.318310)
dp2 r0.w, r3.zwzz, r3.xyxx
dp3_sat r1.w, r0.xyzx, cb13[36].xyzx
mul r0.w, r0.w, r1.w
mul r3.xyz, r0.wwww, v4.xyzx
mad r1.xyz, r1.xyzx, cb3[47].wwww, r3.xyzx
div r3.xy, v2.xyxx, v2.wwww
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s1
mad r1.w, r0.w, cb0[17].y, -v2.w
mul r0.w, r0.w, cb0[17].y
mul_sat r1.w, r1.w, cb3[44].x
mul r3.zw, r0.xxxy, r1.wwww
dp3 r0.x, r2.xyzx, r0.xyzx
dp3 r0.y, r2.xyzx, cb0[21].xyzx
mad r0.x, -r0.x, v3.w, l(1.000000)
mul r2.xy, r3.zwzz, l(0.100000, 0.100000, 0.000000, 0.000000)
mul r2.xy, r2.xyxx, v2.zzzz
mad r2.zw, r2.xxxy, cb13[32].xxxy, r3.xxxy
mul r2.xy, r2.xyxx, cb13[32].xyxx
sample_indexable(texture2d)(float,float,float,float) r0.z, r2.zwzz, t1.yzxw, s1
mul r4.y, r0.z, cb0[17].y
mad r5.xyzw, r2.xyxy, l(1.025000, 1.025000, 0.985000, 0.985000), r3.xyxy
sample_indexable(texture2d)(float,float,float,float) r0.z, r5.zwzz, t1.yzxw, s1
sample_indexable(texture2d)(float,float,float,float) r2.z, r5.xyxx, t1.yzxw, s1
mul r4.z, r0.z, cb0[17].y
mul r4.x, r2.z, cb0[17].y
mad r0.z, r2.z, cb0[17].y, -r0.w
lt r4.xyz, v2.wwww, r4.xyzx
and r4.xyz, r4.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
mul r2.zw, r2.xxxy, r4.xxxx
mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 1.025000, 1.025000), r3.xxxy
sample_indexable(texture2d)(float,float,float,float) r5.x, r2.zwzz, t4.xyzw, s4
mul r2.zw, r2.xxxy, r4.zzzz
mad r2.xy, r2.xyxx, r4.yyyy, r3.xyxx
mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 0.985000, 0.985000), r3.xxxy
sample_indexable(texture2d)(float,float,float,float) r5.z, r2.zwzz, t4.xyzw, s4
mad r0.z, r4.x, r0.z, r0.w
sample_indexable(texture2d)(float,float,float,float) r5.y, r2.xyxx, t4.xyzw, s4
div r2.xyz, r5.xyzx, cb13[36].wwww
add r2.xyz, r2.xyzx, -cb0[0].xyzx
dp3 r0.w, v3.xyzx, cb0[21].xyzx
add r0.z, -r0.w, r0.z
max r0.z, r0.z, l(0.000000)
mul r0.z, r0.z, -cb0[0].w
div r0.y, r0.z, r0.y
exp r0.y, r0.y
min r0.y, r0.y, l(1.000000)
mad r0.yzw, r0.yyyy, r2.xxyz, cb0[0].xxyz
add r1.xyz, -r0.yzwy, r1.xyzx
mul r2.x, r0.x, r0.x
mul r2.x, r2.x, r2.x
mul r0.x, r0.x, r2.x
mad_sat r0.x, r0.x, l(0.950000), l(0.050000)
add_sat r2.x, v2.w, l(-0.330000)
mul r1.w, r1.w, r2.x
mul r0.x, r0.x, r1.w
mad r0.xyz, r0.xxxx, r1.xyzx, r0.yzwy
mad_sat r0.w, v5.z, cb0[18].x, cb0[18].y
add r1.x, -r0.w, l(2.000000)
mul r0.w, r0.w, r1.x
mad r1.xyz, r0.wwww, cb0[11].xyzx, cb0[22].xyzx
add r2.xyz, v5.xyzx, -cb0[5].xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r2.w, r0.w
sqrt r0.w, r0.w
mul r2.xyw, r2.wwww, r2.xyxz
dp3 r2.x, r2.xywx, cb0[15].xyzx
mad r2.x, r2.x, -cb0[18].z, cb0[18].z
exp r2.x, r2.x
mul_sat r2.y, r0.w, cb0[13].w
log r2.y, r2.y
mul r2.y, r2.y, cb0[18].w
exp r2.y, r2.y
mul r2.x, r2.x, r2.y
mad r1.xyz, r2.xxxx, cb0[13].xyzx, r1.xyzx
add r1.xyz, -r0.xyzx, r1.xyzx
mad r1.xyz, r1.wwww, r1.xyzx, r0.xyzx
add r0.xyz, r0.xyzx, -r1.xyzx
mad r1.w, cb0[24].x, r2.z, cb0[24].z
mul r2.x, r2.z, cb0[24].x
mul r1.w, r1.w, l(1.442695)
exp r1.w, r1.w
add r1.w, r1.w, -cb0[24].w
div r1.w, r1.w, r2.x
lt r2.x, l(0.010000), |r2.x|
movc r1.w, r2.x, r1.w, cb0[24].w
mul r2.x, r0.w, cb0[24].y
mad_sat r0.w, r0.w, cb0[12].x, cb0[12].y
mul r1.w, r1.w, r2.x
exp r1.w, -r1.w
min r1.w, r1.w, l(1.000000)
add r1.w, -r1.w, l(1.000000)
add r2.x, -r0.w, l(2.000000)
mul r0.w, r0.w, r2.x
mad r0.w, r0.w, cb0[12].z, cb0[12].w
mad r0.w, -r1.w, r0.w, l(1.000000)
max_sat r0.w, r0.w, cb0[15].w
mad r0.xyz, r0.wwww, r0.xyzx, r1.xyzx
mul o0.xyz, r0.xyzx, cb13[36].wwww
mov o0.w, l(1.000000)
ret
// Approximately 186 instruction slots used

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



I don't know what to do about it. It doesn't even have an SV_POSITION (at least in name). And I think I tried changing all texcoords in the VS and some places in the PS, without any good result.

I think this is the correct save file: https://s3.amazonaws.com/masterotaku/Prey/manual0.7z

If it's correct, you are in front of a bush. Turn around and the pond should be there, free of mimics.

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

Posted 12/18/2017 11:28 PM   
Hey, thank you. Cool fix. But I some weird blurry effect of some objects like the heli on the picture. Am I doing something wrong? [img]https://forums.geforce.com/cmd/default/download-comment-attachment/74223/[/img]
Hey, thank you. Cool fix. But I some weird blurry effect of some objects like the heli on the picture. Am I doing something wrong?

Image
Attachments

Prey001_050.jps

Intel Core i7-3820, 4 X 3,60 GHz overclocked to 4,50 GHz ; EVGA Titan X 12VRAM ; 16 GB Corsair Vengeance DDR-1600 (4x 4 GB) ; Asus VG278H 27-inch incl. 3D vision 2 glasses, integrated transmitter ; Xbox One Elite wireless controller ; Windows 10HTC VIVE 2,5 m2 roomscale3D VISION GAMERS - VISIT ME ON STEAM and feel free to add me: http://steamcommunity.com/profiles/76561198064106555 YOUTUBE: https://www.youtube.com/channel/UC1UE5TPoF0HX0HVpF_E4uPQ STEAM CURATOR: https://store.steampowered.com/curator/33611530-Streaming-Deluxe/ Image

Posted 12/18/2017 11:35 PM   
@mrorange55 You have to use FXAA...SMAA is broken. @masterotaku you need to hunt a DS....i already fix one of those in arboretum. you can use the same fix....is the common halo fix, but in asm. @chtiblue I'm stuck with one pattern lights in Mafia 3. I eventually will finish the fix, but i don't know when.
@mrorange55
You have to use FXAA...SMAA is broken.

@masterotaku
you need to hunt a DS....i already fix one of those in arboretum. you can use the same fix....is the common halo fix, but in asm.


@chtiblue
I'm stuck with one pattern lights in Mafia 3. I eventually will finish the fix, but i don't know when.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 12/18/2017 11:55 PM   
@masterotaku Just add the DS remaining....depending on the distance and angle, switch to one or the other.
@masterotaku
Just add the DS remaining....depending on the distance and angle, switch to one or the other.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 12/19/2017 12:33 AM   
I have the same effects blurred figures, helicopters, doors, weapons, but I use FXAA again thanks for fix
I have the same effects blurred figures, helicopters, doors, weapons, but I use FXAA again thanks for fix

Posted 12/19/2017 08:44 AM   
[quote="walter14"]I have the same effects blurred figures, helicopters, doors, weapons, but I use FXAA again thanks for fix[/quote] Try the Very High settings with FXAA. For me it seemed off when using High, but might have been a different problem. I was having trouble with shadows in one eye, and updated to latest driver 388.59 from 385.69 and that fixed everything. Could also have been profile being broken somehow from using the Demo. Looks spectacular. Thanks DHR. It's a love letter to Bioshock. The type of thing that is vastly superior in 3D: [img]https://forums.geforce.com/cmd/default/download-comment-attachment/74224/[/img]
walter14 said:I have the same effects blurred figures, helicopters, doors, weapons, but I use FXAA again thanks for fix

Try the Very High settings with FXAA. For me it seemed off when using High, but might have been a different problem.

I was having trouble with shadows in one eye, and updated to latest driver 388.59 from 385.69 and that fixed everything. Could also have been profile being broken somehow from using the Demo.

Looks spectacular. Thanks DHR. It's a love letter to Bioshock.


The type of thing that is vastly superior in 3D:

Image
Attachments

Prey009_085.jps

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

Posted 12/19/2017 10:07 AM   
The blurry effect, exactly the one in the screenshot, is produced when using SMAA. Changing to FXAA or No AA fix it. Also try to use the Preset in the normal tab (HIGH or VERY HIGH) and then go to the advanced tab and change to FXAA. If you try manually any combination of settings in the advanced tab, may broke something. Agree...Amazing game!!
The blurry effect, exactly the one in the screenshot, is produced when using SMAA. Changing to FXAA or No AA fix it. Also try to use the Preset in the normal tab (HIGH or VERY HIGH) and then go to the advanced tab and change to FXAA. If you try manually any combination of settings in the advanced tab, may broke something.

Agree...Amazing game!!

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 12/19/2017 11:12 AM   
[quote="DHR"]@masterotaku Just add the DS remaining....depending on the distance and angle, switch to one or the other.[/quote] Thank you. Sometimes I forget about the existence of shaders other than VS/PS/CS. I'll check the effect when I'm home. And another thing: there is an imperfect (but not bad) effect in gravity elevators. It's a wave effect that doesn't have a haloing problem or anything like that, but the distortion is a bit different in each eye. Even at 0 convergence. At screen depth it's OK, I think. I don't know if it's fixable (maybe you tried before). Trying stuff in the VS did little effect. The arboretum is an fps killer :p. I get as low as 22-30fps at 1440p (GPU limited) and around 45fps at 720p (CPU limited).
DHR said:@masterotaku
Just add the DS remaining....depending on the distance and angle, switch to one or the other.


Thank you. Sometimes I forget about the existence of shaders other than VS/PS/CS. I'll check the effect when I'm home.

And another thing: there is an imperfect (but not bad) effect in gravity elevators. It's a wave effect that doesn't have a haloing problem or anything like that, but the distortion is a bit different in each eye. Even at 0 convergence. At screen depth it's OK, I think. I don't know if it's fixable (maybe you tried before). Trying stuff in the VS did little effect.

The arboretum is an fps killer :p. I get as low as 22-30fps at 1440p (GPU limited) and around 45fps at 720p (CPU limited).

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

Posted 12/19/2017 11:17 AM   
That wave effect is very strange, because don't have a halo issue and also is at the correct position in 3D, is like the distortion only effect is render different in each eye, but in 3D....kind of out of sync for each eye. I try correct that, but the shaders don't help to much.....maybe doing an TextureOveride to force stereo. Since is not big deal, i left like that.
That wave effect is very strange, because don't have a halo issue and also is at the correct position in 3D, is like the distortion only effect is render different in each eye, but in 3D....kind of out of sync for each eye. I try correct that, but the shaders don't help to much.....maybe doing an TextureOveride to force stereo. Since is not big deal, i left like that.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 12/19/2017 12:40 PM   
unfortunately not helped I tried everything reinstalled drivers
unfortunately not helped I tried everything reinstalled drivers

Posted 12/19/2017 01:16 PM   
@walter14 If you have that blurry stuff like in the helicopter screenshots: [img]https://forums.geforce.com/cmd/default/download-comment-attachment/74223/[/img] or this one (in the chest): [img]https://forums.geforce.com/cmd/default/download-comment-attachment/74200/[/img] I'm [b]200% SURE[/b] that is the SMAA...that issue is replicable. Be sure you are using FXAA or NO AA.
@walter14
If you have that blurry stuff like in the helicopter screenshots:
Image

or this one (in the chest):
Image


I'm 200% SURE that is the SMAA...that issue is replicable. Be sure you are using FXAA or NO AA.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 12/19/2017 04:11 PM   
Okay, I try some settings and report back. I had FXAA. But try to change them as you said. I also have the lastest driver.
Okay, I try some settings and report back. I had FXAA. But try to change them as you said. I also have the lastest driver.

Intel Core i7-3820, 4 X 3,60 GHz overclocked to 4,50 GHz ; EVGA Titan X 12VRAM ; 16 GB Corsair Vengeance DDR-1600 (4x 4 GB) ; Asus VG278H 27-inch incl. 3D vision 2 glasses, integrated transmitter ; Xbox One Elite wireless controller ; Windows 10HTC VIVE 2,5 m2 roomscale3D VISION GAMERS - VISIT ME ON STEAM and feel free to add me: http://steamcommunity.com/profiles/76561198064106555 YOUTUBE: https://www.youtube.com/channel/UC1UE5TPoF0HX0HVpF_E4uPQ STEAM CURATOR: https://store.steampowered.com/curator/33611530-Streaming-Deluxe/ Image

Posted 12/19/2017 04:58 PM   
I have tried everything new drivers, FXAA.much that is the fix I use Prey 2017
I have tried everything new drivers, FXAA.much that is the fix I use Prey 2017

Posted 12/19/2017 05:43 PM   
  12 / 17    
Scroll To Top