Bo3b's School For Shaderhackers
  83 / 88    
This is what I meant (some explanations inside as comments): [code] //HUD Icons // ---- Created with 3Dmigoto v1.3.11 on Mon Aug 06 17:59:58 2018 // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyz 0 NONE float xyz // NORMAL 0 xyz 1 NONE float xyz // COLOR 0 xyzw 2 NONE float // TEXCOORD 0 xy 3 NONE float xy // SV_VertexID 0 x 4 VERTID uint // SV_InstanceID 0 x 5 INSTID uint x // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float xyzw // 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 xyzw // TEXCOORD 4 xyzw 5 NONE float xyzw // InstanceID 0 x 6 NONE uint x // vs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb2[23], immediateIndexed dcl_constantbuffer cb9[1], immediateIndexed dcl_resource_buffer (float,float,float,float) t19 dcl_resource_structured t53, 4 dcl_input v0.xyz dcl_input v1.xyz dcl_input v3.xy dcl_input_sgv v5.x, instance_id dcl_output_siv o0.xyzw, position dcl_output o1.xyzw dcl_output o2.xyzw dcl_output o3.xyzw dcl_output o4.xyzw dcl_output o5.xyzw dcl_output o6.x //insert dcl_temps 28 // 3DMigoto StereoParams: dcl_resource_texture1d (float,float,float,float) t120 dcl_resource_texture2d (float,float,float,float) t125 ld_indexable(texture1d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t120.xyzw ld_indexable(texture1d)(float,float,float,float) r26.z, l(2, 0, 0, 0), t120.xyzw ld_indexable(texture2d)(float,float,float,float) r27.xyzw, l(0, 0, 0, 0), t125.xyzw iadd r0.x, v5.x, cb9[0].x ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.x, r0.x, l(0), t53.xxxx ishl r0.y, r0.x, l(3) mov o6.x, r0.x ushr r0.x, r0.y, l(2) iadd r0.x, r0.x, cb9[0].y ld_indexable(buffer)(float,float,float,float) r0.x, r0.xxxx, t19.yxzw iadd r0.yzw, r0.xxxx, l(0, 1, 2, 3) ld_indexable(buffer)(float,float,float,float) r1.xyzw, r0.xxxx, t19.xyzw ld_indexable(buffer)(float,float,float,float) r2.xyzw, r0.wwww, t19.xyzw mov r3.w, r2.w mov r4.x, r1.w ld_indexable(buffer)(float,float,float,float) r5.xyzw, r0.yyyy, t19.xyzw ld_indexable(buffer)(float,float,float,float) r0.xyzw, r0.zzzz, t19.xyzw mov r4.y, r5.w mov r4.z, r0.w add r3.xyz, r4.xyzx, -cb2[22].xyzx dp4 r4.w, r3.xyzw, cb2[18].xyzw mov r6.w, r2.x mov r6.y, r5.x mov r6.z, r0.x mov r6.x, r1.x dp4 r4.x, r6.xyzw, cb2[18].xyzw mov r7.w, r2.y mov r7.y, r5.y mov r7.z, r0.y mov r7.x, r1.y dp4 r4.y, r7.xyzw, cb2[18].xyzw mov r8.w, r2.z mov r8.y, r5.z mov r8.z, r0.z mov r8.x, r1.z dp4 r4.z, r8.xyzw, cb2[18].xyzw mov r9.xyz, v0.xyzx mov r9.w, l(1.000000) //fix Hud Depth //mul r9.xyzw, r9.xyzw, r26.z //Here I start using a register instead of o0 to save its results. //dp4 o0.x, r9.xyzw, r4.xyzw dp4 r24.x, r9.xyzw, r4.xyzw dp4 r4.w, r3.xyzw, cb2[19].xyzw dp4 r4.x, r6.xyzw, cb2[19].xyzw dp4 r4.y, r7.xyzw, cb2[19].xyzw dp4 r4.z, r8.xyzw, cb2[19].xyzw //dp4 o0.y, r9.xyzw, r4.xyzw dp4 r24.y, r9.xyzw, r4.xyzw dp4 r4.w, r3.xyzw, cb2[20].xyzw dp4 r3.w, r3.xyzw, cb2[21].xyzw dp4 r4.x, r6.xyzw, cb2[20].xyzw dp4 r3.x, r6.xyzw, cb2[21].xyzw dp4 r4.y, r7.xyzw, cb2[20].xyzw dp4 r3.y, r7.xyzw, cb2[21].xyzw dp4 r4.z, r8.xyzw, cb2[20].xyzw dp4 r3.z, r8.xyzw, cb2[21].xyzw //dp4 o0.w, r9.xyzw, r3.xyzw dp4 r24.w, r9.xyzw, r3.xyzw //dp4 o0.z, r9.xyzw, r4.xyzw dp4 r24.z, r9.xyzw, r4.xyzw //w position minus convergence. add r27.w, r24.w, -r27.y //The previous calculation is multiplied by separation and then substracted from the x axis. mad r24.x, r27.x, -r27.w, r24.x //If 25.x is what you use as a depth multiplier. mad r24.x, r27.x, r25.x, r24.x //Copying r24 to o0 as a last step. mov o0.xyzw, r24.xyzw mov o1.xy, v3.xyxx mov o1.zw, l(0,0,0,0) dp4 o2.w, r9.xyzw, r2.xyzw dp4 o2.y, r9.xyzw, r5.xyzw dp4 o2.z, r9.xyzw, r0.xyzw dp4 o2.x, r9.xyzw, r1.xyzw mov o3.y, r7.y mov o3.z, r0.y mov o3.x, r1.y mov o3.w, l(0) mov o4.y, r5.x dp3 o5.y, v1.xyzx, r5.xyzx mov o4.z, r0.x dp3 o5.z, v1.xyzx, r0.xyzx mov o4.x, r6.x dp3 o5.x, v1.xyzx, r1.xyzx mov o4.w, l(0) mov o5.w, l(0) ret [/code] I am unstereoizing the X axis of o0 (saved first into a temporary register) and then using (optionally) an iniparam from r25.x to add its depth, assuming its value is between 0 and 1. You can't read from an output register, as we said before, so you can't use o0 for any operation except as a result of them.
This is what I meant (some explanations inside as comments):

//HUD Icons
// ---- Created with 3Dmigoto v1.3.11 on Mon Aug 06 17:59:58 2018
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyz 0 NONE float xyz
// NORMAL 0 xyz 1 NONE float xyz
// COLOR 0 xyzw 2 NONE float
// TEXCOORD 0 xy 3 NONE float xy
// SV_VertexID 0 x 4 VERTID uint
// SV_InstanceID 0 x 5 INSTID uint x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xyzw
// 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 xyzw
// TEXCOORD 4 xyzw 5 NONE float xyzw
// InstanceID 0 x 6 NONE uint x
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb2[23], immediateIndexed
dcl_constantbuffer cb9[1], immediateIndexed
dcl_resource_buffer (float,float,float,float) t19
dcl_resource_structured t53, 4
dcl_input v0.xyz
dcl_input v1.xyz
dcl_input v3.xy
dcl_input_sgv v5.x, instance_id
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.x

//insert
dcl_temps 28
// 3DMigoto StereoParams:
dcl_resource_texture1d (float,float,float,float) t120
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture1d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t120.xyzw
ld_indexable(texture1d)(float,float,float,float) r26.z, l(2, 0, 0, 0), t120.xyzw
ld_indexable(texture2d)(float,float,float,float) r27.xyzw, l(0, 0, 0, 0), t125.xyzw


iadd r0.x, v5.x, cb9[0].x
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.x, r0.x, l(0), t53.xxxx
ishl r0.y, r0.x, l(3)
mov o6.x, r0.x
ushr r0.x, r0.y, l(2)
iadd r0.x, r0.x, cb9[0].y
ld_indexable(buffer)(float,float,float,float) r0.x, r0.xxxx, t19.yxzw
iadd r0.yzw, r0.xxxx, l(0, 1, 2, 3)
ld_indexable(buffer)(float,float,float,float) r1.xyzw, r0.xxxx, t19.xyzw
ld_indexable(buffer)(float,float,float,float) r2.xyzw, r0.wwww, t19.xyzw
mov r3.w, r2.w
mov r4.x, r1.w
ld_indexable(buffer)(float,float,float,float) r5.xyzw, r0.yyyy, t19.xyzw
ld_indexable(buffer)(float,float,float,float) r0.xyzw, r0.zzzz, t19.xyzw
mov r4.y, r5.w
mov r4.z, r0.w
add r3.xyz, r4.xyzx, -cb2[22].xyzx
dp4 r4.w, r3.xyzw, cb2[18].xyzw
mov r6.w, r2.x
mov r6.y, r5.x
mov r6.z, r0.x
mov r6.x, r1.x
dp4 r4.x, r6.xyzw, cb2[18].xyzw
mov r7.w, r2.y
mov r7.y, r5.y
mov r7.z, r0.y
mov r7.x, r1.y
dp4 r4.y, r7.xyzw, cb2[18].xyzw
mov r8.w, r2.z
mov r8.y, r5.z
mov r8.z, r0.z
mov r8.x, r1.z
dp4 r4.z, r8.xyzw, cb2[18].xyzw
mov r9.xyz, v0.xyzx
mov r9.w, l(1.000000)


//fix Hud Depth
//mul r9.xyzw, r9.xyzw, r26.z

//Here I start using a register instead of o0 to save its results.
//dp4 o0.x, r9.xyzw, r4.xyzw
dp4 r24.x, r9.xyzw, r4.xyzw

dp4 r4.w, r3.xyzw, cb2[19].xyzw
dp4 r4.x, r6.xyzw, cb2[19].xyzw
dp4 r4.y, r7.xyzw, cb2[19].xyzw
dp4 r4.z, r8.xyzw, cb2[19].xyzw

//dp4 o0.y, r9.xyzw, r4.xyzw
dp4 r24.y, r9.xyzw, r4.xyzw

dp4 r4.w, r3.xyzw, cb2[20].xyzw
dp4 r3.w, r3.xyzw, cb2[21].xyzw
dp4 r4.x, r6.xyzw, cb2[20].xyzw
dp4 r3.x, r6.xyzw, cb2[21].xyzw
dp4 r4.y, r7.xyzw, cb2[20].xyzw
dp4 r3.y, r7.xyzw, cb2[21].xyzw
dp4 r4.z, r8.xyzw, cb2[20].xyzw
dp4 r3.z, r8.xyzw, cb2[21].xyzw

//dp4 o0.w, r9.xyzw, r3.xyzw
dp4 r24.w, r9.xyzw, r3.xyzw
//dp4 o0.z, r9.xyzw, r4.xyzw
dp4 r24.z, r9.xyzw, r4.xyzw

//w position minus convergence.
add r27.w, r24.w, -r27.y

//The previous calculation is multiplied by separation and then substracted from the x axis.
mad r24.x, r27.x, -r27.w, r24.x

//If 25.x is what you use as a depth multiplier.
mad r24.x, r27.x, r25.x, r24.x

//Copying r24 to o0 as a last step.
mov o0.xyzw, r24.xyzw

mov o1.xy, v3.xyxx
mov o1.zw, l(0,0,0,0)
dp4 o2.w, r9.xyzw, r2.xyzw
dp4 o2.y, r9.xyzw, r5.xyzw
dp4 o2.z, r9.xyzw, r0.xyzw
dp4 o2.x, r9.xyzw, r1.xyzw
mov o3.y, r7.y
mov o3.z, r0.y
mov o3.x, r1.y
mov o3.w, l(0)
mov o4.y, r5.x
dp3 o5.y, v1.xyzx, r5.xyzx
mov o4.z, r0.x
dp3 o5.z, v1.xyzx, r0.xyzx
mov o4.x, r6.x
dp3 o5.x, v1.xyzx, r1.xyzx
mov o4.w, l(0)
mov o5.w, l(0)
ret


I am unstereoizing the X axis of o0 (saved first into a temporary register) and then using (optionally) an iniparam from r25.x to add its depth, assuming its value is between 0 and 1.

You can't read from an output register, as we said before, so you can't use o0 for any operation except as a result of them.

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 08/09/2018 06:37 PM   
Wooow this is realy working !!! ill have a look into detail to understand it tomorrow. Now i need to fix the issue that one of the hud shader element is mor into depth than the other.... May be i have to modify another output shader annyway THX A LOT !!!!!!!!!!!!!!! This will help me in further projects ^^ NOW i understand what you mean with saving o0 :-) just doo the operation that is done with o0 and save it to another register....ok easy ... after understanding ^^ THY !!!
Wooow this is realy working !!! ill have a look into detail to understand it tomorrow.

Now i need to fix the issue that one of the hud shader element is mor into depth than the other....

May be i have to modify another output shader

annyway THX A LOT !!!!!!!!!!!!!!!


This will help me in further projects ^^ NOW i understand what you mean with saving o0 :-) just doo the operation that is done with o0 and save it to another register....ok easy ... after understanding ^^

THY !!!

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

Posted 08/09/2018 06:54 PM   
I am not sure if beginner questions belong in this thread, but here goes.. Trying to fix the skybox in Madden 19, I was able to combine the Frostbite universal fix with a more recent version of d3d11.dll to get almost everything fixed. I thought it would be a simple matter of identifying the skybox shader and setting to zero: [ShaderOverrideSky] Hash=0cd19f6ddcee02f0 Convergence=0 But when I tried this it seemed to set everything but the sky to convergence of 0. I tried some other skybox fixes I found using search, but they did not result in any changes to the sky depth. Here is the only shader I found that affected the skybox when hunting: [code] // ---- Created with 3Dmigoto v1.3.11 on Thu Sep 06 16:29:14 2018 cbuffer _Globals : register(b0) { float4 g_cloudLayer1LightCoords : packoffset(c0); float4 g_cloudLayer2LightCoords : packoffset(c1); float3 g_light1Intensity : packoffset(c2); float3 g_light2Intensity : packoffset(c3); float g_interpolationValue : packoffset(c3.w); float g_inverseExposure : packoffset(c4); } SamplerState g_transmittanceToAtmosphereSampler_s : register(s0); Texture2D<float4> g_transmittanceToAtmosphereTexture : register(t0); Texture2D<float4> g_transmittanceToAtmosphereTexture2 : register(t1); Texture2D<float4> g_horizonScatteringTexture : register(t2); Texture2D<float3> g_skyIntegratedLuminanceTexture : register(t3); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : TEXCOORD0, float3 v1 : TEXCOORD1, out float4 o0 : SV_Position0, out float4 o1 : TEXCOORD0, out float4 o2 : TEXCOORD1, out float4 o3 : TEXCOORD2, out float4 o4 : TEXCOORD3, out float4 o5 : TEXCOORD4, out float4 o6 : TEXCOORD5, out float4 o7 : TEXCOORD6, out float4 o8 : TEXCOORD7, out float4 o9 : TEXCOORD8, out float4 o10 : TEXCOORD9, out float2 o11 : TEXCOORD10) { float4 r0,r1; uint4 bitmask, uiDest; float4 fDest; o0.xyz = v0.xyz; o0.w = 1; o1.xyz = v1.xyz; r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.xy, 0).xyz; r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.xy, 0).xyz; r0.xyz = -r1.xyz + r0.xyz; r0.xyz = g_interpolationValue * r0.xyz + r1.xyz; o2.xyz = g_light1Intensity.xyz * r0.xyz; r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.zw, 0).xyz; r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.zw, 0).xyz; r0.xyz = -r1.xyz + r0.xyz; r0.xyz = g_interpolationValue * r0.xyz + r1.xyz; o3.xyz = g_light2Intensity.xyz * r0.xyz; r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.xy, 0).xyz; r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.xy, 0).xyz; r0.xyz = -r1.xyz + r0.xyz; r0.xyz = g_interpolationValue * r0.xyz + r1.xyz; o4.xyz = g_light1Intensity.xyz * r0.xyz; r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.zw, 0).xyz; r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.zw, 0).xyz; r0.xyz = -r1.xyz + r0.xyz; r0.xyz = g_interpolationValue * r0.xyz + r1.xyz; o5.xyz = g_light2Intensity.xyz * r0.xyz; r0.xyz = g_horizonScatteringTexture.Load(float4(0,0,0,0)).xyz; o6.xyz = r0.xyz; r0.xyz = g_horizonScatteringTexture.Load(float4(1,0,0,0)).xyz; o7.xyz = r0.xyz; r0.xyz = g_horizonScatteringTexture.Load(float4(2,0,0,0)).xyz; o8.xyz = r0.xyz; r0.xyz = g_horizonScatteringTexture.Load(float4(3,0,0,0)).xyz; o9.xyz = r0.xyz; r0.xyz = g_skyIntegratedLuminanceTexture.Load(float4(0,0,0,0)).xyz; o10.xyz = g_inverseExposure * r0.xyz; o11.xy = v0.xy * float2(0.5,1) + float2(0.5,0); return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384 // // using 3Dmigoto v1.3.11 on Thu Sep 06 16:29:14 2018 // // // Buffer Definitions: // // cbuffer $Globals // { // // float4 g_cloudLayer1LightCoords; // Offset: 0 Size: 16 // float4 g_cloudLayer2LightCoords; // Offset: 16 Size: 16 // float3 g_light1Intensity; // Offset: 32 Size: 12 // float3 g_light2Intensity; // Offset: 48 Size: 12 // float g_interpolationValue; // Offset: 60 Size: 4 // float g_inverseExposure; // Offset: 64 Size: 4 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // g_transmittanceToAtmosphereSampler sampler NA NA 0 1 // g_transmittanceToAtmosphereTexture texture float4 2d 0 1 // g_transmittanceToAtmosphereTexture2 texture float4 2d 1 1 // g_horizonScatteringTexture texture float4 2d 2 1 // g_skyIntegratedLuminanceTexture texture float3 2d 3 1 // $Globals cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // TEXCOORD 0 xyz 0 NONE float xyz // TEXCOORD 1 xyz 1 NONE float xyz // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float xyzw // TEXCOORD 0 xyz 1 NONE float xyz // TEXCOORD 1 xyz 2 NONE float xyz // TEXCOORD 2 xyz 3 NONE float xyz // TEXCOORD 3 xyz 4 NONE float xyz // TEXCOORD 4 xyz 5 NONE float xyz // TEXCOORD 5 xyz 6 NONE float xyz // TEXCOORD 6 xyz 7 NONE float xyz // TEXCOORD 7 xyz 8 NONE float xyz // TEXCOORD 8 xyz 9 NONE float xyz // TEXCOORD 9 xyz 10 NONE float xyz // TEXCOORD 10 xy 11 NONE float xy // vs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[5], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t2 dcl_resource_texture2d (float,float,float,float) t3 dcl_input v0.xyz dcl_input v1.xyz dcl_output_siv o0.xyzw, position dcl_output o1.xyz dcl_output o2.xyz dcl_output o3.xyz dcl_output o4.xyz dcl_output o5.xyz dcl_output o6.xyz dcl_output o7.xyz dcl_output o8.xyz dcl_output o9.xyz dcl_output o10.xyz dcl_output o11.xy dcl_temps 2 mov o0.xyz, v0.xyzx mov o0.w, l(1.000000) mov o1.xyz, v1.xyzx sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, cb0[0].xyxx, t1.xyzw, s0, l(0.000000) sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, cb0[0].xyxx, t0.xyzw, s0, l(0.000000) add r0.xyz, r0.xyzx, -r1.xyzx mad r0.xyz, cb0[3].wwww, r0.xyzx, r1.xyzx mul o2.xyz, r0.xyzx, cb0[2].xyzx sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, cb0[0].zwzz, t1.xyzw, s0, l(0.000000) sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, cb0[0].zwzz, t0.xyzw, s0, l(0.000000) add r0.xyz, r0.xyzx, -r1.xyzx mad r0.xyz, cb0[3].wwww, r0.xyzx, r1.xyzx mul o3.xyz, r0.xyzx, cb0[3].xyzx sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, cb0[1].xyxx, t1.xyzw, s0, l(0.000000) sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, cb0[1].xyxx, t0.xyzw, s0, l(0.000000) add r0.xyz, r0.xyzx, -r1.xyzx mad r0.xyz, cb0[3].wwww, r0.xyzx, r1.xyzx mul o4.xyz, r0.xyzx, cb0[2].xyzx sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, cb0[1].zwzz, t1.xyzw, s0, l(0.000000) sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, cb0[1].zwzz, t0.xyzw, s0, l(0.000000) add r0.xyz, r0.xyzx, -r1.xyzx mad r0.xyz, cb0[3].wwww, r0.xyzx, r1.xyzx mul o5.xyz, r0.xyzx, cb0[3].xyzx ld_indexable(texture2d)(float,float,float,float) r0.xyz, l(0, 0, 0, 0), t2.xyzw mov o6.xyz, r0.xyzx ld_indexable(texture2d)(float,float,float,float) r0.xyz, l(1, 0, 0, 0), t2.xyzw mov o7.xyz, r0.xyzx ld_indexable(texture2d)(float,float,float,float) r0.xyz, l(2, 0, 0, 0), t2.xyzw mov o8.xyz, r0.xyzx ld_indexable(texture2d)(float,float,float,float) r0.xyz, l(3, 0, 0, 0), t2.xyzw mov o9.xyz, r0.xyzx ld_indexable(texture2d)(float,float,float,float) r0.xyz, l(0, 0, 0, 0), t3.xyzw mul o10.xyz, r0.xyzx, cb0[4].xxxx mad o11.xy, v0.xyxx, l(0.500000, 1.000000, 0.000000, 0.000000), l(0.500000, 0.000000, 0.000000, 0.000000) ret // Approximately 35 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code]
I am not sure if beginner questions belong in this thread, but here goes..

Trying to fix the skybox in Madden 19, I was able to combine the Frostbite universal fix with a more recent version of d3d11.dll to get almost everything fixed. I thought it would be a simple matter of identifying the skybox shader and setting to zero:

[ShaderOverrideSky]
Hash=0cd19f6ddcee02f0
Convergence=0

But when I tried this it seemed to set everything but the sky to convergence of 0. I tried some other skybox fixes I found using search, but they did not result in any changes to the sky depth. Here is the only shader I found that affected the skybox when hunting:


// ---- Created with 3Dmigoto v1.3.11 on Thu Sep 06 16:29:14 2018

cbuffer _Globals : register(b0)
{
float4 g_cloudLayer1LightCoords : packoffset(c0);
float4 g_cloudLayer2LightCoords : packoffset(c1);
float3 g_light1Intensity : packoffset(c2);
float3 g_light2Intensity : packoffset(c3);
float g_interpolationValue : packoffset(c3.w);
float g_inverseExposure : packoffset(c4);
}

SamplerState g_transmittanceToAtmosphereSampler_s : register(s0);
Texture2D<float4> g_transmittanceToAtmosphereTexture : register(t0);
Texture2D<float4> g_transmittanceToAtmosphereTexture2 : register(t1);
Texture2D<float4> g_horizonScatteringTexture : register(t2);
Texture2D<float3> g_skyIntegratedLuminanceTexture : register(t3);


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


void main(
float4 v0 : TEXCOORD0,
float3 v1 : TEXCOORD1,
out float4 o0 : SV_Position0,
out float4 o1 : TEXCOORD0,
out float4 o2 : TEXCOORD1,
out float4 o3 : TEXCOORD2,
out float4 o4 : TEXCOORD3,
out float4 o5 : TEXCOORD4,
out float4 o6 : TEXCOORD5,
out float4 o7 : TEXCOORD6,
out float4 o8 : TEXCOORD7,
out float4 o9 : TEXCOORD8,
out float4 o10 : TEXCOORD9,
out float2 o11 : TEXCOORD10)
{
float4 r0,r1;
uint4 bitmask, uiDest;
float4 fDest;

o0.xyz = v0.xyz;
o0.w = 1;
o1.xyz = v1.xyz;
r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.xy, 0).xyz;
r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.xy, 0).xyz;
r0.xyz = -r1.xyz + r0.xyz;
r0.xyz = g_interpolationValue * r0.xyz + r1.xyz;
o2.xyz = g_light1Intensity.xyz * r0.xyz;
r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.zw, 0).xyz;
r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.zw, 0).xyz;
r0.xyz = -r1.xyz + r0.xyz;
r0.xyz = g_interpolationValue * r0.xyz + r1.xyz;
o3.xyz = g_light2Intensity.xyz * r0.xyz;
r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.xy, 0).xyz;
r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.xy, 0).xyz;
r0.xyz = -r1.xyz + r0.xyz;
r0.xyz = g_interpolationValue * r0.xyz + r1.xyz;
o4.xyz = g_light1Intensity.xyz * r0.xyz;
r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.zw, 0).xyz;
r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.zw, 0).xyz;
r0.xyz = -r1.xyz + r0.xyz;
r0.xyz = g_interpolationValue * r0.xyz + r1.xyz;
o5.xyz = g_light2Intensity.xyz * r0.xyz;
r0.xyz = g_horizonScatteringTexture.Load(float4(0,0,0,0)).xyz;
o6.xyz = r0.xyz;
r0.xyz = g_horizonScatteringTexture.Load(float4(1,0,0,0)).xyz;
o7.xyz = r0.xyz;
r0.xyz = g_horizonScatteringTexture.Load(float4(2,0,0,0)).xyz;
o8.xyz = r0.xyz;
r0.xyz = g_horizonScatteringTexture.Load(float4(3,0,0,0)).xyz;
o9.xyz = r0.xyz;
r0.xyz = g_skyIntegratedLuminanceTexture.Load(float4(0,0,0,0)).xyz;
o10.xyz = g_inverseExposure * r0.xyz;
o11.xy = v0.xy * float2(0.5,1) + float2(0.5,0);
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// using 3Dmigoto v1.3.11 on Thu Sep 06 16:29:14 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
// float4 g_cloudLayer1LightCoords; // Offset: 0 Size: 16
// float4 g_cloudLayer2LightCoords; // Offset: 16 Size: 16
// float3 g_light1Intensity; // Offset: 32 Size: 12
// float3 g_light2Intensity; // Offset: 48 Size: 12
// float g_interpolationValue; // Offset: 60 Size: 4
// float g_inverseExposure; // Offset: 64 Size: 4
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// g_transmittanceToAtmosphereSampler sampler NA NA 0 1
// g_transmittanceToAtmosphereTexture texture float4 2d 0 1
// g_transmittanceToAtmosphereTexture2 texture float4 2d 1 1
// g_horizonScatteringTexture texture float4 2d 2 1
// g_skyIntegratedLuminanceTexture texture float3 2d 3 1
// $Globals cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD 0 xyz 0 NONE float xyz
// TEXCOORD 1 xyz 1 NONE float xyz
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xyzw
// TEXCOORD 0 xyz 1 NONE float xyz
// TEXCOORD 1 xyz 2 NONE float xyz
// TEXCOORD 2 xyz 3 NONE float xyz
// TEXCOORD 3 xyz 4 NONE float xyz
// TEXCOORD 4 xyz 5 NONE float xyz
// TEXCOORD 5 xyz 6 NONE float xyz
// TEXCOORD 6 xyz 7 NONE float xyz
// TEXCOORD 7 xyz 8 NONE float xyz
// TEXCOORD 8 xyz 9 NONE float xyz
// TEXCOORD 9 xyz 10 NONE float xyz
// TEXCOORD 10 xy 11 NONE float xy
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[5], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_input v0.xyz
dcl_input v1.xyz
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_output o2.xyz
dcl_output o3.xyz
dcl_output o4.xyz
dcl_output o5.xyz
dcl_output o6.xyz
dcl_output o7.xyz
dcl_output o8.xyz
dcl_output o9.xyz
dcl_output o10.xyz
dcl_output o11.xy
dcl_temps 2
mov o0.xyz, v0.xyzx
mov o0.w, l(1.000000)
mov o1.xyz, v1.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, cb0[0].xyxx, t1.xyzw, s0, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, cb0[0].xyxx, t0.xyzw, s0, l(0.000000)
add r0.xyz, r0.xyzx, -r1.xyzx
mad r0.xyz, cb0[3].wwww, r0.xyzx, r1.xyzx
mul o2.xyz, r0.xyzx, cb0[2].xyzx
sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, cb0[0].zwzz, t1.xyzw, s0, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, cb0[0].zwzz, t0.xyzw, s0, l(0.000000)
add r0.xyz, r0.xyzx, -r1.xyzx
mad r0.xyz, cb0[3].wwww, r0.xyzx, r1.xyzx
mul o3.xyz, r0.xyzx, cb0[3].xyzx
sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, cb0[1].xyxx, t1.xyzw, s0, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, cb0[1].xyxx, t0.xyzw, s0, l(0.000000)
add r0.xyz, r0.xyzx, -r1.xyzx
mad r0.xyz, cb0[3].wwww, r0.xyzx, r1.xyzx
mul o4.xyz, r0.xyzx, cb0[2].xyzx
sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, cb0[1].zwzz, t1.xyzw, s0, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, cb0[1].zwzz, t0.xyzw, s0, l(0.000000)
add r0.xyz, r0.xyzx, -r1.xyzx
mad r0.xyz, cb0[3].wwww, r0.xyzx, r1.xyzx
mul o5.xyz, r0.xyzx, cb0[3].xyzx
ld_indexable(texture2d)(float,float,float,float) r0.xyz, l(0, 0, 0, 0), t2.xyzw
mov o6.xyz, r0.xyzx
ld_indexable(texture2d)(float,float,float,float) r0.xyz, l(1, 0, 0, 0), t2.xyzw
mov o7.xyz, r0.xyzx
ld_indexable(texture2d)(float,float,float,float) r0.xyz, l(2, 0, 0, 0), t2.xyzw
mov o8.xyz, r0.xyzx
ld_indexable(texture2d)(float,float,float,float) r0.xyz, l(3, 0, 0, 0), t2.xyzw
mov o9.xyz, r0.xyzx
ld_indexable(texture2d)(float,float,float,float) r0.xyz, l(0, 0, 0, 0), t3.xyzw
mul o10.xyz, r0.xyzx, cb0[4].xxxx
mad o11.xy, v0.xyxx, l(0.500000, 1.000000, 0.000000, 0.000000), l(0.500000, 0.000000, 0.000000, 0.000000)
ret
// Approximately 35 instruction slots used

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

Posted 09/07/2018 02:58 PM   
Known (recent) 3Dmigoto issue: https://github.com/bo3b/3Dmigoto/issues/97 You'll have to use and older version like 1.2.73 to use "Convergence=0".
Known (recent) 3Dmigoto issue: https://github.com/bo3b/3Dmigoto/issues/97


You'll have to use and older version like 1.2.73 to use "Convergence=0".

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 09/07/2018 04:00 PM   
@Shift-E Like @masterotaku write... the 0 convergence is a bug. Try this: [code]// ---- Created with 3Dmigoto v1.3.11 on Thu Sep 06 16:29:14 2018 cbuffer _Globals : register(b0) { float4 g_cloudLayer1LightCoords : packoffset(c0); float4 g_cloudLayer2LightCoords : packoffset(c1); float3 g_light1Intensity : packoffset(c2); float3 g_light2Intensity : packoffset(c3); float g_interpolationValue : packoffset(c3.w); float g_inverseExposure : packoffset(c4); } SamplerState g_transmittanceToAtmosphereSampler_s : register(s0); Texture2D<float4> g_transmittanceToAtmosphereTexture : register(t0); Texture2D<float4> g_transmittanceToAtmosphereTexture2 : register(t1); Texture2D<float4> g_horizonScatteringTexture : register(t2); Texture2D<float3> g_skyIntegratedLuminanceTexture : register(t3); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : TEXCOORD0, float3 v1 : TEXCOORD1, out float4 o0 : SV_Position0, out float4 o1 : TEXCOORD0, out float4 o2 : TEXCOORD1, out float4 o3 : TEXCOORD2, out float4 o4 : TEXCOORD3, out float4 o5 : TEXCOORD4, out float4 o6 : TEXCOORD5, out float4 o7 : TEXCOORD6, out float4 o8 : TEXCOORD7, out float4 o9 : TEXCOORD8, out float4 o10 : TEXCOORD9, out float2 o11 : TEXCOORD10) { float4 r0,r1; uint4 bitmask, uiDest; float4 fDest; o0.xyz = v0.xyz; o0.w = 1; //Here NEW float4 stereo = StereoParams.Load(0); o0.x += stereo.x * 0.88; o0.xyz *= 1.15; o1.xyz = v1.xyz; r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.xy, 0).xyz; r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.xy, 0).xyz; r0.xyz = -r1.xyz + r0.xyz; r0.xyz = g_interpolationValue * r0.xyz + r1.xyz; o2.xyz = g_light1Intensity.xyz * r0.xyz; r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.zw, 0).xyz; r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.zw, 0).xyz; r0.xyz = -r1.xyz + r0.xyz; r0.xyz = g_interpolationValue * r0.xyz + r1.xyz; o3.xyz = g_light2Intensity.xyz * r0.xyz; r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.xy, 0).xyz; r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.xy, 0).xyz; r0.xyz = -r1.xyz + r0.xyz; r0.xyz = g_interpolationValue * r0.xyz + r1.xyz; o4.xyz = g_light1Intensity.xyz * r0.xyz; r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.zw, 0).xyz; r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.zw, 0).xyz; r0.xyz = -r1.xyz + r0.xyz; r0.xyz = g_interpolationValue * r0.xyz + r1.xyz; o5.xyz = g_light2Intensity.xyz * r0.xyz; r0.xyz = g_horizonScatteringTexture.Load(float4(0,0,0,0)).xyz; o6.xyz = r0.xyz; r0.xyz = g_horizonScatteringTexture.Load(float4(1,0,0,0)).xyz; o7.xyz = r0.xyz; r0.xyz = g_horizonScatteringTexture.Load(float4(2,0,0,0)).xyz; o8.xyz = r0.xyz; r0.xyz = g_horizonScatteringTexture.Load(float4(3,0,0,0)).xyz; o9.xyz = r0.xyz; r0.xyz = g_skyIntegratedLuminanceTexture.Load(float4(0,0,0,0)).xyz; o10.xyz = g_inverseExposure * r0.xyz; o11.xy = v0.xy * float2(0.5,1) + float2(0.5,0); return; }[/code]
@Shift-E
Like @masterotaku write... the 0 convergence is a bug.

Try this:
// ---- Created with 3Dmigoto v1.3.11 on Thu Sep 06 16:29:14 2018

cbuffer _Globals : register(b0)
{
float4 g_cloudLayer1LightCoords : packoffset(c0);
float4 g_cloudLayer2LightCoords : packoffset(c1);
float3 g_light1Intensity : packoffset(c2);
float3 g_light2Intensity : packoffset(c3);
float g_interpolationValue : packoffset(c3.w);
float g_inverseExposure : packoffset(c4);
}

SamplerState g_transmittanceToAtmosphereSampler_s : register(s0);
Texture2D<float4> g_transmittanceToAtmosphereTexture : register(t0);
Texture2D<float4> g_transmittanceToAtmosphereTexture2 : register(t1);
Texture2D<float4> g_horizonScatteringTexture : register(t2);
Texture2D<float3> g_skyIntegratedLuminanceTexture : register(t3);


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


void main(
float4 v0 : TEXCOORD0,
float3 v1 : TEXCOORD1,
out float4 o0 : SV_Position0,
out float4 o1 : TEXCOORD0,
out float4 o2 : TEXCOORD1,
out float4 o3 : TEXCOORD2,
out float4 o4 : TEXCOORD3,
out float4 o5 : TEXCOORD4,
out float4 o6 : TEXCOORD5,
out float4 o7 : TEXCOORD6,
out float4 o8 : TEXCOORD7,
out float4 o9 : TEXCOORD8,
out float4 o10 : TEXCOORD9,
out float2 o11 : TEXCOORD10)
{
float4 r0,r1;
uint4 bitmask, uiDest;
float4 fDest;

o0.xyz = v0.xyz;
o0.w = 1;

//Here NEW
float4 stereo = StereoParams.Load(0);
o0.x += stereo.x * 0.88;
o0.xyz *= 1.15;

o1.xyz = v1.xyz;
r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.xy, 0).xyz;
r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.xy, 0).xyz;
r0.xyz = -r1.xyz + r0.xyz;
r0.xyz = g_interpolationValue * r0.xyz + r1.xyz;
o2.xyz = g_light1Intensity.xyz * r0.xyz;
r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.zw, 0).xyz;
r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer1LightCoords.zw, 0).xyz;
r0.xyz = -r1.xyz + r0.xyz;
r0.xyz = g_interpolationValue * r0.xyz + r1.xyz;
o3.xyz = g_light2Intensity.xyz * r0.xyz;
r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.xy, 0).xyz;
r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.xy, 0).xyz;
r0.xyz = -r1.xyz + r0.xyz;
r0.xyz = g_interpolationValue * r0.xyz + r1.xyz;
o4.xyz = g_light1Intensity.xyz * r0.xyz;
r0.xyz = g_transmittanceToAtmosphereTexture2.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.zw, 0).xyz;
r1.xyz = g_transmittanceToAtmosphereTexture.SampleLevel(g_transmittanceToAtmosphereSampler_s, g_cloudLayer2LightCoords.zw, 0).xyz;
r0.xyz = -r1.xyz + r0.xyz;
r0.xyz = g_interpolationValue * r0.xyz + r1.xyz;
o5.xyz = g_light2Intensity.xyz * r0.xyz;
r0.xyz = g_horizonScatteringTexture.Load(float4(0,0,0,0)).xyz;
o6.xyz = r0.xyz;
r0.xyz = g_horizonScatteringTexture.Load(float4(1,0,0,0)).xyz;
o7.xyz = r0.xyz;
r0.xyz = g_horizonScatteringTexture.Load(float4(2,0,0,0)).xyz;
o8.xyz = r0.xyz;
r0.xyz = g_horizonScatteringTexture.Load(float4(3,0,0,0)).xyz;
o9.xyz = r0.xyz;
r0.xyz = g_skyIntegratedLuminanceTexture.Load(float4(0,0,0,0)).xyz;
o10.xyz = g_inverseExposure * r0.xyz;
o11.xy = v0.xy * float2(0.5,1) + float2(0.5,0);
return;
}

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 09/07/2018 06:01 PM   
//skip this
//skip this

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

Posted 09/07/2018 07:34 PM   
@masterotaku: thanks, was not aware of this bug. explains why I was unable to do the same in another game. @DHR: worked like a charm, thanks for the suggested code. and thanks for your work on these universal fixes, really a breakthrough advancement for the 3D community. Game is completely playable in 3D and looks great, I never would have bought it in 2D..
@masterotaku: thanks, was not aware of this bug. explains why I was unable to do the same in another game.

@DHR: worked like a charm, thanks for the suggested code. and thanks for your work on these universal fixes, really a breakthrough advancement for the 3D community. Game is completely playable in 3D and looks great, I never would have bought it in 2D..

Posted 09/07/2018 07:52 PM   
Hey ho its me again ^^ I have a strange problem that I knowled in 2 games now and i cant solve: See the screenshot attached and look @ the box arround the font "DESK" .... disable_scissor = 1 is set but it does not cure it...any help here???
Hey ho its me again ^^

I have a strange problem that I knowled in 2 games now and i cant solve:

See the screenshot attached and look @ the box arround the font "DESK" .... disable_scissor = 1 is set but it does not cure it...any help here???
Attachments

EoCApp001_050.jpg

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

Posted 09/08/2018 07:55 PM   
Did anyone here ever stereoize cubemaps (static textures that act as fake reflections, but they can move around)? I had a certain degree of success today in Tokyo Xanadu Ex+. Now they never pop out of their surface. However, there's still one problem with camera position: - Facing north: 0 separation. - Facing east: full separation effect. - Facing south: 0 separation. - Facing west: full separation effect. So the effect is flat at worst and fully separated at best. One good angle at low convergence: [img]https://u.cubeupload.com/masterotaku/TokyoXanadu061.jpg[/img] This one shows how when the image is closer to the north it gets flatter (other surfaces directly pointing north or south are 100% flat when you look at them straight): [img]https://u.cubeupload.com/masterotaku/TokyoXanadu062.jpg[/img] The window being oblique to the camera may be a different thing altogether... Pixel shader example: [code] //Fake window glass reflections PS. // ---- Created with 3Dmigoto v1.3.11 on Thu Sep 27 23:11:11 2018 cbuffer _Globals : register(b0) { struct { float3 EyePosition; float4x4 View; float4x4 Projection; float4x4 ViewProjection; float4x4 ViewInverse; float2 cameraNearFar; float cameraNearTimesFar; float cameraFarMinusNear; float2 ViewportWidthHeight; float2 screenWidthHeightInv; float3 GlobalAmbientColor; float Time; float3 FakeRimLightDir; float3 FogColor; float4 FogRangeParameters; float3 MiscParameters1; float4 MiscParameters2; float3 MonotoneMul; float3 MonotoneAdd; float3 BloomParams; float perfCheckValue; } scene : packoffset(c0); bool PhyreContextSwitches : packoffset(c28); bool PhyreMaterialSwitches : packoffset(c28.y); float4x4 World : packoffset(c29); float GlobalTexcoordFactor : packoffset(c33); struct { float3 m_direction; float3 m_colorIntensity; } Light0 : packoffset(c34); float GameMaterialID : packoffset(c35.w) = {0}; float4 GameMaterialDiffuse : packoffset(c36) = {1,1,1,1}; float4 GameMaterialEmission : packoffset(c37) = {0,0,0,0}; float GameMaterialMonotone : packoffset(c38) = {0}; float4 GameMaterialTexcoord : packoffset(c39) = {0,0,1,1}; float4 UVaMUvColor : packoffset(c40) = {1,1,1,1}; float4 UVaProjTexcoord : packoffset(c41) = {0,0,1,1}; float4 UVaMUvTexcoord : packoffset(c42) = {0,0,1,1}; float4 UVaMUv2Texcoord : packoffset(c43) = {0,0,1,1}; float4 UVaDuDvTexcoord : packoffset(c44) = {0,0,1,1}; float Shininess : packoffset(c45) = {0.5}; float SpecularPower : packoffset(c45.y) = {50}; float CubeMapIntensity : packoffset(c45.z) = {1}; float CubeMapFresnel : packoffset(c45.w) = {0}; float BloomIntensity : packoffset(c46) = {1}; float4 PointLightParams : packoffset(c47) = {0,0,0,0}; float4 PointLightColor : packoffset(c48) = {0,0,0,0}; } SamplerState LinearClampSamplerState_s : register(s0); SamplerState DiffuseMapSamplerSampler_s : register(s1); Texture2D<float4> DiffuseMapSampler : register(t0); TextureCube<float4> CubeMapSampler : register(t1); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_POSITION0, float4 v1 : COLOR0, float4 v2 : COLOR1, float4 v3 : TEXCOORD0, float4 v4 : TEXCOORD1, float4 v5 : TEXCOORD4, float4 v6 : TEXCOORD7, out float4 o0 : SV_TARGET0) { float4 r0,r1,r2; uint4 bitmask, uiDest; float4 fDest; float4 stereo = StereoParams.Load(0); float4 iniparams = IniParams.Load(0); r0.xyz = scene.EyePosition.xyz + -v4.xyz; r0.w = dot(r0.xyz, r0.xyz); r0.w = rsqrt(r0.w); r0.xyz = r0.xyz * r0.www + scene.FakeRimLightDir.xyz; r0.w = dot(r0.xyz, r0.xyz); r0.w = rsqrt(r0.w); r0.xyz = r0.xyz * r0.www; r0.w = dot(v5.xyz, v5.xyz); r0.w = rsqrt(r0.w); r1.xyz = v5.xyz * r0.www; r0.x = saturate(dot(r1.xyz, r0.xyz)); r0.x = log2(r0.x); r0.x = SpecularPower * r0.x; r0.x = exp2(r0.x); r0.x = min(1, r0.x); r0.x = Shininess * r0.x; r0.xyz = Light0.m_colorIntensity.xyz * r0.xxx; r0.w = max(Light0.m_colorIntensity.x, Light0.m_colorIntensity.y); r1.x = max(0.00100000005, Light0.m_colorIntensity.z); r0.w = max(r1.x, r0.w); r1.xyz = Light0.m_colorIntensity.xyz / r0.www; r1.xyz = GameMaterialEmission.www * r1.xyz; r1.xyz = min(float3(1.5,1.5,1.5), r1.xyz); r0.xyz = r0.xyz * GameMaterialEmission.www + r1.xyz; r0.xyz = max(scene.GlobalAmbientColor.xyz, r0.xyz); r0.xyz = v1.xyz * r0.xyz; r0.w = dot(v6.xyz, v6.xyz); r0.w = rsqrt(r0.w); r1.xyz = v6.xyz * r0.www; //More or less, except some points. r1.x-=stereo.x*r1.z*r0.w*stereo.y*0.1; r1.xyz = CubeMapSampler.Sample(LinearClampSamplerState_s, r1.xyz).xyz; r2.xyz = DiffuseMapSampler.Sample(DiffuseMapSamplerSampler_s, v3.xy).xyz; r1.xyz = -r2.xyz + r1.xyz; r0.w = CubeMapIntensity * v6.w; r1.xyz = r0.www * r1.xyz + r2.xyz; r0.xyz = r1.xyz * r0.xyz; r0.xyz = r0.xyz * GameMaterialDiffuse.xyz + GameMaterialEmission.xyz; r1.xyz = scene.FogColor.xyz + -r0.xyz; r0.xyz = v2.www * r1.xyz + r0.xyz; r0.w = dot(r0.xyz, float3(0.298999995,0.587000012,0.114)); r1.xyz = r0.www * scene.MonotoneMul.xyz + scene.MonotoneAdd.xyz; r1.xyz = r1.xyz + -r0.xyz; r0.xyz = GameMaterialMonotone * r1.xyz + r0.xyz; r1.xyz = float3(0,1,0) + -r0.xyz; r0.xyz = scene.perfCheckValue * r1.xyz + r0.xyz; r1.xyz = BloomIntensity * r0.xyz; o0.xyz = r0.xyz; r0.xyz = scene.BloomParams.yyy * r1.xyz; r0.x = dot(r0.xyz, float3(0.298999995,0.587000012,0.114)); r0.x = -scene.MiscParameters2.z + r0.x; r0.x = max(0, r0.x); r0.x = 0.5 * r0.x; o0.w = min(1, r0.x); return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.18773 // // using 3Dmigoto v1.3.11 on Thu Sep 27 23:11:11 2018 // // // Buffer Definitions: // // cbuffer $Globals // { // // struct // { // // float3 EyePosition; // Offset: 0 // float4x4 View; // Offset: 16 // float4x4 Projection; // Offset: 80 // float4x4 ViewProjection; // Offset: 144 // float4x4 ViewInverse; // Offset: 208 // float2 cameraNearFar; // Offset: 272 // float cameraNearTimesFar; // Offset: 280 // float cameraFarMinusNear; // Offset: 284 // float2 ViewportWidthHeight; // Offset: 288 // float2 screenWidthHeightInv; // Offset: 296 // float3 GlobalAmbientColor; // Offset: 304 // float Time; // Offset: 316 // float3 FakeRimLightDir; // Offset: 320 // float3 FogColor; // Offset: 336 // float4 FogRangeParameters; // Offset: 352 // float3 MiscParameters1; // Offset: 368 // float4 MiscParameters2; // Offset: 384 // float3 MonotoneMul; // Offset: 400 // float3 MonotoneAdd; // Offset: 416 // float3 BloomParams; // Offset: 432 // float perfCheckValue; // Offset: 444 // // } scene; // Offset: 0 Size: 448 // bool PhyreContextSwitches; // Offset: 448 Size: 4 [unused] // bool PhyreMaterialSwitches; // Offset: 452 Size: 4 [unused] // float4x4 World; // Offset: 464 Size: 64 [unused] // float GlobalTexcoordFactor; // Offset: 528 Size: 4 [unused] // // struct // { // // float3 m_direction; // Offset: 544 // float3 m_colorIntensity; // Offset: 560 // // } Light0; // Offset: 544 Size: 28 // float GameMaterialID; // Offset: 572 Size: 4 [unused] // = 0x00000000 // float4 GameMaterialDiffuse; // Offset: 576 Size: 16 // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 GameMaterialEmission; // Offset: 592 Size: 16 // = 0x00000000 0x00000000 0x00000000 0x00000000 // float GameMaterialMonotone; // Offset: 608 Size: 4 // = 0x00000000 // float4 GameMaterialTexcoord; // Offset: 624 Size: 16 [unused] // = 0x00000000 0x00000000 0x3f800000 0x3f800000 // float4 UVaMUvColor; // Offset: 640 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 UVaProjTexcoord; // Offset: 656 Size: 16 [unused] // = 0x00000000 0x00000000 0x3f800000 0x3f800000 // float4 UVaMUvTexcoord; // Offset: 672 Size: 16 [unused] // = 0x00000000 0x00000000 0x3f800000 0x3f800000 // float4 UVaMUv2Texcoord; // Offset: 688 Size: 16 [unused] // = 0x00000000 0x00000000 0x3f800000 0x3f800000 // float4 UVaDuDvTexcoord; // Offset: 704 Size: 16 [unused] // = 0x00000000 0x00000000 0x3f800000 0x3f800000 // float Shininess; // Offset: 720 Size: 4 // = 0x3f000000 // float SpecularPower; // Offset: 724 Size: 4 // = 0x42480000 // float CubeMapIntensity; // Offset: 728 Size: 4 // = 0x3f800000 // float CubeMapFresnel; // Offset: 732 Size: 4 [unused] // = 0x00000000 // float BloomIntensity; // Offset: 736 Size: 4 // = 0x3f800000 // float4 PointLightParams; // Offset: 752 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 PointLightColor; // Offset: 768 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // LinearClampSamplerState sampler NA NA 0 1 // DiffuseMapSamplerSampler sampler NA NA 1 1 // DiffuseMapSampler texture float4 2d 0 1 // CubeMapSampler texture float4 cube 1 1 // $Globals cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_POSITION 0 xyzw 0 POS float // COLOR 0 xyzw 1 NONE float xyz // COLOR 1 xyzw 2 NONE float w // TEXCOORD 0 xy 3 NONE float xy // TEXCOORD 1 xyzw 4 NONE float xyz // TEXCOORD 4 xyz 5 NONE float xyz // TEXCOORD 7 xyzw 6 NONE float xyzw // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_TARGET 0 xyzw 0 TARGET float xyzw // ps_4_1 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[47], immediateIndexed dcl_sampler s0, mode_default dcl_sampler s1, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texturecube (float,float,float,float) t1 dcl_input_ps linear v1.xyz dcl_input_ps linear v2.w dcl_input_ps linear v3.xy dcl_input_ps linear v4.xyz dcl_input_ps linear v5.xyz dcl_input_ps linear v6.xyzw dcl_output o0.xyzw dcl_temps 3 add r0.xyz, -v4.xyzx, cb0[0].xyzx dp3 r0.w, r0.xyzx, r0.xyzx rsq r0.w, r0.w mad r0.xyz, r0.xyzx, r0.wwww, cb0[20].xyzx dp3 r0.w, r0.xyzx, r0.xyzx rsq r0.w, r0.w mul r0.xyz, r0.wwww, r0.xyzx dp3 r0.w, v5.xyzx, v5.xyzx rsq r0.w, r0.w mul r1.xyz, r0.wwww, v5.xyzx dp3_sat r0.x, r1.xyzx, r0.xyzx log r0.x, r0.x mul r0.x, r0.x, cb0[45].y exp r0.x, r0.x min r0.x, r0.x, l(1.000000) mul r0.x, r0.x, cb0[45].x mul r0.xyz, r0.xxxx, cb0[35].xyzx max r0.w, cb0[35].y, cb0[35].x max r1.x, cb0[35].z, l(0.001000) max r0.w, r0.w, r1.x div r1.xyz, cb0[35].xyzx, r0.wwww mul r1.xyz, r1.xyzx, cb0[37].wwww min r1.xyz, r1.xyzx, l(1.500000, 1.500000, 1.500000, 0.000000) mad r0.xyz, r0.xyzx, cb0[37].wwww, r1.xyzx max r0.xyz, r0.xyzx, cb0[19].xyzx mul r0.xyz, r0.xyzx, v1.xyzx dp3 r0.w, v6.xyzx, v6.xyzx rsq r0.w, r0.w mul r1.xyz, r0.wwww, v6.xyzx sample r1.xyz, r1.xyzx, t1.xyzw, s0 sample r2.xyz, v3.xyxx, t0.xyzw, s1 add r1.xyz, r1.xyzx, -r2.xyzx mul r0.w, v6.w, cb0[45].z mad r1.xyz, r0.wwww, r1.xyzx, r2.xyzx mul r0.xyz, r0.xyzx, r1.xyzx mad r0.xyz, r0.xyzx, cb0[36].xyzx, cb0[37].xyzx add r1.xyz, -r0.xyzx, cb0[21].xyzx mad r0.xyz, v2.wwww, r1.xyzx, r0.xyzx dp3 r0.w, r0.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000) mad r1.xyz, r0.wwww, cb0[25].xyzx, cb0[26].xyzx add r1.xyz, -r0.xyzx, r1.xyzx mad r0.xyz, cb0[38].xxxx, r1.xyzx, r0.xyzx add r1.xyz, -r0.xyzx, l(0.000000, 1.000000, 0.000000, 0.000000) mad r0.xyz, cb0[27].wwww, r1.xyzx, r0.xyzx mul r1.xyz, r0.xyzx, cb0[46].xxxx mov o0.xyz, r0.xyzx mul r0.xyz, r1.xyzx, cb0[27].yyyy dp3 r0.x, r0.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000) add r0.x, r0.x, -cb0[24].z max r0.x, r0.x, l(0.000000) mul r0.x, r0.x, l(0.500000) min o0.w, r0.x, l(1.000000) ret // Approximately 53 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] If there's any standard formula that can help make these reflections be at full depth easily, please tell me. Games that do this right (by their own developers) are Doom 3 BFG Edition and Deus Ex Mankind Divided.
Did anyone here ever stereoize cubemaps (static textures that act as fake reflections, but they can move around)?

I had a certain degree of success today in Tokyo Xanadu Ex+. Now they never pop out of their surface. However, there's still one problem with camera position:

- Facing north: 0 separation.
- Facing east: full separation effect.
- Facing south: 0 separation.
- Facing west: full separation effect.

So the effect is flat at worst and fully separated at best.

One good angle at low convergence:

Image

This one shows how when the image is closer to the north it gets flatter (other surfaces directly pointing north or south are 100% flat when you look at them straight):

Image

The window being oblique to the camera may be a different thing altogether...


Pixel shader example:

//Fake window glass reflections PS.
// ---- Created with 3Dmigoto v1.3.11 on Thu Sep 27 23:11:11 2018

cbuffer _Globals : register(b0)
{

struct
{
float3 EyePosition;
float4x4 View;
float4x4 Projection;
float4x4 ViewProjection;
float4x4 ViewInverse;
float2 cameraNearFar;
float cameraNearTimesFar;
float cameraFarMinusNear;
float2 ViewportWidthHeight;
float2 screenWidthHeightInv;
float3 GlobalAmbientColor;
float Time;
float3 FakeRimLightDir;
float3 FogColor;
float4 FogRangeParameters;
float3 MiscParameters1;
float4 MiscParameters2;
float3 MonotoneMul;
float3 MonotoneAdd;
float3 BloomParams;
float perfCheckValue;
} scene : packoffset(c0);

bool PhyreContextSwitches : packoffset(c28);
bool PhyreMaterialSwitches : packoffset(c28.y);
float4x4 World : packoffset(c29);
float GlobalTexcoordFactor : packoffset(c33);

struct
{
float3 m_direction;
float3 m_colorIntensity;
} Light0 : packoffset(c34);

float GameMaterialID : packoffset(c35.w) = {0};
float4 GameMaterialDiffuse : packoffset(c36) = {1,1,1,1};
float4 GameMaterialEmission : packoffset(c37) = {0,0,0,0};
float GameMaterialMonotone : packoffset(c38) = {0};
float4 GameMaterialTexcoord : packoffset(c39) = {0,0,1,1};
float4 UVaMUvColor : packoffset(c40) = {1,1,1,1};
float4 UVaProjTexcoord : packoffset(c41) = {0,0,1,1};
float4 UVaMUvTexcoord : packoffset(c42) = {0,0,1,1};
float4 UVaMUv2Texcoord : packoffset(c43) = {0,0,1,1};
float4 UVaDuDvTexcoord : packoffset(c44) = {0,0,1,1};
float Shininess : packoffset(c45) = {0.5};
float SpecularPower : packoffset(c45.y) = {50};
float CubeMapIntensity : packoffset(c45.z) = {1};
float CubeMapFresnel : packoffset(c45.w) = {0};
float BloomIntensity : packoffset(c46) = {1};
float4 PointLightParams : packoffset(c47) = {0,0,0,0};
float4 PointLightColor : packoffset(c48) = {0,0,0,0};
}

SamplerState LinearClampSamplerState_s : register(s0);
SamplerState DiffuseMapSamplerSampler_s : register(s1);
Texture2D<float4> DiffuseMapSampler : register(t0);
TextureCube<float4> CubeMapSampler : register(t1);


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


void main(
float4 v0 : SV_POSITION0,
float4 v1 : COLOR0,
float4 v2 : COLOR1,
float4 v3 : TEXCOORD0,
float4 v4 : TEXCOORD1,
float4 v5 : TEXCOORD4,
float4 v6 : TEXCOORD7,
out float4 o0 : SV_TARGET0)
{
float4 r0,r1,r2;
uint4 bitmask, uiDest;
float4 fDest;

float4 stereo = StereoParams.Load(0);
float4 iniparams = IniParams.Load(0);

r0.xyz = scene.EyePosition.xyz + -v4.xyz;
r0.w = dot(r0.xyz, r0.xyz);
r0.w = rsqrt(r0.w);
r0.xyz = r0.xyz * r0.www + scene.FakeRimLightDir.xyz;
r0.w = dot(r0.xyz, r0.xyz);
r0.w = rsqrt(r0.w);
r0.xyz = r0.xyz * r0.www;
r0.w = dot(v5.xyz, v5.xyz);
r0.w = rsqrt(r0.w);
r1.xyz = v5.xyz * r0.www;
r0.x = saturate(dot(r1.xyz, r0.xyz));
r0.x = log2(r0.x);
r0.x = SpecularPower * r0.x;
r0.x = exp2(r0.x);
r0.x = min(1, r0.x);
r0.x = Shininess * r0.x;
r0.xyz = Light0.m_colorIntensity.xyz * r0.xxx;
r0.w = max(Light0.m_colorIntensity.x, Light0.m_colorIntensity.y);
r1.x = max(0.00100000005, Light0.m_colorIntensity.z);
r0.w = max(r1.x, r0.w);
r1.xyz = Light0.m_colorIntensity.xyz / r0.www;
r1.xyz = GameMaterialEmission.www * r1.xyz;
r1.xyz = min(float3(1.5,1.5,1.5), r1.xyz);
r0.xyz = r0.xyz * GameMaterialEmission.www + r1.xyz;
r0.xyz = max(scene.GlobalAmbientColor.xyz, r0.xyz);
r0.xyz = v1.xyz * r0.xyz;
r0.w = dot(v6.xyz, v6.xyz);
r0.w = rsqrt(r0.w);
r1.xyz = v6.xyz * r0.www;

//More or less, except some points.
r1.x-=stereo.x*r1.z*r0.w*stereo.y*0.1;

r1.xyz = CubeMapSampler.Sample(LinearClampSamplerState_s, r1.xyz).xyz;
r2.xyz = DiffuseMapSampler.Sample(DiffuseMapSamplerSampler_s, v3.xy).xyz;
r1.xyz = -r2.xyz + r1.xyz;
r0.w = CubeMapIntensity * v6.w;
r1.xyz = r0.www * r1.xyz + r2.xyz;
r0.xyz = r1.xyz * r0.xyz;
r0.xyz = r0.xyz * GameMaterialDiffuse.xyz + GameMaterialEmission.xyz;
r1.xyz = scene.FogColor.xyz + -r0.xyz;
r0.xyz = v2.www * r1.xyz + r0.xyz;
r0.w = dot(r0.xyz, float3(0.298999995,0.587000012,0.114));
r1.xyz = r0.www * scene.MonotoneMul.xyz + scene.MonotoneAdd.xyz;
r1.xyz = r1.xyz + -r0.xyz;
r0.xyz = GameMaterialMonotone * r1.xyz + r0.xyz;
r1.xyz = float3(0,1,0) + -r0.xyz;
r0.xyz = scene.perfCheckValue * r1.xyz + r0.xyz;
r1.xyz = BloomIntensity * r0.xyz;
o0.xyz = r0.xyz;
r0.xyz = scene.BloomParams.yyy * r1.xyz;
r0.x = dot(r0.xyz, float3(0.298999995,0.587000012,0.114));
r0.x = -scene.MiscParameters2.z + r0.x;
r0.x = max(0, r0.x);
r0.x = 0.5 * r0.x;
o0.w = min(1, r0.x);
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.18773
//
// using 3Dmigoto v1.3.11 on Thu Sep 27 23:11:11 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
// struct
// {
//
// float3 EyePosition; // Offset: 0
// float4x4 View; // Offset: 16
// float4x4 Projection; // Offset: 80
// float4x4 ViewProjection; // Offset: 144
// float4x4 ViewInverse; // Offset: 208
// float2 cameraNearFar; // Offset: 272
// float cameraNearTimesFar; // Offset: 280
// float cameraFarMinusNear; // Offset: 284
// float2 ViewportWidthHeight; // Offset: 288
// float2 screenWidthHeightInv; // Offset: 296
// float3 GlobalAmbientColor; // Offset: 304
// float Time; // Offset: 316
// float3 FakeRimLightDir; // Offset: 320
// float3 FogColor; // Offset: 336
// float4 FogRangeParameters; // Offset: 352
// float3 MiscParameters1; // Offset: 368
// float4 MiscParameters2; // Offset: 384
// float3 MonotoneMul; // Offset: 400
// float3 MonotoneAdd; // Offset: 416
// float3 BloomParams; // Offset: 432
// float perfCheckValue; // Offset: 444
//
// } scene; // Offset: 0 Size: 448
// bool PhyreContextSwitches; // Offset: 448 Size: 4 [unused]
// bool PhyreMaterialSwitches; // Offset: 452 Size: 4 [unused]
// float4x4 World; // Offset: 464 Size: 64 [unused]
// float GlobalTexcoordFactor; // Offset: 528 Size: 4 [unused]
//
// struct
// {
//
// float3 m_direction; // Offset: 544
// float3 m_colorIntensity; // Offset: 560
//
// } Light0; // Offset: 544 Size: 28
// float GameMaterialID; // Offset: 572 Size: 4 [unused]
// = 0x00000000
// float4 GameMaterialDiffuse; // Offset: 576 Size: 16
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 GameMaterialEmission; // Offset: 592 Size: 16
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float GameMaterialMonotone; // Offset: 608 Size: 4
// = 0x00000000
// float4 GameMaterialTexcoord; // Offset: 624 Size: 16 [unused]
// = 0x00000000 0x00000000 0x3f800000 0x3f800000
// float4 UVaMUvColor; // Offset: 640 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 UVaProjTexcoord; // Offset: 656 Size: 16 [unused]
// = 0x00000000 0x00000000 0x3f800000 0x3f800000
// float4 UVaMUvTexcoord; // Offset: 672 Size: 16 [unused]
// = 0x00000000 0x00000000 0x3f800000 0x3f800000
// float4 UVaMUv2Texcoord; // Offset: 688 Size: 16 [unused]
// = 0x00000000 0x00000000 0x3f800000 0x3f800000
// float4 UVaDuDvTexcoord; // Offset: 704 Size: 16 [unused]
// = 0x00000000 0x00000000 0x3f800000 0x3f800000
// float Shininess; // Offset: 720 Size: 4
// = 0x3f000000
// float SpecularPower; // Offset: 724 Size: 4
// = 0x42480000
// float CubeMapIntensity; // Offset: 728 Size: 4
// = 0x3f800000
// float CubeMapFresnel; // Offset: 732 Size: 4 [unused]
// = 0x00000000
// float BloomIntensity; // Offset: 736 Size: 4
// = 0x3f800000
// float4 PointLightParams; // Offset: 752 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 PointLightColor; // Offset: 768 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// LinearClampSamplerState sampler NA NA 0 1
// DiffuseMapSamplerSampler sampler NA NA 1 1
// DiffuseMapSampler texture float4 2d 0 1
// CubeMapSampler texture float4 cube 1 1
// $Globals cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// COLOR 0 xyzw 1 NONE float xyz
// COLOR 1 xyzw 2 NONE float w
// TEXCOORD 0 xy 3 NONE float xy
// TEXCOORD 1 xyzw 4 NONE float xyz
// TEXCOORD 4 xyz 5 NONE float xyz
// TEXCOORD 7 xyzw 6 NONE float xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_4_1
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[47], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texturecube (float,float,float,float) t1
dcl_input_ps linear v1.xyz
dcl_input_ps linear v2.w
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyz
dcl_input_ps linear v6.xyzw
dcl_output o0.xyzw
dcl_temps 3
add r0.xyz, -v4.xyzx, cb0[0].xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mad r0.xyz, r0.xyzx, r0.wwww, cb0[20].xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
dp3 r0.w, v5.xyzx, v5.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, v5.xyzx
dp3_sat r0.x, r1.xyzx, r0.xyzx
log r0.x, r0.x
mul r0.x, r0.x, cb0[45].y
exp r0.x, r0.x
min r0.x, r0.x, l(1.000000)
mul r0.x, r0.x, cb0[45].x
mul r0.xyz, r0.xxxx, cb0[35].xyzx
max r0.w, cb0[35].y, cb0[35].x
max r1.x, cb0[35].z, l(0.001000)
max r0.w, r0.w, r1.x
div r1.xyz, cb0[35].xyzx, r0.wwww
mul r1.xyz, r1.xyzx, cb0[37].wwww
min r1.xyz, r1.xyzx, l(1.500000, 1.500000, 1.500000, 0.000000)
mad r0.xyz, r0.xyzx, cb0[37].wwww, r1.xyzx
max r0.xyz, r0.xyzx, cb0[19].xyzx
mul r0.xyz, r0.xyzx, v1.xyzx
dp3 r0.w, v6.xyzx, v6.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, v6.xyzx
sample r1.xyz, r1.xyzx, t1.xyzw, s0
sample r2.xyz, v3.xyxx, t0.xyzw, s1
add r1.xyz, r1.xyzx, -r2.xyzx
mul r0.w, v6.w, cb0[45].z
mad r1.xyz, r0.wwww, r1.xyzx, r2.xyzx
mul r0.xyz, r0.xyzx, r1.xyzx
mad r0.xyz, r0.xyzx, cb0[36].xyzx, cb0[37].xyzx
add r1.xyz, -r0.xyzx, cb0[21].xyzx
mad r0.xyz, v2.wwww, r1.xyzx, r0.xyzx
dp3 r0.w, r0.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
mad r1.xyz, r0.wwww, cb0[25].xyzx, cb0[26].xyzx
add r1.xyz, -r0.xyzx, r1.xyzx
mad r0.xyz, cb0[38].xxxx, r1.xyzx, r0.xyzx
add r1.xyz, -r0.xyzx, l(0.000000, 1.000000, 0.000000, 0.000000)
mad r0.xyz, cb0[27].wwww, r1.xyzx, r0.xyzx
mul r1.xyz, r0.xyzx, cb0[46].xxxx
mov o0.xyz, r0.xyzx
mul r0.xyz, r1.xyzx, cb0[27].yyyy
dp3 r0.x, r0.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
add r0.x, r0.x, -cb0[24].z
max r0.x, r0.x, l(0.000000)
mul r0.x, r0.x, l(0.500000)
min o0.w, r0.x, l(1.000000)
ret
// Approximately 53 instruction slots used

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



If there's any standard formula that can help make these reflections be at full depth easily, please tell me.

Games that do this right (by their own developers) are Doom 3 BFG Edition and Deus Ex Mankind Divided.

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 09/27/2018 09:48 PM   
Nevermind. I got the hang of it. I also had to stereoize the z component, just like with the parallax occlusion mapping stereoization in Star Ocean. [code] r10.xyz=r1.xyz; r1.x-=stereo.x*r10.z*stereo.y*0.065; r1.z+=stereo.x*r10.x*stereo.y*0.065; [/code] Now the reflections are a lot better :). It gives you the impression that there is something out there, instead of a texture pasted on the window/mirror/floor that moves at an unnatural rotation speed.
Nevermind. I got the hang of it. I also had to stereoize the z component, just like with the parallax occlusion mapping stereoization in Star Ocean.

r10.xyz=r1.xyz;
r1.x-=stereo.x*r10.z*stereo.y*0.065;
r1.z+=stereo.x*r10.x*stereo.y*0.065;


Now the reflections are a lot better :). It gives you the impression that there is something out there, instead of a texture pasted on the window/mirror/floor that moves at an unnatural rotation speed.

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 09/28/2018 03:23 PM   
Does Anyone have a problem if i will write a tutorial how to fix HUD in detail???? This is something i can mange with my given time and give some input to the community....
Does Anyone have a problem if i will write a tutorial how to fix HUD in detail???? This is something i can mange with my given time and give some input to the community....

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

Posted 10/17/2018 05:09 PM   
Do what you want :p. Will it cover what to do when two HUD shaders share some textures but not others and you end up with double depth applied to them, then having to do lots of texture overrides and then getting angry at the game? (my experience with Dragon Ball FighterZ. Yeah, I'm working on that game too.)
Do what you want :p. Will it cover what to do when two HUD shaders share some textures but not others and you end up with double depth applied to them, then having to do lots of texture overrides and then getting angry at the game? (my experience with Dragon Ball FighterZ. Yeah, I'm working on that game too.)

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 10/18/2018 07:43 AM   
[quote="masterotaku"]Do what you want :p. Will it cover what to do when two HUD shaders share some textures but not others and you end up with double depth applied to them, then having to do lots of texture overrides and then getting angry at the game? (my experience with Dragon Ball FighterZ. Yeah, I'm working on that game too.)[/quote] Yes it will :-) ... Individual texture overrides to move parts separately ... but i have to see how much in detail this is going. I cannot consider any possible case of a broken HUD ^^
masterotaku said:Do what you want :p. Will it cover what to do when two HUD shaders share some textures but not others and you end up with double depth applied to them, then having to do lots of texture overrides and then getting angry at the game? (my experience with Dragon Ball FighterZ. Yeah, I'm working on that game too.)


Yes it will :-) ... Individual texture overrides to move parts separately ... but i have to see how much in detail this is going. I cannot consider any possible case of a broken HUD ^^

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

Posted 10/18/2018 03:00 PM   
//skip this its solved
//skip this its solved

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

Posted 11/11/2018 01:02 PM   
Hey Guys, I am looking at fixing the Beta version of Elite Dangerous and I have been successful up until know.. Currently I am using DJ-RK's Fix as a template and it worked good so far.. But I currently am looking at the Shader for the Nebula Milky Way in the Maia system. I went to the Release version and found this same shader and here it is. this is for the Nebulas/Milky way in the Maia sector: [code]//Nebula cbuffer cb0 : register(b0) { float4 cb0[4]; } Texture2D<float4> StereoParams : register(t125); Texture1D<float4> IniParams : register(t120); void main( float4 v0 : POSITION0, float4 v1 : TEXCOORD0, out float4 o0 : TEXCOORD0, out float4 o1 : SV_Position0) { float4 r0; uint4 bitmask, uiDest; float4 fDest; // copy value of v0 into oldv0, so we can adjust v0 for o0, and still use original value later for o1 float4 oldv0 = v0; float4 st = StereoParams.Load(0); float4 params = IniParams.Load(0); float separation = st.x; float convergence = st.y; v0.x -= separation; r0.xyzw = cb0[1].xyzw * v0.yyyy; r0.xyzw = v0.xxxx * cb0[0].xyzw + r0.xyzw; r0.xyzw = v0.zzzz * cb0[2].xyzw + r0.xyzw; o0.xyzw = v0.wwww * cb0[3].xyzw + r0.xyzw; // o1.xyzw = v0.xyww; o1.xyzw = oldv0.xyww; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) D3D Shader Disassembler // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // TEXCOORD 0 xyzw 1 NONE float // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // TEXCOORD 0 xyzw 0 NONE float xyzw // SV_Position 0 xyzw 1 POS float xyzw // vs_4_0 dcl_constantbuffer cb0[4], immediateIndexed dcl_input v0.xyzw dcl_output o0.xyzw dcl_output_siv o1.xyzw, position dcl_temps 1 mul r0.xyzw, v0.yyyy, cb0[1].xyzw mad r0.xyzw, v0.xxxx, cb0[0].xyzw, r0.xyzw mad r0.xyzw, v0.zzzz, cb0[2].xyzw, r0.xyzw mad o0.xyzw, v0.wwww, cb0[3].xyzw, r0.xyzw mov o1.xyzw, v0.xyww ret // Approximately 0 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] Now I found the same shader altho a few things where different but mainly the same.. So here is the shader for the Nebulas/Milky Way in the maia system in the Beta release: [code]//Nebula/Milky Way Beta release maia system.. // ---- Created with 3Dmigoto v1.2.54 on Sun Nov 11 21:06:20 2018 cbuffer cb0 : register(b0) { float4 cb0[4] : packoffset(c0); } Texture2D<float4> StereoParams : register(t125); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : POSITION0, float4 v1 : TEXCOORD0, out float4 o0 : TEXCOORD0, out float4 o1 : SV_Position0) { float4 r0,r1; uint4 bitmask, uiDest; float4 fDest; // copy value of v0 into oldv0, so we can adjust v0 for o0, and still use original value later for o1 float4 oldv0 = v0; float4 st = StereoParams.Load(0); float4 params = IniParams.Load(0); float separation = st.x; float convergence = st.y; v0.x -= separation; r0.xyzw = cb0[1].xyzw * v0.yyyy; r1.x = StereoParams.Load(float4(0,0,0,0)).x; r1.y = v0.x + -r1.x; r1.y = r1.x * -2 + r1.y; r0.xyzw = r1.yyyy * cb0[0].xyzw + r0.xyzw; r0.xyzw = v0.zzzz * cb0[2].xyzw + r0.xyzw; r0.xyzw = v0.wwww * cb0[3].xyzw + r0.xyzw; o0.x = r1.x * 0.99000001 + r0.x; o0.yzw = r0.yzw; // o1.xyzw = v0.xyww; o1.xyzw = oldv0.xyww; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789 // // using 3Dmigoto v1.2.54 on Sun Nov 11 21:06:20 2018 // // // Buffer Definitions: // // cbuffer cb0 // { // // float4 cb0[4]; // Offset: 0 Size: 64 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // StereoParams texture float4 2d 125 1 // cb0 cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // TEXCOORD 0 xyzw 1 NONE float // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // TEXCOORD 0 xyzw 0 NONE float xyzw // SV_Position 0 xyzw 1 POS float xyzw // vs_4_1 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[4], immediateIndexed dcl_resource_texture2d (float,float,float,float) t125 dcl_input v0.xyzw dcl_output o0.xyzw dcl_output_siv o1.xyzw, position dcl_temps 2 mul r0.xyzw, v0.yyyy, cb0[1].xyzw ld r1.x, l(0, 0, 0, 0), t125.xyzw add r1.y, -r1.x, v0.x mad r1.y, r1.x, l(-2.000000), r1.y mad r0.xyzw, r1.yyyy, cb0[0].xyzw, r0.xyzw mad r0.xyzw, v0.zzzz, cb0[2].xyzw, r0.xyzw mad r0.xyzw, v0.wwww, cb0[3].xyzw, r0.xyzw mad o0.x, r1.x, l(0.990000), r0.x mov o0.yzw, r0.yyzw mov o1.xyzw, v0.xyww ret // Approximately 11 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] I will put the files below incase you would want a closer inspection.. I tried various things that seemed should have worked but did not.. Now a further note I did get it at 1 point to separate but it was double the normal separation and could not figure out how to reduce it to make it normal.. So at some point I did almost get it working just not properly but it was separated but way too much.. Will appreciate some help on this one as I don't understand why for the most part it does nothing at all..
Hey Guys,

I am looking at fixing the Beta version of Elite Dangerous and I have been successful up until know..

Currently I am using DJ-RK's Fix as a template and it worked good so far.. But I currently am looking at the Shader for the Nebula Milky Way in the Maia system.

I went to the Release version and found this same shader and here it is. this is for the Nebulas/Milky way in the Maia sector:


//Nebula

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


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
float4 v0 : POSITION0,
float4 v1 : TEXCOORD0,
out float4 o0 : TEXCOORD0,
out float4 o1 : SV_Position0)
{
float4 r0;
uint4 bitmask, uiDest;
float4 fDest;

// copy value of v0 into oldv0, so we can adjust v0 for o0, and still use original value later for o1
float4 oldv0 = v0;
float4 st = StereoParams.Load(0);
float4 params = IniParams.Load(0);
float separation = st.x; float convergence = st.y;
v0.x -= separation;

r0.xyzw = cb0[1].xyzw * v0.yyyy;
r0.xyzw = v0.xxxx * cb0[0].xyzw + r0.xyzw;
r0.xyzw = v0.zzzz * cb0[2].xyzw + r0.xyzw;
o0.xyzw = v0.wwww * cb0[3].xyzw + r0.xyzw;
// o1.xyzw = v0.xyww;
o1.xyzw = oldv0.xyww;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
// TEXCOORD 0 xyzw 1 NONE float
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD 0 xyzw 0 NONE float xyzw
// SV_Position 0 xyzw 1 POS float xyzw
//
vs_4_0
dcl_constantbuffer cb0[4], immediateIndexed
dcl_input v0.xyzw
dcl_output o0.xyzw
dcl_output_siv o1.xyzw, position
dcl_temps 1
mul r0.xyzw, v0.yyyy, cb0[1].xyzw
mad r0.xyzw, v0.xxxx, cb0[0].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[2].xyzw, r0.xyzw
mad o0.xyzw, v0.wwww, cb0[3].xyzw, r0.xyzw
mov o1.xyzw, v0.xyww
ret
// Approximately 0 instruction slots used

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




Now I found the same shader altho a few things where different but mainly the same.. So here is the shader for the Nebulas/Milky Way in the maia system in the Beta release:



//Nebula/Milky Way Beta release maia system..
// ---- Created with 3Dmigoto v1.2.54 on Sun Nov 11 21:06:20 2018

cbuffer cb0 : register(b0)
{
float4 cb0[4] : packoffset(c0);
}

Texture2D<float4> StereoParams : register(t125);


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


void main(
float4 v0 : POSITION0,
float4 v1 : TEXCOORD0,
out float4 o0 : TEXCOORD0,
out float4 o1 : SV_Position0)
{
float4 r0,r1;
uint4 bitmask, uiDest;
float4 fDest;

// copy value of v0 into oldv0, so we can adjust v0 for o0, and still use original value later for o1
float4 oldv0 = v0;
float4 st = StereoParams.Load(0);
float4 params = IniParams.Load(0);
float separation = st.x; float convergence = st.y;
v0.x -= separation;

r0.xyzw = cb0[1].xyzw * v0.yyyy;
r1.x = StereoParams.Load(float4(0,0,0,0)).x;
r1.y = v0.x + -r1.x;
r1.y = r1.x * -2 + r1.y;
r0.xyzw = r1.yyyy * cb0[0].xyzw + r0.xyzw;
r0.xyzw = v0.zzzz * cb0[2].xyzw + r0.xyzw;
r0.xyzw = v0.wwww * cb0[3].xyzw + r0.xyzw;
o0.x = r1.x * 0.99000001 + r0.x;
o0.yzw = r0.yzw;
// o1.xyzw = v0.xyww;

o1.xyzw = oldv0.xyww;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
// using 3Dmigoto v1.2.54 on Sun Nov 11 21:06:20 2018
//
//
// Buffer Definitions:
//
// cbuffer cb0
// {
//
// float4 cb0[4]; // Offset: 0 Size: 64
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// StereoParams texture float4 2d 125 1
// cb0 cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
// TEXCOORD 0 xyzw 1 NONE float
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD 0 xyzw 0 NONE float xyzw
// SV_Position 0 xyzw 1 POS float xyzw
//
vs_4_1
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[4], immediateIndexed
dcl_resource_texture2d (float,float,float,float) t125
dcl_input v0.xyzw
dcl_output o0.xyzw
dcl_output_siv o1.xyzw, position
dcl_temps 2
mul r0.xyzw, v0.yyyy, cb0[1].xyzw
ld r1.x, l(0, 0, 0, 0), t125.xyzw
add r1.y, -r1.x, v0.x
mad r1.y, r1.x, l(-2.000000), r1.y
mad r0.xyzw, r1.yyyy, cb0[0].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[2].xyzw, r0.xyzw
mad r0.xyzw, v0.wwww, cb0[3].xyzw, r0.xyzw
mad o0.x, r1.x, l(0.990000), r0.x
mov o0.yzw, r0.yyzw
mov o1.xyzw, v0.xyww
ret
// Approximately 11 instruction slots used

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



I will put the files below incase you would want a closer inspection.. I tried various things that seemed should have worked but did not.. Now a further note I did get it at 1 point to separate but it was double the normal separation and could not figure out how to reduce it to make it normal..

So at some point I did almost get it working just not properly but it was separated but way too much..

Will appreciate some help on this one as I don't understand why for the most part it does nothing at all..

Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit

Posted 11/12/2018 02:19 AM   
  83 / 88    
Scroll To Top