Nier Automata
  4 / 10    
Is it easy to adjust hud to fixed depth... I'll post the HUD shader... as soon as I don't die (I'm trying to beat it in hard). Hopefully by looking at what you guys are doing I can figure it out too. The shadow fix is pretty good. Is that the only shadow shader fixed. 40285a8c8fd28555-ps_replace or is there another one. There's some other minor effects issues I will look at. But I must beat it in hard mode :P!
Is it easy to adjust hud to fixed depth... I'll post the HUD shader... as soon as I don't die (I'm trying to beat it in hard).

Hopefully by looking at what you guys are doing I can figure it out too.


The shadow fix is pretty good. Is that the only shadow shader fixed.

40285a8c8fd28555-ps_replace

or is there another one.

There's some other minor effects issues I will look at. But I must beat it in hard mode :P!

I'm ishiki, forum screwed up my name.

7700k @4.7 GHZ, 16GBDDR4@3466MHZ, 2080 Ti

#46
Posted 03/19/2017 04:29 AM   
[quote="ishiki"]I'm having trouble disabling shaders. I've done it once before. I think DXHRDC before fix was done. But I keep getting the boop sound that I think means the shader isn't loading? Does that make sense? in d3dx I'm writing [Shadows1] Hash=345160567d287bb4 Handling=skip [Shadows2] Hash=36b610492da984ca Handling=skip [Shadows3] Hash=a3a79eb435339549 Handling=skip and then in shaders I go to void main {} and then type discard afterwards.[/quote] Hi ishiki. If you're skipping the shader in the d3dx.ini file, you don't need to add discard to the shaders. Also the discard function only works with pixel shaders and is placed in the shader body like in the below example: [code]// ---- Created with 3Dmigoto v1.2.56 on Fri Mar 17 09:02:11 2017 Texture2D<float4> t3 : register(t3); Texture2D<float4> t2 : register(t2); Texture2D<float4> t1 : register(t1); Texture2D<float4> t0 : register(t0); SamplerState s3_s : register(s3); SamplerState s2_s : register(s2); SamplerState s1_s : register(s1); SamplerState s0_s : register(s0); cbuffer cb1 : register(b1) { float4 cb1[117]; } cbuffer cb0 : register(b0) { float4 cb0[32]; } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_POSITION0, out float4 o0 : SV_Target0) { float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15; uint4 bitmask, uiDest; float4 fDest; //---add discard here--- discard; r0.xy = cb1[116].zw * v0.xy; r0.z = t2.SampleLevel(s2_s, r0.xy, 0).x; r0.w = r0.z * cb1[51].x + cb1[51].y; r0.z = r0.z * cb1[51].z + -cb1[51].w; r0.z = 1 / r0.z; r0.z = r0.w + r0.z; r1.xy = v0.xy * cb1[116].zw + -cb1[52].wz; r1.xy = r1.xy / cb1[52].xy; r1.xy = r1.xy * r0.zz; .. ..etc[/code] You can also experiment by setting one or more SV_Targets to 0 near the end of the shader.
ishiki said:I'm having trouble disabling shaders. I've done it once before. I think DXHRDC before fix was done.

But I keep getting the boop sound that I think means the shader isn't loading?

Does that make sense?

in d3dx I'm writing

[Shadows1]
Hash=345160567d287bb4
Handling=skip

[Shadows2]
Hash=36b610492da984ca
Handling=skip

[Shadows3]
Hash=a3a79eb435339549
Handling=skip

and then in shaders I go to void main {} and then type discard afterwards.


Hi ishiki. If you're skipping the shader in the d3dx.ini file, you don't need to add discard to the shaders. Also the discard function only works with pixel shaders and is placed in the shader body like in the below example:

// ---- Created with 3Dmigoto v1.2.56 on Fri Mar 17 09:02:11 2017
Texture2D<float4> t3 : register(t3);

Texture2D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s3_s : register(s3);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb1 : register(b1)
{
float4 cb1[117];
}

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




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


void main(
float4 v0 : SV_POSITION0,
out float4 o0 : SV_Target0)
{
float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15;
uint4 bitmask, uiDest;
float4 fDest;

//---add discard here---
discard;
r0.xy = cb1[116].zw * v0.xy;
r0.z = t2.SampleLevel(s2_s, r0.xy, 0).x;
r0.w = r0.z * cb1[51].x + cb1[51].y;
r0.z = r0.z * cb1[51].z + -cb1[51].w;
r0.z = 1 / r0.z;
r0.z = r0.w + r0.z;
r1.xy = v0.xy * cb1[116].zw + -cb1[52].wz;
r1.xy = r1.xy / cb1[52].xy;
r1.xy = r1.xy * r0.zz;
..
..etc


You can also experiment by setting one or more SV_Targets to 0 near the end of the shader.

Dual boot Win 7 x64 & Win 10 (1809) | Geforce Drivers 417.35

#47
Posted 03/19/2017 06:41 AM   
Thank you for information 4everawak. That is helpful For anyone. This is the HUD shader.... I will also try to do the same for cinematics how would you put this into depth? Or is it quite difficult. I am trying to learn through watching. I've done coding in C++, Python, Matlab so I have some ideas.. But I'm a mechanical engineer :P. There's a couple things I'm trying to do 1) There's atleast 2 shadow shaders that are broken sgsrules fixed that. 2) There's 2 or 3 HUD shaders. I want to Push them into depth. (I currently disable them). 3) Push Cutscenes into depth. 4) Disable Bloom Shader (I did this for me, I don't like the bloom in this game). 4) Theres some culling around very few amount of lights like in older Hitman fixes... I'm not sure I'm not going to try to fix that. [code]// ---- Created with 3Dmigoto v1.2.56 on Sun Mar 19 03:58:50 2017 SamplerState g_ColorTextureSampler_s : register(s0); SamplerState g_MaskTextureSampler_s : register(s1); Texture2D<float4> g_ColorTexture : register(t0); Texture2D<float4> g_MaskTexture : register(t1); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_POSITION0, float2 v1 : TEXCOORD0, float2 w1 : TEXCOORD1, float4 v2 : TEXCOORD2, float4 v3 : COLOR0, float4 v4 : COLOR1, float4 v5 : COLOR2, float4 v6 : COLOR3, out float4 o0 : SV_Target0) { float4 r0,r1,r2,r3; uint4 bitmask, uiDest; float4 fDest; r0.xy = -v2.yy + v1.xy; r0.xy = -v2.zz + r0.xy; r0.xy = saturate(r0.xy / v2.ww); r0.z = cmp(v2.x >= 0.5); r0.z = r0.z ? 1.000000 : 0; r0.y = r0.y * r0.z; r0.w = cmp(-0.5 >= v2.x); r0.w = r0.w ? 1.000000 : 0; r0.x = r0.x * r0.w + r0.y; r0.y = r0.w + r0.z; r0.y = 1 + -r0.y; r1.xyzw = v5.xyzw + -v4.xyzw; r1.xyzw = r0.xxxx * r1.xyzw + v4.xyzw; r2.xyzw = v4.xyzw + -r1.xyzw; r0.xyzw = r0.yyyy * r2.xyzw + r1.xyzw; r1.xyzw = g_ColorTexture.Sample(g_ColorTextureSampler_s, v1.xy).xyzw; r2.x = r1.x + r1.y; r2.x = r2.x + r1.z; r2.x = r2.x * 0.333333343 + -r1.w; r2.yzw = cmp(v6.xyz >= float3(0.100000001,0.100000001,0.100000001)); r2.yzw = r2.yzw ? float3(1,1,1) : 0; r1.w = r2.z * r2.x + r1.w; r2.x = 1 + -r1.w; r3.w = r2.w * r2.x + r1.w; r2.xzw = float3(1,1,1) + -r1.xyz; r3.xyz = r2.yyy * r2.xzw + r1.xyz; r1.xyzw = v3.xyzw * r3.xyzw; r0.xyzw = r1.xyzw * r0.xyzw; r1.x = g_MaskTexture.Sample(g_MaskTextureSampler_s, w1.xy).w; r1.y = r0.w * r1.x + -0.00392156886; r0.w = r1.x * r0.w; o0.xyzw = r0.xyzw; r0.x = cmp(r1.y < 0); if (r0.x != 0) discard; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // using 3Dmigoto v1.2.56 on Sun Mar 19 03:58:50 2017 // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // g_ColorTextureSampler sampler NA NA 0 1 // g_MaskTextureSampler sampler NA NA 1 1 // g_ColorTexture texture float4 2d 0 1 // g_MaskTexture texture float4 2d 1 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_POSITION 0 xyzw 0 POS float // TEXCOORD 0 xy 1 NONE float xy // TEXCOORD 1 zw 1 NONE float zw // TEXCOORD 2 xyzw 2 NONE float xyzw // COLOR 0 xyzw 3 NONE float xyzw // COLOR 1 xyzw 4 NONE float xyzw // COLOR 2 xyzw 5 NONE float xyzw // COLOR 3 xyzw 6 NONE float xyz // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Target 0 xyzw 0 TARGET float xyzw // ps_5_0 dcl_globalFlags refactoringAllowed dcl_sampler s0, mode_default dcl_sampler s1, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 dcl_input_ps linear v1.xy dcl_input_ps linear v1.zw dcl_input_ps linear v2.xyzw dcl_input_ps linear v3.xyzw dcl_input_ps linear v4.xyzw dcl_input_ps linear v5.xyzw dcl_input_ps linear v6.xyz dcl_output o0.xyzw dcl_temps 4 add r0.xy, v1.xyxx, -v2.yyyy add r0.xy, r0.xyxx, -v2.zzzz div_sat r0.xy, r0.xyxx, v2.wwww ge r0.z, v2.x, l(0.500000) and r0.z, r0.z, l(0x3f800000) mul r0.y, r0.z, r0.y ge r0.w, l(-0.500000), v2.x and r0.w, r0.w, l(0x3f800000) mad r0.x, r0.x, r0.w, r0.y add r0.y, r0.z, r0.w add r0.y, -r0.y, l(1.000000) add r1.xyzw, -v4.xyzw, v5.xyzw mad r1.xyzw, r0.xxxx, r1.xyzw, v4.xyzw add r2.xyzw, -r1.xyzw, v4.xyzw mad r0.xyzw, r0.yyyy, r2.xyzw, r1.xyzw sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v1.xyxx, t0.xyzw, s0 add r2.x, r1.y, r1.x add r2.x, r1.z, r2.x mad r2.x, r2.x, l(0.333333343), -r1.w ge r2.yzw, v6.xxyz, l(0.000000, 0.100000, 0.100000, 0.100000) and r2.yzw, r2.yyzw, l(0, 0x3f800000, 0x3f800000, 0x3f800000) mad r1.w, r2.z, r2.x, r1.w add r2.x, -r1.w, l(1.000000) mad r3.w, r2.w, r2.x, r1.w add r2.xzw, -r1.xxyz, l(1.000000, 0.000000, 1.000000, 1.000000) mad r3.xyz, r2.yyyy, r2.xzwx, r1.xyzx mul r1.xyzw, r3.xyzw, v3.xyzw mul r0.xyzw, r0.xyzw, r1.xyzw sample_indexable(texture2d)(float,float,float,float) r1.x, v1.zwzz, t1.wxyz, s1 mad r1.y, r0.w, r1.x, l(-0.00392156886) mul r0.w, r0.w, r1.x mov o0.xyzw, r0.xyzw lt r0.x, r1.y, l(0.000000) discard_nz r0.x ret // Approximately 35 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/[/code]
Thank you for information 4everawak. That is helpful


For anyone.

This is the HUD shader.... I will also try to do the same for cinematics
how would you put this into depth? Or is it quite difficult. I am trying to learn through watching.
I've done coding in C++, Python, Matlab so I have some ideas.. But I'm a mechanical engineer :P.

There's a couple things I'm trying to do
1) There's atleast 2 shadow shaders that are broken sgsrules fixed that.
2) There's 2 or 3 HUD shaders. I want to Push them into depth. (I currently disable them).
3) Push Cutscenes into depth.
4) Disable Bloom Shader (I did this for me, I don't like the bloom in this game).

4) Theres some culling around very few amount of lights like in older Hitman fixes... I'm not sure I'm not going to try to fix that.


// ---- Created with 3Dmigoto v1.2.56 on Sun Mar 19 03:58:50 2017

SamplerState g_ColorTextureSampler_s : register(s0);
SamplerState g_MaskTextureSampler_s : register(s1);
Texture2D<float4> g_ColorTexture : register(t0);
Texture2D<float4> g_MaskTexture : register(t1);


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


void main(
float4 v0 : SV_POSITION0,
float2 v1 : TEXCOORD0,
float2 w1 : TEXCOORD1,
float4 v2 : TEXCOORD2,
float4 v3 : COLOR0,
float4 v4 : COLOR1,
float4 v5 : COLOR2,
float4 v6 : COLOR3,
out float4 o0 : SV_Target0)
{
float4 r0,r1,r2,r3;
uint4 bitmask, uiDest;
float4 fDest;

r0.xy = -v2.yy + v1.xy;
r0.xy = -v2.zz + r0.xy;
r0.xy = saturate(r0.xy / v2.ww);
r0.z = cmp(v2.x >= 0.5);
r0.z = r0.z ? 1.000000 : 0;
r0.y = r0.y * r0.z;
r0.w = cmp(-0.5 >= v2.x);
r0.w = r0.w ? 1.000000 : 0;
r0.x = r0.x * r0.w + r0.y;
r0.y = r0.w + r0.z;
r0.y = 1 + -r0.y;
r1.xyzw = v5.xyzw + -v4.xyzw;
r1.xyzw = r0.xxxx * r1.xyzw + v4.xyzw;
r2.xyzw = v4.xyzw + -r1.xyzw;
r0.xyzw = r0.yyyy * r2.xyzw + r1.xyzw;
r1.xyzw = g_ColorTexture.Sample(g_ColorTextureSampler_s, v1.xy).xyzw;
r2.x = r1.x + r1.y;
r2.x = r2.x + r1.z;
r2.x = r2.x * 0.333333343 + -r1.w;
r2.yzw = cmp(v6.xyz >= float3(0.100000001,0.100000001,0.100000001));
r2.yzw = r2.yzw ? float3(1,1,1) : 0;
r1.w = r2.z * r2.x + r1.w;
r2.x = 1 + -r1.w;
r3.w = r2.w * r2.x + r1.w;
r2.xzw = float3(1,1,1) + -r1.xyz;
r3.xyz = r2.yyy * r2.xzw + r1.xyz;
r1.xyzw = v3.xyzw * r3.xyzw;
r0.xyzw = r1.xyzw * r0.xyzw;
r1.x = g_MaskTexture.Sample(g_MaskTextureSampler_s, w1.xy).w;
r1.y = r0.w * r1.x + -0.00392156886;
r0.w = r1.x * r0.w;
o0.xyzw = r0.xyzw;
r0.x = cmp(r1.y < 0);
if (r0.x != 0) discard;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// using 3Dmigoto v1.2.56 on Sun Mar 19 03:58:50 2017
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// g_ColorTextureSampler sampler NA NA 0 1
// g_MaskTextureSampler sampler NA NA 1 1
// g_ColorTexture texture float4 2d 0 1
// g_MaskTexture texture float4 2d 1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
// TEXCOORD 1 zw 1 NONE float zw
// TEXCOORD 2 xyzw 2 NONE float xyzw
// COLOR 0 xyzw 3 NONE float xyzw
// COLOR 1 xyzw 4 NONE float xyzw
// COLOR 2 xyzw 5 NONE float xyzw
// COLOR 3 xyzw 6 NONE float xyz
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps linear v1.xy
dcl_input_ps linear v1.zw
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xyzw
dcl_input_ps linear v4.xyzw
dcl_input_ps linear v5.xyzw
dcl_input_ps linear v6.xyz
dcl_output o0.xyzw
dcl_temps 4
add r0.xy, v1.xyxx, -v2.yyyy
add r0.xy, r0.xyxx, -v2.zzzz
div_sat r0.xy, r0.xyxx, v2.wwww
ge r0.z, v2.x, l(0.500000)
and r0.z, r0.z, l(0x3f800000)
mul r0.y, r0.z, r0.y
ge r0.w, l(-0.500000), v2.x
and r0.w, r0.w, l(0x3f800000)
mad r0.x, r0.x, r0.w, r0.y
add r0.y, r0.z, r0.w
add r0.y, -r0.y, l(1.000000)
add r1.xyzw, -v4.xyzw, v5.xyzw
mad r1.xyzw, r0.xxxx, r1.xyzw, v4.xyzw
add r2.xyzw, -r1.xyzw, v4.xyzw
mad r0.xyzw, r0.yyyy, r2.xyzw, r1.xyzw
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v1.xyxx, t0.xyzw, s0
add r2.x, r1.y, r1.x
add r2.x, r1.z, r2.x
mad r2.x, r2.x, l(0.333333343), -r1.w
ge r2.yzw, v6.xxyz, l(0.000000, 0.100000, 0.100000, 0.100000)
and r2.yzw, r2.yyzw, l(0, 0x3f800000, 0x3f800000, 0x3f800000)
mad r1.w, r2.z, r2.x, r1.w
add r2.x, -r1.w, l(1.000000)
mad r3.w, r2.w, r2.x, r1.w
add r2.xzw, -r1.xxyz, l(1.000000, 0.000000, 1.000000, 1.000000)
mad r3.xyz, r2.yyyy, r2.xzwx, r1.xyzx
mul r1.xyzw, r3.xyzw, v3.xyzw
mul r0.xyzw, r0.xyzw, r1.xyzw
sample_indexable(texture2d)(float,float,float,float) r1.x, v1.zwzz, t1.wxyz, s1
mad r1.y, r0.w, r1.x, l(-0.00392156886)
mul r0.w, r0.w, r1.x
mov o0.xyzw, r0.xyzw
lt r0.x, r1.y, l(0.000000)
discard_nz r0.x
ret
// Approximately 35 instruction slots used

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

I'm ishiki, forum screwed up my name.

7700k @4.7 GHZ, 16GBDDR4@3466MHZ, 2080 Ti

#48
Posted 03/19/2017 11:04 AM   
For placing HUD or UI at a fixed depth, it's best to use vertex shaders. Then do something like this-- example VS from another game: [code]//hud floating text // ---- Created with 3Dmigoto v1.2.56 on Sat Mar 18 13:59:46 2017 cbuffer cb0 : register(b0) { float4 cb0[5]; } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : ATTRIBUTE0, float2 v1 : ATTRIBUTE1, float4 v2 : ATTRIBUTE2, float4 v3 : ATTRIBUTE3, out float4 o0 : TEXCOORD0, out float4 o1 : TEXCOORD1, out float4 o2 : TEXCOORD2, out float4 o3 : SV_POSITION0) { float4 r0; uint4 bitmask, uiDest; float4 fDest; o0.xy = v1.xy; o1.xyzw = v2.xyzw; o2.xyzw = v3.xyzw; 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; r0.xyzw = v0.wwww * cb0[3].xyzw + r0.xyzw; o3.y = cb0[4].x * r0.y; o3.xzw = r0.xzw; // pushes SV_POSITION0 into the screen. The larger the number, the more separation. float4 stereo = StereoParams.Load(0); o3.x += stereo.x * 0.5; return; }[/code]
For placing HUD or UI at a fixed depth, it's best to use vertex shaders. Then do something like this--

example VS from another game:
//hud floating text
// ---- Created with 3Dmigoto v1.2.56 on Sat Mar 18 13:59:46 2017
cbuffer cb0 : register(b0)
{
float4 cb0[5];
}




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


void main(
float4 v0 : ATTRIBUTE0,
float2 v1 : ATTRIBUTE1,
float4 v2 : ATTRIBUTE2,
float4 v3 : ATTRIBUTE3,
out float4 o0 : TEXCOORD0,
out float4 o1 : TEXCOORD1,
out float4 o2 : TEXCOORD2,
out float4 o3 : SV_POSITION0)
{
float4 r0;
uint4 bitmask, uiDest;
float4 fDest;

o0.xy = v1.xy;
o1.xyzw = v2.xyzw;
o2.xyzw = v3.xyzw;
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;
r0.xyzw = v0.wwww * cb0[3].xyzw + r0.xyzw;
o3.y = cb0[4].x * r0.y;
o3.xzw = r0.xzw;

// pushes SV_POSITION0 into the screen. The larger the number, the more separation.
float4 stereo = StereoParams.Load(0);
o3.x += stereo.x * 0.5;

return;
}

Dual boot Win 7 x64 & Win 10 (1809) | Geforce Drivers 417.35

#49
Posted 03/19/2017 01:06 PM   
hello I've tried all of the o1, o2, o3, o4, o5, o6. doing the o3.x += stereo.x*.5 and you end up with HUD elements scrambled. Sorry I have no idea what I'm doing. I'm trying to figure this out. [code] // ---- Created with 3Dmigoto v1.2.56 on Sun Mar 19 14:00:07 2017 cbuffer SceneBuffer : register(b0) { float4x4 g_View : packoffset(c0); float4x4 g_Proj : packoffset(c4); float4x4 g_ViewProjection : packoffset(c8); float4x4 g_ViewInverseMatrix : packoffset(c12); } cbuffer cbUIParam : register(b1) { float4x4 g_WorldMatrix : packoffset(c0); float4 g_Color0 : packoffset(c4); float4 g_Color1 : packoffset(c5); float4 g_DispRate : packoffset(c6); float4 g_DisplaySize : packoffset(c7); float4 g_FreeParam : packoffset(c8); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : POSITION0, float4 v1 : TEXCOORD0, float4 v2 : TEXCOORD1, float4 v3 : COLOR0, out float4 o0 : SV_POSITION0, out float2 o1 : TEXCOORD0, out float2 p1 : TEXCOORD1, out float4 o2 : TEXCOORD2, out float4 o3 : COLOR0, out float4 o4 : COLOR1, out float4 o5 : COLOR2, out float4 o6 : COLOR3) { float4 r0,r1; uint4 bitmask, uiDest; float4 fDest; o0.z = 0; r0.x = dot(v0.xyzw, g_WorldMatrix._m00_m10_m20_m30); r0.y = dot(v0.xyzw, g_WorldMatrix._m01_m11_m21_m31); r0.z = dot(v0.xyzw, g_WorldMatrix._m02_m12_m22_m32); r0.w = dot(v0.xyzw, g_WorldMatrix._m03_m13_m23_m33); r1.x = dot(r0.xyzw, g_ViewProjection._m00_m10_m20_m30); r1.y = dot(r0.xyzw, g_ViewProjection._m01_m11_m21_m31); o0.w = dot(r0.xyzw, g_ViewProjection._m03_m13_m23_m33); o0.xy = r1.xy; r0.xyz = float3(1,-1,1) + r1.xxy; r0.w = 1 + -r1.y; r0.yz = r0.yz / g_FreeParam.xy; r0.xyzw = g_FreeParam.zwwz * r0.xyzw; p1.x = r0.x * 0.5 + r0.y; p1.y = r0.w * 0.5 + r0.z; o1.xy = v1.xy; o2.xyzw = v2.xyzw; o3.xyzw = v3.xyzw; o4.xyzw = g_Color0.xyzw; o5.xyzw = g_Color1.xyzw; o6.xyzw = g_DispRate.xyzw; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // using 3Dmigoto v1.2.56 on Sun Mar 19 14:00:07 2017 // // // Buffer Definitions: // // cbuffer SceneBuffer // { // // float4x4 g_View; // Offset: 0 Size: 64 [unused] // float4x4 g_Proj; // Offset: 64 Size: 64 [unused] // float4x4 g_ViewProjection; // Offset: 128 Size: 64 // float4x4 g_ViewInverseMatrix; // Offset: 192 Size: 64 [unused] // // } // // cbuffer cbUIParam // { // // float4x4 g_WorldMatrix; // Offset: 0 Size: 64 // float4 g_Color0; // Offset: 64 Size: 16 // float4 g_Color1; // Offset: 80 Size: 16 // float4 g_DispRate; // Offset: 96 Size: 16 // float4 g_DisplaySize; // Offset: 112 Size: 16 [unused] // float4 g_FreeParam; // Offset: 128 Size: 16 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // SceneBuffer cbuffer NA NA 0 1 // cbUIParam cbuffer NA NA 1 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // TEXCOORD 0 xyzw 1 NONE float xy // TEXCOORD 1 xyzw 2 NONE float xyzw // COLOR 0 xyzw 3 NONE float xyzw // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_POSITION 0 xyzw 0 POS float xyzw // TEXCOORD 0 xy 1 NONE float xy // TEXCOORD 1 zw 1 NONE float zw // TEXCOORD 2 xyzw 2 NONE float xyzw // COLOR 0 xyzw 3 NONE float xyzw // COLOR 1 xyzw 4 NONE float xyzw // COLOR 2 xyzw 5 NONE float xyzw // COLOR 3 xyzw 6 NONE float xyzw // vs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[12], immediateIndexed dcl_constantbuffer cb1[9], immediateIndexed dcl_input v0.xyzw dcl_input v1.xy dcl_input v2.xyzw dcl_input v3.xyzw dcl_output_siv o0.xyzw, position dcl_output o1.xy dcl_output o1.zw dcl_output o2.xyzw dcl_output o3.xyzw dcl_output o4.xyzw dcl_output o5.xyzw dcl_output o6.xyzw dcl_temps 2 mov o0.z, l(0) dp4 r0.x, v0.xyzw, cb1[0].xyzw dp4 r0.y, v0.xyzw, cb1[1].xyzw dp4 r0.z, v0.xyzw, cb1[2].xyzw dp4 r0.w, v0.xyzw, cb1[3].xyzw dp4 r1.x, r0.xyzw, cb0[8].xyzw dp4 r1.y, r0.xyzw, cb0[9].xyzw dp4 o0.w, r0.xyzw, cb0[11].xyzw mov o0.xy, r1.xyxx add r0.xyz, r1.xxyx, l(1.000000, -1.000000, 1.000000, 0.000000) add r0.w, -r1.y, l(1.000000) div r0.yz, r0.yyzy, cb1[8].xxyx mul r0.xyzw, r0.xyzw, cb1[8].zwwz mad o1.z, r0.x, l(0.500000), r0.y mad o1.w, r0.w, l(0.500000), r0.z mov o1.xy, v1.xyxx mov o2.xyzw, v2.xyzw mov o3.xyzw, v3.xyzw mov o4.xyzw, cb1[4].xyzw mov o5.xyzw, cb1[5].xyzw mov o6.xyzw, cb1[6].xyzw ret // Approximately 22 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code]
hello

I've tried all of the o1, o2, o3, o4, o5, o6.

doing the o3.x += stereo.x*.5

and you end up with HUD elements scrambled.


Sorry I have no idea what I'm doing. I'm trying to figure this out.

// ---- Created with 3Dmigoto v1.2.56 on Sun Mar 19 14:00:07 2017

cbuffer SceneBuffer : register(b0)
{
float4x4 g_View : packoffset(c0);
float4x4 g_Proj : packoffset(c4);
float4x4 g_ViewProjection : packoffset(c8);
float4x4 g_ViewInverseMatrix : packoffset(c12);
}

cbuffer cbUIParam : register(b1)
{
float4x4 g_WorldMatrix : packoffset(c0);
float4 g_Color0 : packoffset(c4);
float4 g_Color1 : packoffset(c5);
float4 g_DispRate : packoffset(c6);
float4 g_DisplaySize : packoffset(c7);
float4 g_FreeParam : packoffset(c8);
}



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


void main(
float4 v0 : POSITION0,
float4 v1 : TEXCOORD0,
float4 v2 : TEXCOORD1,
float4 v3 : COLOR0,
out float4 o0 : SV_POSITION0,
out float2 o1 : TEXCOORD0,
out float2 p1 : TEXCOORD1,
out float4 o2 : TEXCOORD2,
out float4 o3 : COLOR0,
out float4 o4 : COLOR1,
out float4 o5 : COLOR2,
out float4 o6 : COLOR3)
{
float4 r0,r1;
uint4 bitmask, uiDest;
float4 fDest;

o0.z = 0;
r0.x = dot(v0.xyzw, g_WorldMatrix._m00_m10_m20_m30);
r0.y = dot(v0.xyzw, g_WorldMatrix._m01_m11_m21_m31);
r0.z = dot(v0.xyzw, g_WorldMatrix._m02_m12_m22_m32);
r0.w = dot(v0.xyzw, g_WorldMatrix._m03_m13_m23_m33);
r1.x = dot(r0.xyzw, g_ViewProjection._m00_m10_m20_m30);
r1.y = dot(r0.xyzw, g_ViewProjection._m01_m11_m21_m31);
o0.w = dot(r0.xyzw, g_ViewProjection._m03_m13_m23_m33);
o0.xy = r1.xy;
r0.xyz = float3(1,-1,1) + r1.xxy;
r0.w = 1 + -r1.y;
r0.yz = r0.yz / g_FreeParam.xy;
r0.xyzw = g_FreeParam.zwwz * r0.xyzw;
p1.x = r0.x * 0.5 + r0.y;
p1.y = r0.w * 0.5 + r0.z;
o1.xy = v1.xy;
o2.xyzw = v2.xyzw;
o3.xyzw = v3.xyzw;
o4.xyzw = g_Color0.xyzw;
o5.xyzw = g_Color1.xyzw;
o6.xyzw = g_DispRate.xyzw;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// using 3Dmigoto v1.2.56 on Sun Mar 19 14:00:07 2017
//
//
// Buffer Definitions:
//
// cbuffer SceneBuffer
// {
//
// float4x4 g_View; // Offset: 0 Size: 64 [unused]
// float4x4 g_Proj; // Offset: 64 Size: 64 [unused]
// float4x4 g_ViewProjection; // Offset: 128 Size: 64
// float4x4 g_ViewInverseMatrix; // Offset: 192 Size: 64 [unused]
//
// }
//
// cbuffer cbUIParam
// {
//
// float4x4 g_WorldMatrix; // Offset: 0 Size: 64
// float4 g_Color0; // Offset: 64 Size: 16
// float4 g_Color1; // Offset: 80 Size: 16
// float4 g_DispRate; // Offset: 96 Size: 16
// float4 g_DisplaySize; // Offset: 112 Size: 16 [unused]
// float4 g_FreeParam; // Offset: 128 Size: 16
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SceneBuffer cbuffer NA NA 0 1
// cbUIParam cbuffer NA NA 1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
// TEXCOORD 0 xyzw 1 NONE float xy
// TEXCOORD 1 xyzw 2 NONE float xyzw
// COLOR 0 xyzw 3 NONE float xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xyzw
// TEXCOORD 0 xy 1 NONE float xy
// TEXCOORD 1 zw 1 NONE float zw
// TEXCOORD 2 xyzw 2 NONE float xyzw
// COLOR 0 xyzw 3 NONE float xyzw
// COLOR 1 xyzw 4 NONE float xyzw
// COLOR 2 xyzw 5 NONE float xyzw
// COLOR 3 xyzw 6 NONE float xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[12], immediateIndexed
dcl_constantbuffer cb1[9], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_input v2.xyzw
dcl_input v3.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o1.zw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_temps 2
mov o0.z, l(0)
dp4 r0.x, v0.xyzw, cb1[0].xyzw
dp4 r0.y, v0.xyzw, cb1[1].xyzw
dp4 r0.z, v0.xyzw, cb1[2].xyzw
dp4 r0.w, v0.xyzw, cb1[3].xyzw
dp4 r1.x, r0.xyzw, cb0[8].xyzw
dp4 r1.y, r0.xyzw, cb0[9].xyzw
dp4 o0.w, r0.xyzw, cb0[11].xyzw
mov o0.xy, r1.xyxx
add r0.xyz, r1.xxyx, l(1.000000, -1.000000, 1.000000, 0.000000)
add r0.w, -r1.y, l(1.000000)
div r0.yz, r0.yyzy, cb1[8].xxyx
mul r0.xyzw, r0.xyzw, cb1[8].zwwz
mad o1.z, r0.x, l(0.500000), r0.y
mad o1.w, r0.w, l(0.500000), r0.z
mov o1.xy, v1.xyxx
mov o2.xyzw, v2.xyzw
mov o3.xyzw, v3.xyzw
mov o4.xyzw, cb1[4].xyzw
mov o5.xyzw, cb1[5].xyzw
mov o6.xyzw, cb1[6].xyzw
ret
// Approximately 22 instruction slots used

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

I'm ishiki, forum screwed up my name.

7700k @4.7 GHZ, 16GBDDR4@3466MHZ, 2080 Ti

#50
Posted 03/19/2017 09:42 PM   
[quote="ishiki"]hello I've tried all of the o1, o2, o3, o4, o5, o6. doing the o3.x += stereo.x*.5 and you end up with HUD elements scrambled. Sorry I have no idea what I'm doing. I'm trying to figure this out.[/quote] What about "o0"? It's the position (because it says "SV_POSITION0"). The output that contains "SV_POSITION0" is what has to be modified for HUD depth (at least in the 20 or so games that I have modified).
ishiki said:hello

I've tried all of the o1, o2, o3, o4, o5, o6.

doing the o3.x += stereo.x*.5

and you end up with HUD elements scrambled.


Sorry I have no idea what I'm doing. I'm trying to figure this out.


What about "o0"? It's the position (because it says "SV_POSITION0"). The output that contains "SV_POSITION0" is what has to be modified for HUD depth (at least in the 20 or so games that I have modified).

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

#51
Posted 03/19/2017 10:54 PM   
That works... It also worked for pushing cutscenes into depth. I also understand. I'm trying to take a picture, but i get a black image when i do alt f1. The map and many elements go into depth however, there are some textures that don't get pushed into depth. Those are still at screen depth. But I know its same shader because when I go hunting it turns everything off when i select that VS. [quote="masterotaku"][quote="ishiki"]hello I've tried all of the o1, o2, o3, o4, o5, o6. doing the o3.x += stereo.x*.5 and you end up with HUD elements scrambled. Sorry I have no idea what I'm doing. I'm trying to figure this out.[/quote] [code] // ---- Created with 3Dmigoto v1.2.56 on Sun Mar 19 22:58:57 2017 cbuffer SceneBuffer : register(b0) { float4x4 g_View : packoffset(c0); float4x4 g_Proj : packoffset(c4); float4x4 g_ViewProjection : packoffset(c8); float4x4 g_ViewInverseMatrix : packoffset(c12); } cbuffer cbUIParam : register(b1) { float4x4 g_WorldMatrix : packoffset(c0); float4 g_Color0 : packoffset(c4); float4 g_Color1 : packoffset(c5); float4 g_DispRate : packoffset(c6); float4 g_DisplaySize : packoffset(c7); float4 g_FreeParam : packoffset(c8); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : POSITION0, float4 v1 : TEXCOORD0, float4 v2 : TEXCOORD1, float4 v3 : COLOR0, out float4 o0 : SV_POSITION0, out float2 o1 : TEXCOORD0, out float2 p1 : TEXCOORD1, out float4 o2 : TEXCOORD2, out float4 o3 : COLOR0, out float4 o4 : COLOR1, out float4 o5 : COLOR2, out float4 o6 : COLOR3) { float4 r0,r1; uint4 bitmask, uiDest; float4 fDest; o0.z = 0; r0.x = dot(v0.xyzw, g_WorldMatrix._m00_m10_m20_m30); r0.y = dot(v0.xyzw, g_WorldMatrix._m01_m11_m21_m31); r0.z = dot(v0.xyzw, g_WorldMatrix._m02_m12_m22_m32); r0.w = dot(v0.xyzw, g_WorldMatrix._m03_m13_m23_m33); r1.x = dot(r0.xyzw, g_ViewProjection._m00_m10_m20_m30); r1.y = dot(r0.xyzw, g_ViewProjection._m01_m11_m21_m31); o0.w = dot(r0.xyzw, g_ViewProjection._m03_m13_m23_m33); o0.xy = r1.xy; r0.xyz = float3(1,-1,1) + r1.xxy; r0.w = 1 + -r1.y; r0.yz = r0.yz / g_FreeParam.xy; r0.xyzw = g_FreeParam.zwwz * r0.xyzw; p1.x = r0.x * 0.5 + r0.y; p1.y = r0.w * 0.5 + r0.z; o1.xy = v1.xy; o2.xyzw = v2.xyzw; o3.xyzw = v3.xyzw; o4.xyzw = g_Color0.xyzw; o5.xyzw = g_Color1.xyzw; o6.xyzw = g_DispRate.xyzw; float4 stereo = StereoParams.Load(0); o0.x += stereo.x * 0.5; //o1.x += stereo.x * 0.5; //o2.x += stereo.x * 0.5; //p1.x += stereo.x * 0.5; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // using 3Dmigoto v1.2.56 on Sun Mar 19 22:58:57 2017 // // // Buffer Definitions: // // cbuffer SceneBuffer // { // // float4x4 g_View; // Offset: 0 Size: 64 [unused] // float4x4 g_Proj; // Offset: 64 Size: 64 [unused] // float4x4 g_ViewProjection; // Offset: 128 Size: 64 // float4x4 g_ViewInverseMatrix; // Offset: 192 Size: 64 [unused] // // } // // cbuffer cbUIParam // { // // float4x4 g_WorldMatrix; // Offset: 0 Size: 64 // float4 g_Color0; // Offset: 64 Size: 16 // float4 g_Color1; // Offset: 80 Size: 16 // float4 g_DispRate; // Offset: 96 Size: 16 // float4 g_DisplaySize; // Offset: 112 Size: 16 [unused] // float4 g_FreeParam; // Offset: 128 Size: 16 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // SceneBuffer cbuffer NA NA 0 1 // cbUIParam cbuffer NA NA 1 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // TEXCOORD 0 xyzw 1 NONE float xy // TEXCOORD 1 xyzw 2 NONE float xyzw // COLOR 0 xyzw 3 NONE float xyzw // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_POSITION 0 xyzw 0 POS float xyzw // TEXCOORD 0 xy 1 NONE float xy // TEXCOORD 1 zw 1 NONE float zw // TEXCOORD 2 xyzw 2 NONE float xyzw // COLOR 0 xyzw 3 NONE float xyzw // COLOR 1 xyzw 4 NONE float xyzw // COLOR 2 xyzw 5 NONE float xyzw // COLOR 3 xyzw 6 NONE float xyzw // vs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[12], immediateIndexed dcl_constantbuffer cb1[9], immediateIndexed dcl_input v0.xyzw dcl_input v1.xy dcl_input v2.xyzw dcl_input v3.xyzw dcl_output_siv o0.xyzw, position dcl_output o1.xy dcl_output o1.zw dcl_output o2.xyzw dcl_output o3.xyzw dcl_output o4.xyzw dcl_output o5.xyzw dcl_output o6.xyzw dcl_temps 2 mov o0.z, l(0) dp4 r0.x, v0.xyzw, cb1[0].xyzw dp4 r0.y, v0.xyzw, cb1[1].xyzw dp4 r0.z, v0.xyzw, cb1[2].xyzw dp4 r0.w, v0.xyzw, cb1[3].xyzw dp4 r1.x, r0.xyzw, cb0[8].xyzw dp4 r1.y, r0.xyzw, cb0[9].xyzw dp4 o0.w, r0.xyzw, cb0[11].xyzw mov o0.xy, r1.xyxx add r0.xyz, r1.xxyx, l(1.000000, -1.000000, 1.000000, 0.000000) add r0.w, -r1.y, l(1.000000) div r0.yz, r0.yyzy, cb1[8].xxyx mul r0.xyzw, r0.xyzw, cb1[8].zwwz mad o1.z, r0.x, l(0.500000), r0.y mad o1.w, r0.w, l(0.500000), r0.z mov o1.xy, v1.xyxx mov o2.xyzw, v2.xyzw mov o3.xyzw, v3.xyzw mov o4.xyzw, cb1[4].xyzw mov o5.xyzw, cb1[5].xyzw mov o6.xyzw, cb1[6].xyzw ret // Approximately 22 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] What about "o0"? It's the position (because it says "SV_POSITION0"). The output that contains "SV_POSITION0" is what has to be modified for HUD depth (at least in the 20 or so games that I have modified).[/quote]
That works... It also worked for pushing cutscenes into depth. I also understand.

I'm trying to take a picture, but i get a black image when i do alt f1. The map and many elements go into depth however, there are some textures that don't get pushed into depth. Those are still at screen depth. But I know its same shader because when I go hunting it turns everything off when i select that VS.

masterotaku said:
ishiki said:hello

I've tried all of the o1, o2, o3, o4, o5, o6.

doing the o3.x += stereo.x*.5

and you end up with HUD elements scrambled.


Sorry I have no idea what I'm doing. I'm trying to figure this out.


// ---- Created with 3Dmigoto v1.2.56 on Sun Mar 19 22:58:57 2017

cbuffer SceneBuffer : register(b0)
{
float4x4 g_View : packoffset(c0);
float4x4 g_Proj : packoffset(c4);
float4x4 g_ViewProjection : packoffset(c8);
float4x4 g_ViewInverseMatrix : packoffset(c12);
}

cbuffer cbUIParam : register(b1)
{
float4x4 g_WorldMatrix : packoffset(c0);
float4 g_Color0 : packoffset(c4);
float4 g_Color1 : packoffset(c5);
float4 g_DispRate : packoffset(c6);
float4 g_DisplaySize : packoffset(c7);
float4 g_FreeParam : packoffset(c8);
}



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


void main(
float4 v0 : POSITION0,
float4 v1 : TEXCOORD0,
float4 v2 : TEXCOORD1,
float4 v3 : COLOR0,
out float4 o0 : SV_POSITION0,
out float2 o1 : TEXCOORD0,
out float2 p1 : TEXCOORD1,
out float4 o2 : TEXCOORD2,
out float4 o3 : COLOR0,
out float4 o4 : COLOR1,
out float4 o5 : COLOR2,
out float4 o6 : COLOR3)
{
float4 r0,r1;
uint4 bitmask, uiDest;
float4 fDest;

o0.z = 0;
r0.x = dot(v0.xyzw, g_WorldMatrix._m00_m10_m20_m30);
r0.y = dot(v0.xyzw, g_WorldMatrix._m01_m11_m21_m31);
r0.z = dot(v0.xyzw, g_WorldMatrix._m02_m12_m22_m32);
r0.w = dot(v0.xyzw, g_WorldMatrix._m03_m13_m23_m33);
r1.x = dot(r0.xyzw, g_ViewProjection._m00_m10_m20_m30);
r1.y = dot(r0.xyzw, g_ViewProjection._m01_m11_m21_m31);
o0.w = dot(r0.xyzw, g_ViewProjection._m03_m13_m23_m33);
o0.xy = r1.xy;
r0.xyz = float3(1,-1,1) + r1.xxy;
r0.w = 1 + -r1.y;
r0.yz = r0.yz / g_FreeParam.xy;
r0.xyzw = g_FreeParam.zwwz * r0.xyzw;
p1.x = r0.x * 0.5 + r0.y;
p1.y = r0.w * 0.5 + r0.z;
o1.xy = v1.xy;
o2.xyzw = v2.xyzw;
o3.xyzw = v3.xyzw;
o4.xyzw = g_Color0.xyzw;
o5.xyzw = g_Color1.xyzw;
o6.xyzw = g_DispRate.xyzw;
float4 stereo = StereoParams.Load(0);
o0.x += stereo.x * 0.5;
//o1.x += stereo.x * 0.5;
//o2.x += stereo.x * 0.5;
//p1.x += stereo.x * 0.5;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// using 3Dmigoto v1.2.56 on Sun Mar 19 22:58:57 2017
//
//
// Buffer Definitions:
//
// cbuffer SceneBuffer
// {
//
// float4x4 g_View; // Offset: 0 Size: 64 [unused]
// float4x4 g_Proj; // Offset: 64 Size: 64 [unused]
// float4x4 g_ViewProjection; // Offset: 128 Size: 64
// float4x4 g_ViewInverseMatrix; // Offset: 192 Size: 64 [unused]
//
// }
//
// cbuffer cbUIParam
// {
//
// float4x4 g_WorldMatrix; // Offset: 0 Size: 64
// float4 g_Color0; // Offset: 64 Size: 16
// float4 g_Color1; // Offset: 80 Size: 16
// float4 g_DispRate; // Offset: 96 Size: 16
// float4 g_DisplaySize; // Offset: 112 Size: 16 [unused]
// float4 g_FreeParam; // Offset: 128 Size: 16
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SceneBuffer cbuffer NA NA 0 1
// cbUIParam cbuffer NA NA 1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
// TEXCOORD 0 xyzw 1 NONE float xy
// TEXCOORD 1 xyzw 2 NONE float xyzw
// COLOR 0 xyzw 3 NONE float xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xyzw
// TEXCOORD 0 xy 1 NONE float xy
// TEXCOORD 1 zw 1 NONE float zw
// TEXCOORD 2 xyzw 2 NONE float xyzw
// COLOR 0 xyzw 3 NONE float xyzw
// COLOR 1 xyzw 4 NONE float xyzw
// COLOR 2 xyzw 5 NONE float xyzw
// COLOR 3 xyzw 6 NONE float xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[12], immediateIndexed
dcl_constantbuffer cb1[9], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_input v2.xyzw
dcl_input v3.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o1.zw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_temps 2
mov o0.z, l(0)
dp4 r0.x, v0.xyzw, cb1[0].xyzw
dp4 r0.y, v0.xyzw, cb1[1].xyzw
dp4 r0.z, v0.xyzw, cb1[2].xyzw
dp4 r0.w, v0.xyzw, cb1[3].xyzw
dp4 r1.x, r0.xyzw, cb0[8].xyzw
dp4 r1.y, r0.xyzw, cb0[9].xyzw
dp4 o0.w, r0.xyzw, cb0[11].xyzw
mov o0.xy, r1.xyxx
add r0.xyz, r1.xxyx, l(1.000000, -1.000000, 1.000000, 0.000000)
add r0.w, -r1.y, l(1.000000)
div r0.yz, r0.yyzy, cb1[8].xxyx
mul r0.xyzw, r0.xyzw, cb1[8].zwwz
mad o1.z, r0.x, l(0.500000), r0.y
mad o1.w, r0.w, l(0.500000), r0.z
mov o1.xy, v1.xyxx
mov o2.xyzw, v2.xyzw
mov o3.xyzw, v3.xyzw
mov o4.xyzw, cb1[4].xyzw
mov o5.xyzw, cb1[5].xyzw
mov o6.xyzw, cb1[6].xyzw
ret
// Approximately 22 instruction slots used

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

What about "o0"? It's the position (because it says "SV_POSITION0"). The output that contains "SV_POSITION0" is what has to be modified for HUD depth (at least in the 20 or so games that I have modified).

I'm ishiki, forum screwed up my name.

7700k @4.7 GHZ, 16GBDDR4@3466MHZ, 2080 Ti

#52
Posted 03/20/2017 06:29 AM   
[quote="ishiki"]I'm trying to take a picture, but i get a black image when i do alt f1. The map and many elements go into depth however, there are some textures that don't get pushed into depth. Those are still at screen depth. But I know its same shader because when I go hunting it turns everything off when i select that VS.[/quote] So I just downloaded the game and took a look. Some HUD elements don't adjust at the same rate as the others. For those HUD elements, you need to multiply by 1000 to see any movement. So we need to find a way to separate the textures (via hash, depth, pixel shader.. etc). If you need assistance with this let me know. Also, screenshots work ok for me: [img]http://api.photos.3dvisionlive.com/imagestore/58cffab9e7e56477450000cc/nvidia./470.289/[/img] . [img]http://api.photos.3dvisionlive.com/imagestore/58cffaa0e7e5642c6b0000d1/nvidia./[/img]
ishiki said:I'm trying to take a picture, but i get a black image when i do alt f1. The map and many elements go into depth however, there are some textures that don't get pushed into depth. Those are still at screen depth. But I know its same shader because when I go hunting it turns everything off when i select that VS.


So I just downloaded the game and took a look. Some HUD elements don't adjust at the same rate as the others. For those HUD elements, you need to multiply by 1000 to see any movement. So we need to find a way to separate the textures (via hash, depth, pixel shader.. etc). If you need assistance with this let me know.

Also, screenshots work ok for me:

Image
.
Image

Dual boot Win 7 x64 & Win 10 (1809) | Geforce Drivers 417.35

#53
Posted 03/20/2017 05:27 PM   
[quote="4everAwake"][quote="ishiki"]I'm trying to take a picture, but i get a black image when i do alt f1. The map and many elements go into depth however, there are some textures that don't get pushed into depth. Those are still at screen depth. But I know its same shader because when I go hunting it turns everything off when i select that VS.[/quote] So I just downloaded the game and took a look. Some HUD elements don't adjust at the same rate as the others. For those HUD elements, you need to multiply by 1000 to see any movement. So we need to find a way to separate the textures (via hash, depth, pixel shader.. etc). If you need assistance with this let me know. Also, screenshots work ok for me: [img]http://api.photos.3dvisionlive.com/imagestore/58cffab9e7e56477450000cc/nvidia./470.289/[/img] . [img]http://api.photos.3dvisionlive.com/imagestore/58cffaa0e7e5642c6b0000d1/nvidia./[/img][/quote] So there are pixel shaders for the HUD too... But I've done hash replacement with texmod before. How do i begin to do that here? THanks for all your help.
4everAwake said:
ishiki said:I'm trying to take a picture, but i get a black image when i do alt f1. The map and many elements go into depth however, there are some textures that don't get pushed into depth. Those are still at screen depth. But I know its same shader because when I go hunting it turns everything off when i select that VS.


So I just downloaded the game and took a look. Some HUD elements don't adjust at the same rate as the others. For those HUD elements, you need to multiply by 1000 to see any movement. So we need to find a way to separate the textures (via hash, depth, pixel shader.. etc). If you need assistance with this let me know.

Also, screenshots work ok for me:

Image
.
Image


So there are pixel shaders for the HUD too... But I've done hash replacement with texmod before.

How do i begin to do that here?

THanks for all your help.

I'm ishiki, forum screwed up my name.

7700k @4.7 GHZ, 16GBDDR4@3466MHZ, 2080 Ti

#54
Posted 03/21/2017 02:28 AM   
I've played the game through the first ending (there are 26 endings, 5 are main endings). And i haven't run into any other issues apart from the broken shadows which have been fixed, the blood decal shaders, and the occasional sprite that is rendered at depth ,These are pretty rare, I've only seen them pop up at 3 different points, and are small objects like a flare from a rocket. @ Ishiki [quote] 2) There's 2 or 3 HUD shaders. I want to Push them into depth. (I currently disable them). 3) Push Cutscenes into depth. 4) Disable Bloom Shader (I did this for me, I don't like the bloom in this game). 4) Theres some culling around very few amount of lights like in older Hitman fixes... I'm not sure I'm not going to try to fix that.[/quote] 2)I play the game with high convergence so i prefer to have the hud either at screen depth or pop out a bit otherwise objects clips through the hud. Since the hud is already at screen depth i didn't bother looking at this. 3) I don't know why you would want to push the cutscenes into depth, i rather have them at screen depth to cut down on any possible ghosting but i guess thats up to ones personal preference 4) again personal preference, i actually like the bloom in this game. 5) Ishiki, could you post a screenshot of this? i haven't encountered this at all. If i have enough time this weekend i'll see if i can fix the blood decals and some of the other random sprites. If anyone wants to play the game in the meantime I'd say go for it. I've completed the main game and I think it's almost perfect and most definitely playable with just the shadow fixes. I've attached a rar archive with the current WIP fix, just remove the .jps extension from the file and extract it into the folder that contains the game's executable. Cheers!
I've played the game through the first ending (there are 26 endings, 5 are main endings). And i haven't run into any other issues apart from the broken shadows which have been fixed, the blood decal shaders, and the occasional sprite that is rendered at depth ,These are pretty rare, I've only seen them pop up at 3 different points, and are small objects like a flare from a rocket.

@ Ishiki

2) There's 2 or 3 HUD shaders. I want to Push them into depth. (I currently disable them).
3) Push Cutscenes into depth.
4) Disable Bloom Shader (I did this for me, I don't like the bloom in this game).
4) Theres some culling around very few amount of lights like in older Hitman fixes... I'm not sure I'm not going to try to fix that.


2)I play the game with high convergence so i prefer to have the hud either at screen depth or pop out a bit otherwise objects clips through the hud. Since the hud is already at screen depth i didn't bother looking at this.

3) I don't know why you would want to push the cutscenes into depth, i rather have them at screen depth to cut down on any possible ghosting but i guess thats up to ones personal preference

4) again personal preference, i actually like the bloom in this game.

5) Ishiki, could you post a screenshot of this? i haven't encountered this at all.

If i have enough time this weekend i'll see if i can fix the blood decals and some of the other random sprites. If anyone wants to play the game in the meantime I'd say go for it. I've completed the main game and I think it's almost perfect and most definitely playable with just the shadow fixes.

I've attached a rar archive with the current WIP fix, just remove the .jps extension from the file and extract it into the folder that contains the game's executable.

Cheers!

Like my work? You can send a donation via Paypal to sgs.rules@gmail.com

Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z

#55
Posted 03/21/2017 11:17 PM   
Thanks,
Thanks,

Gigabyte Z370 Gaming 7 32GB Ram i9-9900K GigaByte Aorus Extreme Gaming 2080TI (single) Game Blaster Z Windows 10 X64 build #17763.195 Define R6 Blackout Case Corsair H110i GTX Sandisk 1TB (OS) SanDisk 2TB SSD (Games) Seagate EXOs 8 and 12 TB drives Samsung UN46c7000 HD TV Samsung UN55HU9000 UHD TVCurrently using ACER PASSIVE EDID override on 3D TVs LG 55

#56
Posted 03/22/2017 01:00 AM   
Thanks a lot, with the apparent disappointment from ME:A I am looking forward to picking this one up
Thanks a lot, with the apparent disappointment from ME:A I am looking forward to picking this one up

i7-4790K CPU 4.8Ghz stable overclock.
16 GB RAM Corsair
EVGA 1080TI SLI
Samsung SSD 840Pro
ASUS Z97-WS
3D Surround ASUS Rog Swift PG278Q(R), 2x PG278Q (yes it works)
Obutto R3volution.
Windows 10 pro 64x (Windows 7 Dual boot)

#57
Posted 03/22/2017 03:30 AM   
There is still some odd thing with foliage too. It might be another shadow shader? Or foliage. I'm not good at this so far :(. Is there a way to edit shaders without restarting game?
There is still some odd thing with foliage too.

It might be another shadow shader? Or foliage. I'm not good at this so far :(.

Is there a way to edit shaders without restarting game?

I'm ishiki, forum screwed up my name.

7700k @4.7 GHZ, 16GBDDR4@3466MHZ, 2080 Ti

#58
Posted 03/22/2017 06:32 AM   
edit
edit

I'm ishiki, forum screwed up my name.

7700k @4.7 GHZ, 16GBDDR4@3466MHZ, 2080 Ti

#59
Posted 03/22/2017 06:33 AM   
[quote="ishiki"]So there are pixel shaders for the HUD too... But I've done hash replacement with texmod before. How do i begin to do that here?[/quote] I don't have any experience using texmod. But one way you can separate textures is to locate a HUD PS and place the following in the d3dx.ini file: [code][ShaderOverrideHUD] ;enter the pixel shader hash for hud element(s) below Hash=b7491b574bb763be x2 = 1 post x2=0[/code] Then, place this in the HUD vertex shader: [code]float4 stereo = StereoParams.Load(0); float4 hud = IniParams.Load(int2(2, 0)); if(hud.x == 1){ o0.x += stereo.x * 0.5; } [/code] So now, only the HUD elements for the given PS are placed in depth. [quote="ishiki"]There is still some odd thing with foliage too. [/quote] I was seeing a similar issue but it went away once I enabled "StereoFlagsDX10". In the d3dx.ini file: [code] [Profile] ; This setting should always be added to a profile - it is required for a ; number of other settings to work, as well as allowing the convergence to be ; saved. If you are customising a profile you should **always uncomment this**: StereoProfile = 1 ; ; This setting enables stereo compute shaders, which is requires to fix a lot ; of "one eye" type rendering issues in many DX11 games: StereoFlagsDX10 = 0x00004000[/code] [quote="ishiki"]Is there a way to edit shaders without restarting game?[/quote] Yes. While the game is running, edit the shaders (either by Alt-Tabbing out of the game or by using a separate laptop connected on your network to edit the shaders on your gaming PC. Once finished, go back to the game and press the 'F10' key to enact any changes made to the shaders or to the d3dx.ini file.
ishiki said:So there are pixel shaders for the HUD too... But I've done hash replacement with texmod before.

How do i begin to do that here?

I don't have any experience using texmod. But one way you can separate textures is to locate a HUD PS and place the following in the d3dx.ini file:

[ShaderOverrideHUD]
;enter the pixel shader hash for hud element(s) below
Hash=b7491b574bb763be
x2 = 1
post x2=0


Then, place this in the HUD vertex shader:
float4 stereo = StereoParams.Load(0);
float4 hud = IniParams.Load(int2(2, 0));
if(hud.x == 1){
o0.x += stereo.x * 0.5;
}


So now, only the HUD elements for the given PS are placed in depth.


ishiki said:There is still some odd thing with foliage too.

I was seeing a similar issue but it went away once I enabled "StereoFlagsDX10". In the d3dx.ini file:

[Profile]
; This setting should always be added to a profile - it is required for a
; number of other settings to work, as well as allowing the convergence to be
; saved. If you are customising a profile you should **always uncomment this**:
StereoProfile = 1
;
; This setting enables stereo compute shaders, which is requires to fix a lot
; of "one eye" type rendering issues in many DX11 games:
StereoFlagsDX10 = 0x00004000



ishiki said:Is there a way to edit shaders without restarting game?

Yes. While the game is running, edit the shaders (either by Alt-Tabbing out of the game or by using a separate laptop connected on your network to edit the shaders on your gaming PC. Once finished, go back to the game and press the 'F10' key to enact any changes made to the shaders or to the d3dx.ini file.

Dual boot Win 7 x64 & Win 10 (1809) | Geforce Drivers 417.35

#60
Posted 03/22/2017 10:02 AM   
  4 / 10    
Scroll To Top