Bo3b's School For Shaderhackers
  55 / 88    
PS: [code]// f7b63c246c08f75d-ps_replace -> Shadows cbuffer cbPerLight : register(b0) { row_major float4x4 g_worldViewInverse : packoffset(c0); row_major float4x4 g_cameraToShadowProjector : packoffset(c4); row_major float4x4 g_cameraToShadow : packoffset(c8); row_major float4x4 g_cameraToSpotProjector : packoffset(c12); float4 g_characterLightTint : packoffset(c16); float4 g_lightColor : packoffset(c17); float4 g_triLightMidColor : packoffset(c18); float4 g_triLightBackColor : packoffset(c19); float4 g_lightProperties : packoffset(c20); float4 g_shadowTextureSize : packoffset(c21); float4 g_shadowCascadeColor : packoffset(c22); float4 g_shadowFadeDistances : packoffset(c23); float4 g_telegraphProperties : packoffset(c24); float g_shadowAlpha : packoffset(c25); float g_shadowPixelSize : packoffset(c25.y); } cbuffer cbPerFrame_Uncommon : register(b13) { row_major float4x4 g_projection : packoffset(c0); row_major float4x4 g_projectionInverse : packoffset(c4); row_major float4x4 g_mainView : packoffset(c8); float4 g_debugTweakables : packoffset(c12); float4 g_nearFarDepths : packoffset(c13); float4 g_reflectionPlane : packoffset(c14); } SamplerComparisonState shadowSamplerState_s : register(s0); Texture2D<float4> g_sceneTexture2 : register(t0); Texture2D<float4> g_shadowTexture : register(t1); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_POSITION0, float4 v1 : TEXCOORD0, float3 v2 : TEXCOORD1, out float4 o0 : SV_TARGET0) { float4 r0,r1,r2,r3; uint4 bitmask, uiDest; float4 fDest; r0.xy = (int2)v0.xy; r0.zw = float2(0,0); r0.xyzw = g_sceneTexture2.Load(r0.xyz, int3(0, 0, 0)).xyzw; r0.y = -g_shadowPixelSize * 2.5 + r0.x; r1.xyz = v1.xyz / v1.zzz; r0.xzw = r1.xyz * -r0.xxx; r1.xyz = r0.xzw / r0.www; r1.xyz = r1.xyz * -r0.yyy; float4 stereo = StereoParams.Load(0); r1.x -= stereo.x * (-r1.z - stereo.y) / g_projection._m00; //Also try changing sign r2.xyzw = g_cameraToShadowProjector._m10_m11_m12_m13 * r1.yyyy; r2.xyzw = r1.xxxx * g_cameraToShadowProjector._m00_m01_m02_m03 + r2.xyzw; r1.xyzw = r1.zzzz * g_cameraToShadowProjector._m20_m21_m22_m23 + r2.xyzw; r1.xyzw = g_cameraToShadowProjector._m30_m31_m32_m33 + r1.xyzw; r1.xyz = r1.zxy / r1.www; r2.xyzw = g_shadowTextureSize.zwzw * float4(-0.0174499992,1.68314505,-1.26170254,1.44229996) + r1.yzyz; r1.x = saturate(r1.x); r0.y = -1.99999995e-005 + r1.x; r1.x = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.xy, r0.y).x; r1.w = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.zw, r0.y).x; r1.x = r1.x + r1.w; r2.xyzw = g_shadowTextureSize.zwzw * float4(-1.04089749,-0.65644753,0.868130028,0.508212507) + r1.yzyz; r1.w = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.xy, r0.y).x; r2.x = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.zw, r0.y).x; r1.x = r1.x + r1.w; r1.x = r1.x + r2.x; r2.xyzw = g_shadowTextureSize.zwzw * float4(-0.142492503,-1.77057254,1.15585494,1.6522975) + r1.yzyz; r1.w = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.xy, r0.y).x; r2.x = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.zw, r0.y).x; r1.x = r1.x + r1.w; r1.x = r1.x + r2.x; r2.xyzw = g_shadowTextureSize.zwzw * float4(0.904980004,-1.16333497,2.00254989,0.180197507) + r1.yzyz; r1.w = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.xy, r0.y).x; r2.x = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.zw, r0.y).x; r1.x = r1.x + r1.w; r1.x = r1.x + r2.x; r2.xyzw = g_shadowTextureSize.zwzw * float4(-0.41099,0.400737494,-1.65660751,-1.73220503) + r1.yzyz; r3.xyzw = g_shadowTextureSize.zwzw * float4(2.16099238,-1.08537996,-2.46827006,-0.123702496) + r1.yzyz; r1.y = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.xy, r0.y).x; r1.z = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.zw, r0.y).x; r1.x = r1.x + r1.y; r1.x = r1.x + r1.z; r1.y = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r3.xy, r0.y).x; r0.y = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r3.zw, r0.y).x; r1.x = r1.x + r1.y; r0.y = r1.x + r0.y; r0.y = r0.y * 0.0833333358 + -1; r0.z = g_cameraToShadow._m12 * r0.z; r0.x = r0.x * g_cameraToShadow._m02 + r0.z; r0.x = r0.w * g_cameraToShadow._m22 + r0.x; r0.x = g_cameraToShadow._m32 + r0.x; r0.x = -g_shadowFadeDistances.y + -r0.x; r0.z = g_shadowFadeDistances.x + -g_shadowFadeDistances.y; r0.x = saturate(r0.x / r0.z); r0.x = r0.x * r0.y + 1; r0.yzw = g_shadowCascadeColor.xyz + -r0.xxx; o0.xyz = g_shadowCascadeColor.www * r0.yzw + r0.xxx; o0.w = 1; return; }[/code] VS: [code]// 8737c93ce5c2bb14-vs Shadows VS cbuffer cbPerObject : register(b0) { row_major float4x4 g_worldViewProj : packoffset(c0); row_major float4x4 g_world : packoffset(c4); row_major float4x4 g_worldView : packoffset(c8); float4 g_uvScrolling : packoffset(c12); float4 g_texCoordScaleBias : packoffset(c13); float4 g_boundingSphere : packoffset(c14); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float3 v0 : POSITION0, float3 v1 : NORMAL0, float4 v2 : COLOR0, float2 v3 : TEXCOORD0, out float4 o0 : SV_POSITION0, out float4 o1 : TEXCOORD0, out float3 o2 : TEXCOORD1) { float4 r0; uint4 bitmask, uiDest; float4 fDest; r0.xyzw = g_worldViewProj._m10_m11_m12_m13 * v0.yyyy; r0.xyzw = v0.xxxx * g_worldViewProj._m00_m01_m02_m03 + r0.xyzw; r0.xyzw = v0.zzzz * g_worldViewProj._m20_m21_m22_m23 + r0.xyzw; r0.xyzw = g_worldViewProj._m30_m31_m32_m33 + r0.xyzw; o0.z = min(r0.z, r0.w); float4 stereo = StereoParams.Load(0); r0.x += stereo.x * (r0.w - stereo.y); //r0.x -= stereo.x * (r0.w - stereo.y); //1. Try changing sign o0.xyw = r0.xyw; //<----- 2. Also try in this spot, with both sign option + and - r0.xyz = g_worldView._m10_m11_m12 * v0.yyy; //<------ 3. Last option, try here, with both sign option + and - r0.xyz = v0.xxx * g_worldView._m00_m01_m02 + r0.xyz; r0.xyz = v0.zzz * g_worldView._m20_m21_m22 + r0.xyz; o1.xyz = g_worldView._m30_m31_m32 + r0.xyz; o2.xyz = g_worldView._m30_m31_m32; return; }[/code] i left some options written in the PS and VS, basically trying changing signs I think the mistake is in the VS....you have to add the stereo correction in r0.
PS:
// f7b63c246c08f75d-ps_replace -> Shadows

cbuffer cbPerLight : register(b0)
{
row_major float4x4 g_worldViewInverse : packoffset(c0);
row_major float4x4 g_cameraToShadowProjector : packoffset(c4);
row_major float4x4 g_cameraToShadow : packoffset(c8);
row_major float4x4 g_cameraToSpotProjector : packoffset(c12);
float4 g_characterLightTint : packoffset(c16);
float4 g_lightColor : packoffset(c17);
float4 g_triLightMidColor : packoffset(c18);
float4 g_triLightBackColor : packoffset(c19);
float4 g_lightProperties : packoffset(c20);
float4 g_shadowTextureSize : packoffset(c21);
float4 g_shadowCascadeColor : packoffset(c22);
float4 g_shadowFadeDistances : packoffset(c23);
float4 g_telegraphProperties : packoffset(c24);
float g_shadowAlpha : packoffset(c25);
float g_shadowPixelSize : packoffset(c25.y);
}

cbuffer cbPerFrame_Uncommon : register(b13)
{
row_major float4x4 g_projection : packoffset(c0);
row_major float4x4 g_projectionInverse : packoffset(c4);
row_major float4x4 g_mainView : packoffset(c8);
float4 g_debugTweakables : packoffset(c12);
float4 g_nearFarDepths : packoffset(c13);
float4 g_reflectionPlane : packoffset(c14);
}

SamplerComparisonState shadowSamplerState_s : register(s0);
Texture2D<float4> g_sceneTexture2 : register(t0);
Texture2D<float4> g_shadowTexture : register(t1);


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


void main(
float4 v0 : SV_POSITION0,
float4 v1 : TEXCOORD0,
float3 v2 : TEXCOORD1,
out float4 o0 : SV_TARGET0)
{
float4 r0,r1,r2,r3;
uint4 bitmask, uiDest;
float4 fDest;


r0.xy = (int2)v0.xy;
r0.zw = float2(0,0);
r0.xyzw = g_sceneTexture2.Load(r0.xyz, int3(0, 0, 0)).xyzw;
r0.y = -g_shadowPixelSize * 2.5 + r0.x;
r1.xyz = v1.xyz / v1.zzz;
r0.xzw = r1.xyz * -r0.xxx;
r1.xyz = r0.xzw / r0.www;
r1.xyz = r1.xyz * -r0.yyy;

float4 stereo = StereoParams.Load(0);
r1.x -= stereo.x * (-r1.z - stereo.y) / g_projection._m00; //Also try changing sign

r2.xyzw = g_cameraToShadowProjector._m10_m11_m12_m13 * r1.yyyy;
r2.xyzw = r1.xxxx * g_cameraToShadowProjector._m00_m01_m02_m03 + r2.xyzw;
r1.xyzw = r1.zzzz * g_cameraToShadowProjector._m20_m21_m22_m23 + r2.xyzw;
r1.xyzw = g_cameraToShadowProjector._m30_m31_m32_m33 + r1.xyzw;
r1.xyz = r1.zxy / r1.www;
r2.xyzw = g_shadowTextureSize.zwzw * float4(-0.0174499992,1.68314505,-1.26170254,1.44229996) + r1.yzyz;
r1.x = saturate(r1.x);
r0.y = -1.99999995e-005 + r1.x;
r1.x = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.xy, r0.y).x;
r1.w = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.zw, r0.y).x;
r1.x = r1.x + r1.w;
r2.xyzw = g_shadowTextureSize.zwzw * float4(-1.04089749,-0.65644753,0.868130028,0.508212507) + r1.yzyz;
r1.w = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.xy, r0.y).x;
r2.x = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.zw, r0.y).x;
r1.x = r1.x + r1.w;
r1.x = r1.x + r2.x;
r2.xyzw = g_shadowTextureSize.zwzw * float4(-0.142492503,-1.77057254,1.15585494,1.6522975) + r1.yzyz;
r1.w = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.xy, r0.y).x;
r2.x = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.zw, r0.y).x;
r1.x = r1.x + r1.w;
r1.x = r1.x + r2.x;
r2.xyzw = g_shadowTextureSize.zwzw * float4(0.904980004,-1.16333497,2.00254989,0.180197507) + r1.yzyz;
r1.w = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.xy, r0.y).x;
r2.x = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.zw, r0.y).x;
r1.x = r1.x + r1.w;
r1.x = r1.x + r2.x;
r2.xyzw = g_shadowTextureSize.zwzw * float4(-0.41099,0.400737494,-1.65660751,-1.73220503) + r1.yzyz;
r3.xyzw = g_shadowTextureSize.zwzw * float4(2.16099238,-1.08537996,-2.46827006,-0.123702496) + r1.yzyz;
r1.y = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.xy, r0.y).x;
r1.z = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r2.zw, r0.y).x;
r1.x = r1.x + r1.y;
r1.x = r1.x + r1.z;
r1.y = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r3.xy, r0.y).x;
r0.y = g_shadowTexture.SampleCmpLevelZero(shadowSamplerState_s, r3.zw, r0.y).x;
r1.x = r1.x + r1.y;
r0.y = r1.x + r0.y;
r0.y = r0.y * 0.0833333358 + -1;
r0.z = g_cameraToShadow._m12 * r0.z;
r0.x = r0.x * g_cameraToShadow._m02 + r0.z;
r0.x = r0.w * g_cameraToShadow._m22 + r0.x;
r0.x = g_cameraToShadow._m32 + r0.x;
r0.x = -g_shadowFadeDistances.y + -r0.x;
r0.z = g_shadowFadeDistances.x + -g_shadowFadeDistances.y;
r0.x = saturate(r0.x / r0.z);
r0.x = r0.x * r0.y + 1;
r0.yzw = g_shadowCascadeColor.xyz + -r0.xxx;
o0.xyz = g_shadowCascadeColor.www * r0.yzw + r0.xxx;
o0.w = 1;
return;
}


VS:
// 8737c93ce5c2bb14-vs Shadows VS

cbuffer cbPerObject : register(b0)
{
row_major float4x4 g_worldViewProj : packoffset(c0);
row_major float4x4 g_world : packoffset(c4);
row_major float4x4 g_worldView : packoffset(c8);
float4 g_uvScrolling : packoffset(c12);
float4 g_texCoordScaleBias : packoffset(c13);
float4 g_boundingSphere : packoffset(c14);
}



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


void main(
float3 v0 : POSITION0,
float3 v1 : NORMAL0,
float4 v2 : COLOR0,
float2 v3 : TEXCOORD0,
out float4 o0 : SV_POSITION0,
out float4 o1 : TEXCOORD0,
out float3 o2 : TEXCOORD1)
{
float4 r0;
uint4 bitmask, uiDest;
float4 fDest;

r0.xyzw = g_worldViewProj._m10_m11_m12_m13 * v0.yyyy;
r0.xyzw = v0.xxxx * g_worldViewProj._m00_m01_m02_m03 + r0.xyzw;
r0.xyzw = v0.zzzz * g_worldViewProj._m20_m21_m22_m23 + r0.xyzw;
r0.xyzw = g_worldViewProj._m30_m31_m32_m33 + r0.xyzw;
o0.z = min(r0.z, r0.w);

float4 stereo = StereoParams.Load(0);
r0.x += stereo.x * (r0.w - stereo.y);
//r0.x -= stereo.x * (r0.w - stereo.y); //1. Try changing sign

o0.xyw = r0.xyw;

//<----- 2. Also try in this spot, with both sign option + and -


r0.xyz = g_worldView._m10_m11_m12 * v0.yyy;

//<------ 3. Last option, try here, with both sign option + and -

r0.xyz = v0.xxx * g_worldView._m00_m01_m02 + r0.xyz;
r0.xyz = v0.zzz * g_worldView._m20_m21_m22 + r0.xyz;
o1.xyz = g_worldView._m30_m31_m32 + r0.xyz;
o2.xyz = g_worldView._m30_m31_m32;
return;
}


i left some options written in the PS and VS, basically trying changing signs
I think the mistake is in the VS....you have to add the stereo correction in r0.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 03/23/2016 08:43 PM   
Tried all possible combination both on my own and with your shaders... in some situations the shadows look better but still OFF and wrong:( Damn... Also something weird is happening if I divide by the ProjectionMatrix._m00 the shadows purely disappear...
Tried all possible combination both on my own and with your shaders... in some situations the shadows look better but still OFF and wrong:(

Damn...

Also something weird is happening if I divide by the ProjectionMatrix._m00 the shadows purely disappear...

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 03/23/2016 09:14 PM   
Hi guys:) I figured this is the best place to ask! I am working on Dark Souls 3 and I have this "Fog" wall. It renders correctly in 3D but it also induces Halos around the character: - There is one Halo to the left of the char and one to the Right of the char. - Where the Halo is present the FOG/Texture is missing and basically you can see through. Based on what it looks (and the halo being in 3D) I believe is a double stereo added somewhere. So, after a few hours of hunting and trying I found out this: - Vertex shader is a PURE PASS-THROUGH: [code] ex: void main() { // o0 = Pos // o1 - o13 = TexCoord o0 = v1; o1 = v1; .... .... .... .... .... o13 = v13; } [/code] - Pixel shader has no InvProjMat, or ProjMat or ANY time of matrix multiplication. Instead it just samples the Textures for the FOG and outputs them to Color (o0). (Don't have the shader at hand) Now the most important part: - I tried adding/removing stereo on all 13 texCoords in the VS. One of the Coords is for the FOG. However, when I do this it modifies the Position of how the FOG texture is positioned on the Wall surface, but doesn't do anything to the Halo. - So, afterwards I had this idea of trying to see if a compute/domain/hull shader is controlling it. And RESULT! I found both a Domain and a Hull shader. (I can post the shaders). So, the question is: Did anyone encountered anything like this before? can that Halo (cut-off of the character) be fixed from the Domain shader? Based on what it is said here: https://msdn.microsoft.com/en-gb/library/windows/desktop/ff476339(v=vs.85).aspx a HULL + Domain is the last part and is normally used in Tessellation... Hence, my confusion! Any help is appreciated and THANK YOU!
Hi guys:)
I figured this is the best place to ask!

I am working on Dark Souls 3 and I have this "Fog" wall. It renders correctly in 3D but it also induces Halos around the character:
- There is one Halo to the left of the char and one to the Right of the char.
- Where the Halo is present the FOG/Texture is missing and basically you can see through.

Based on what it looks (and the halo being in 3D) I believe is a double stereo added somewhere.

So, after a few hours of hunting and trying I found out this:


- Vertex shader is a PURE PASS-THROUGH:
ex:
void main()
{
// o0 = Pos
// o1 - o13 = TexCoord

o0 = v1;
o1 = v1;
....
....
....
....
....
o13 = v13;
}


- Pixel shader has no InvProjMat, or ProjMat or ANY time of matrix multiplication. Instead it just samples the Textures for the FOG and outputs them to Color (o0).
(Don't have the shader at hand)

Now the most important part:

- I tried adding/removing stereo on all 13 texCoords in the VS. One of the Coords is for the FOG. However, when I do this it modifies the Position of how the FOG texture
is positioned on the Wall surface, but doesn't do anything to the Halo.
- So, afterwards I had this idea of trying to see if a compute/domain/hull shader is controlling it.

And RESULT! I found both a Domain and a Hull shader. (I can post the shaders).

So, the question is: Did anyone encountered anything like this before? can that Halo (cut-off of the character) be fixed from the Domain shader?
Based on what it is said here: https://msdn.microsoft.com/en-gb/library/windows/desktop/ff476339(v=vs.85).aspx
a HULL + Domain is the last part and is normally used in Tessellation...

Hence, my confusion!
Any help is appreciated and THANK YOU!

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 04/20/2016 09:18 AM   
Yeah, if tessellation is in use any fixes that would usually go in the vertex shader go in the domain shader instead - I've come across this a few times, usually on things like water (often depending on quality settings). I have never encountered a situation where we would need to modify a hull shader. If geometry shaders are in use they are also a spot that might need to be modified instead of a vertex shader, but that's independent of tessellation (they can be used together, or either one may be in use, or neither).
Yeah, if tessellation is in use any fixes that would usually go in the vertex shader go in the domain shader instead - I've come across this a few times, usually on things like water (often depending on quality settings). I have never encountered a situation where we would need to modify a hull shader.

If geometry shaders are in use they are also a spot that might need to be modified instead of a vertex shader, but that's independent of tessellation (they can be used together, or either one may be in use, or neither).

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 04/20/2016 10:26 AM   
[quote="DarkStarSword"]Yeah, if tessellation is in use any fixes that would usually go in the vertex shader go in the domain shader instead - I've come across this a few times, usually on things like water (often depending on quality settings). I have never encountered a situation where we would need to modify a hull shader. If geometry shaders are in use they are also a spot that might need to be modified instead of a vertex shader, but that's independent of tessellation (they can be used together, or either one may be in use, or neither).[/quote] Big thanks! I'll check out the geometry/hull shader and see if I can do something about it there;) I've never encountered this before and so I thought I would ask;) On a tiny different topic: I saw that 3DMigoto allows me to change the shader based on Hash and Partner id: [code] [ShaderOverrideTest] Hash= X Partner = Y [/code] Which means my X Shader will be swapped only when is used with Y Shader. I was wondering is there a way to do the opposite? - I want the shader to be swapped for all partners EXCEPT the one I define ^_^ Thank you in advance!
DarkStarSword said:Yeah, if tessellation is in use any fixes that would usually go in the vertex shader go in the domain shader instead - I've come across this a few times, usually on things like water (often depending on quality settings). I have never encountered a situation where we would need to modify a hull shader.

If geometry shaders are in use they are also a spot that might need to be modified instead of a vertex shader, but that's independent of tessellation (they can be used together, or either one may be in use, or neither).


Big thanks!
I'll check out the geometry/hull shader and see if I can do something about it there;)
I've never encountered this before and so I thought I would ask;)

On a tiny different topic:
I saw that 3DMigoto allows me to change the shader based on Hash and Partner id:
[ShaderOverrideTest]
Hash= X
Partner = Y

Which means my X Shader will be swapped only when is used with Y Shader.

I was wondering is there a way to do the opposite?
- I want the shader to be swapped for all partners EXCEPT the one I define ^_^

Thank you in advance!

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 04/20/2016 11:17 AM   
[quote="helifax"] I was wondering is there a way to do the opposite? - I want the shader to be swapped for all partners EXCEPT the one I define ^_^ Thank you in advance![/quote] Use a variable for that (and loading iniparams in the shader). For example, z=0 by default. [ShaderOverrideaaaVS] Hash= hash of vertex shader z=0 [ShaderOverrideaaaPS] Hash= hash of pixel shader z=1 And then you make a condition based on z in the vertex shader. I'm not im front of my PC so I can't confirm if I'm 100% right. I haven't done that for weeks at least.
helifax said:
I was wondering is there a way to do the opposite?
- I want the shader to be swapped for all partners EXCEPT the one I define ^_^

Thank you in advance!


Use a variable for that (and loading iniparams in the shader).

For example, z=0 by default.

[ShaderOverrideaaaVS]
Hash= hash of vertex shader
z=0

[ShaderOverrideaaaPS]
Hash= hash of pixel shader
z=1



And then you make a condition based on z in the vertex shader.

I'm not im front of my PC so I can't confirm if I'm 100% right. I haven't done that for weeks at least.

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 04/20/2016 11:58 AM   
[quote="masterotaku"][quote="helifax"] I was wondering is there a way to do the opposite? - I want the shader to be swapped for all partners EXCEPT the one I define ^_^ Thank you in advance![/quote] Use a variable for that (and loading iniparams in the shader). For example, z=0 by default. [ShaderOverrideaaaVS] Hash= hash of vertex shader z=0 [ShaderOverrideaaaPS] Hash= hash of pixel shader z=1 And then you make a condition based on z in the vertex shader. I'm not im front of my PC so I can't confirm if I'm 100% right. I haven't done that for weeks at least.[/quote] Yeah that should work;) I have used that one in the past but I was rather curios if there is an exclusive Parent variant besides the inclusive one that currently is there;) Thx;)
masterotaku said:
helifax said:
I was wondering is there a way to do the opposite?
- I want the shader to be swapped for all partners EXCEPT the one I define ^_^

Thank you in advance!


Use a variable for that (and loading iniparams in the shader).

For example, z=0 by default.

[ShaderOverrideaaaVS]
Hash= hash of vertex shader
z=0

[ShaderOverrideaaaPS]
Hash= hash of pixel shader
z=1



And then you make a condition based on z in the vertex shader.

I'm not im front of my PC so I can't confirm if I'm 100% right. I haven't done that for weeks at least.


Yeah that should work;) I have used that one in the past but I was rather curios if there is an exclusive Parent variant besides the inclusive one that currently is there;)
Thx;)

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 04/20/2016 02:15 PM   
The partner option should really be considered deprecated because it is quite limited. The method masterotaku described is a valid alternative, but it will only work if filtering on a pixel shader, and not for a vertex shader (as it relies on the order in which 3DMigoto processes shader types - vertex before pixel). The preferred method is similar, but can work for any shader type (also assumes z is 0 by default): [code] [ShaderOverrideFoo] Hash = ... z = 1 post z = 0 [/code] Then you can test that from any of the shaders however you need.
The partner option should really be considered deprecated because it is quite limited. The method masterotaku described is a valid alternative, but it will only work if filtering on a pixel shader, and not for a vertex shader (as it relies on the order in which 3DMigoto processes shader types - vertex before pixel). The preferred method is similar, but can work for any shader type (also assumes z is 0 by default):

[ShaderOverrideFoo]
Hash = ...
z = 1
post z = 0


Then you can test that from any of the shaders however you need.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 04/20/2016 02:49 PM   
[quote="DarkStarSword"]The partner option should really be considered deprecated because it is quite limited. The method masterotaku described is a valid alternative, but it will only work if filtering on a pixel shader, and not for a vertex shader (as it relies on the order in which 3DMigoto processes shader types - vertex before pixel). The preferred method is similar, but can work for any shader type (also assumes z is 0 by default): [code] [ShaderOverrideFoo] Hash = ... z = 1 post z = 0 [/code] Then you can test that from any of the shaders however you need.[/quote] Thank you for clarification!;)
DarkStarSword said:The partner option should really be considered deprecated because it is quite limited. The method masterotaku described is a valid alternative, but it will only work if filtering on a pixel shader, and not for a vertex shader (as it relies on the order in which 3DMigoto processes shader types - vertex before pixel). The preferred method is similar, but can work for any shader type (also assumes z is 0 by default):

[ShaderOverrideFoo]
Hash = ...
z = 1
post z = 0


Then you can test that from any of the shaders however you need.


Thank you for clarification!;)

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 04/20/2016 02:56 PM   
So;) This is the HULL shader: [code] // ---- Created with 3Dmigoto v1.2.35 on Wed Apr 20 18:58:35 2016 // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : POSITION0, float4 v1 : COLOR0, float4 v2 : COLOR1, float4 v3 : TEXCOORD0, float4 v4 : TEXCOORD1, float4 v5 : TEXCOORD2, float4 v6 : TEXCOORD3, float4 v7 : TEXCOORD4, float4 v8 : TEXCOORD5, out float4 o0 : POSITION0, out float4 o1 : COLOR0, out float4 o2 : COLOR1, out float4 o3 : TEXCOORD0, out float4 o4 : TEXCOORD1, out float4 o5 : TEXCOORD2, out float4 o6 : TEXCOORD3, out float4 o7 : TEXCOORD4, out float4 o8 : TEXCOORD5) { } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546 // // using 3Dmigoto v1.2.35 on Wed Apr 20 18:58:35 2016 // // // // Patch Constant signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_TESSFACTOR 0 x 0 QUADEDGE float x // SV_TESSFACTOR 1 x 1 QUADEDGE float x // SV_TESSFACTOR 2 x 2 QUADEDGE float x // SV_TESSFACTOR 3 x 3 QUADEDGE float x // SV_INSIDETESSFACTOR 0 x 4 QUADINT float x // SV_INSIDETESSFACTOR 1 x 5 QUADINT float x // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // COLOR 0 xyzw 1 NONE float xyzw // COLOR 1 xyzw 2 NONE float xyzw // TEXCOORD 0 xyzw 3 NONE float xyzw // TEXCOORD 1 xyzw 4 NONE float xyzw // TEXCOORD 2 xy 5 NONE float xy // TEXCOORD 3 xyzw 6 NONE float xyzw // TEXCOORD 4 xyzw 7 NONE float xyzw // TEXCOORD 5 xyzw 8 NONE float xyzw // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // COLOR 0 xyzw 1 NONE float xyzw // COLOR 1 xyzw 2 NONE float xyzw // TEXCOORD 0 xyzw 3 NONE float xyzw // TEXCOORD 1 xyzw 4 NONE float xyzw // TEXCOORD 2 xy 5 NONE float xy // TEXCOORD 3 xyzw 6 NONE float xyzw // TEXCOORD 4 xyzw 7 NONE float xyzw // TEXCOORD 5 xyzw 8 NONE float xyzw // // Tessellation Domain # of control points // -------------------- -------------------- // Quadrilateral 1 // // Tessellation Output Primitive Partitioning Type // ------------------------------ ------------------ // Clockwise Triangles Integer // hs_5_0 hs_decls dcl_input_control_point_count 1 dcl_output_control_point_count 1 dcl_tessellator_domain domain_quad dcl_tessellator_partitioning partitioning_integer dcl_tessellator_output_primitive output_triangle_cw dcl_hs_max_tessfactor l(3.000000) dcl_globalFlags refactoringAllowed hs_control_point_phase dcl_input v[1][0].xyzw dcl_input v[1][1].xyzw dcl_input v[1][2].xyzw dcl_input v[1][3].xyzw dcl_input v[1][4].xyzw dcl_input v[1][5].xy dcl_input v[1][6].xyzw dcl_input v[1][7].xyzw dcl_input v[1][8].xyzw dcl_output o0.xyzw dcl_output o1.xyzw dcl_output o2.xyzw dcl_output o3.xyzw dcl_output o4.xyzw dcl_output o5.xy dcl_output o6.xyzw dcl_output o7.xyzw dcl_output o8.xyzw mov o0.xyzw, v[0][0].xyzw mov o1.xyzw, v[0][1].xyzw mov o2.xyzw, v[0][2].xyzw mov o3.xyzw, v[0][3].xyzw mov o4.xyzw, v[0][4].xyzw mov o5.xy, v[0][5].xyxx mov o6.xyzw, v[0][6].xyzw mov o7.xyzw, v[0][7].xyzw mov o8.xyzw, v[0][8].xyzw ret hs_fork_phase dcl_hs_fork_phase_instance_count 4 dcl_input vForkInstanceID dcl_output_siv o0.x, finalQuadUeq0EdgeTessFactor dcl_output_siv o1.x, finalQuadVeq0EdgeTessFactor dcl_output_siv o2.x, finalQuadUeq1EdgeTessFactor dcl_output_siv o3.x, finalQuadVeq1EdgeTessFactor dcl_temps 1 dcl_indexrange o0.x 4 mov r0.x, vForkInstanceID.x mov o[r0.x + 0].x, l(3.000000) ret hs_fork_phase dcl_hs_fork_phase_instance_count 2 dcl_input vForkInstanceID dcl_output_siv o4.x, finalQuadUInsideTessFactor dcl_output_siv o5.x, finalQuadVInsideTessFactor dcl_temps 1 dcl_indexrange o4.x 2 mov r0.x, vForkInstanceID.x mov o[r0.x + 4].x, l(1.000000) ret // Approximately 16 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] Seems The HLSL is missing but I bet we can do the ASM variant. I am unsure where I could un-correct the Texcood... any idea? And this is the domain one: [code] // ---- Created with 3Dmigoto v1.2.35 on Wed Apr 20 19:01:44 2016 cbuffer DSCommonBuffer : register(b0) { float4x4 g_ds_viewProjectionMatrix : packoffset(c0); float4x4 g_ds_viewMatrix : packoffset(c4); float4x4 g_ds_projectionMatrix : packoffset(c8); float4x4 g_ds_worldViewProjectionMatrix : packoffset(c12); float g_ds_fogStartZ : packoffset(c16); float g_ds_recFogEndZ : packoffset(c16.y); float g_ds_fogStartY : packoffset(c16.z); float g_ds_recFogEndY : packoffset(c16.w); float3 g_ds_lightDir : packoffset(c17); float4 g_ds_directionalLightColor : packoffset(c18); float4 g_ds_hemiLightColor0 : packoffset(c19); float4 g_ds_hemiLightColor1 : packoffset(c20); float g_ds_nearFar : packoffset(c21); float g_ds_nearFarDistance : packoffset(c21.y); float g_ds_far : packoffset(c21.z); float g_ds_near : packoffset(c21.w); float3 g_ds_eye : packoffset(c22); float g_ds_fadeNearStart : packoffset(c23); float g_ds_fadeNearDist : packoffset(c23.y); float g_ds_fadeFarStart : packoffset(c23.z); float g_ds_fadeFarDist : packoffset(c23.w); float3 g_ds_cameraPos : packoffset(c24); float3 g_ds_cameraUp : packoffset(c25); float4 g_ds_softSpriteParam : packoffset(c26); float2 g_ds_softSpriteScaleOffset : packoffset(c27); float2 g_ds_softSpriteScaleOffsetDummy : packoffset(c27.z); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : POSITION0, float4 v1 : COLOR0, float4 v2 : COLOR1, float4 v3 : TEXCOORD0, float4 v4 : TEXCOORD1, float4 v5 : TEXCOORD2, float4 v6 : TEXCOORD3, float4 v7 : TEXCOORD4, float4 v8 : TEXCOORD5, out float4 o0 : COLOR0, out float4 o1 : TEXCOORD0, out float4 o2 : TEXCOORD1, out float4 o3 : TEXCOORD2, out float4 o4 : TEXCOORD3, out float4 o5 : TEXCOORD4, out float2 o6 : TEXCOORD5, out float4 o7 : SV_POSITION0) { // Needs manual fix for instruction: // unknown dcl_: dcl_input_control_point_count 1 // Needs manual fix for instruction: // unknown dcl_: dcl_tessellator_domain domain_quad float4 r0,r1,r2,r3; uint4 bitmask, uiDest; float4 fDest; r0.xy = float2(-0.5,-0.5) + vDomain.xy; r0.z = cmp(0 < r0.y); r0.w = cmp(r0.y < 0); r0.z = (int)-r0.z + (int)r0.w; r0.z = (int)r0.z; r0.w = 0.0606599897 * r0.z; r1.y = r0.y * 0.878679991 + r0.w; r0.y = -r0.z * 0.207106665 + r1.y; r0.y = dot(r0.yy, r0.zz); r0.y = 1 + -r0.y; r1.x = r0.x * r0.y; r1.zw = float2(0,0); r0.xyzw = vicp[0][0].xyzw + r1.xyzw; r2.x = dot(r0.xyzw, vicp[0][6].xyzw); r2.y = dot(r0.xyzw, vicp[0][7].xyzw); r2.z = dot(r0.xyzw, vicp[0][8].xyzw); r0.xyz = g_ds_cameraPos.xyz + -r2.xyz; r0.x = dot(r0.xyz, r0.xyz); r0.x = sqrt(r0.x); r0.yz = -g_ds_fadeFarStart + r0.xx; r0.xw = -g_ds_fadeNearStart + r0.xx; r0.y = saturate(r0.y / g_ds_fadeFarDist); r0.z = saturate(r0.z / -g_ds_fadeNearDist); r0.yz = float2(1,1) + -r0.yz; r1.zw = cmp(float2(9.99999975e-005,9.99999975e-005) >= g_ds_fadeNearDist); r0.y = r1.z ? r0.y : r0.z; r0.z = r1.w ? r1.z : 0; r1.z = (int)r1.w | (int)r1.z; r0.y = r0.z ? 1 : r0.y; r3.x = -1 / g_ds_fadeNearDist; r3.y = 1 / g_ds_fadeFarDist; r0.xz = saturate(r3.xy * r0.xw); r0.xz = float2(1,1) + -r0.xz; r0.x = r0.x * r0.z; r0.x = r1.z ? r0.y : r0.x; r3.xyzw = vicp[0][2].xyzw * vicp[0][1].xyzw; o0.w = r3.w * r0.x; o0.xyz = r3.xyz; r0.xw = float2(1,-1); r0.yz = vicp[0][4].yx; r0.xy = r1.xy * r0.xy; o1.xy = r0.xy * r0.zw + vicp[0][3].xy; o2.xy = r0.xy * r0.zw + vicp[0][3].zw; r2.w = 1; r0.w = dot(r2.xyzw, g_ds_viewProjectionMatrix._m03_m13_m23_m33); r1.x = -g_ds_fogStartZ + r0.w; o1.z = saturate(g_ds_recFogEndZ * r1.x); o2.z = vicp[0][4].z; r0.x = dot(r2.xyzw, g_ds_viewProjectionMatrix._m00_m10_m20_m30); r0.y = dot(r2.xyzw, g_ds_viewProjectionMatrix._m01_m11_m21_m31); o5.xyz = g_ds_eye.xyz + -r2.xyz; r1.xy = r0.xy / r0.ww; o3.xy = r1.xy * float2(0.5,-0.5) + float2(0.5,0.5); r1.x = vicp[0][5].y * g_ds_softSpriteScaleOffset.x; r1.y = 0.5 * r1.x; r1.x = r1.x * 0.5 + g_ds_softSpriteScaleOffset.y; r1.x = -r1.x + r0.w; o3.w = g_ds_softSpriteScaleOffset.y * 2 + r1.y; r1.y = -r1.x + r0.w; r1.z = g_ds_near + 1; r1.w = r1.z + -r1.x; r1.z = cmp(r1.x < r1.z); r1.w = min(1, r1.w); r1.y = r1.w * r1.y + r1.x; r1.x = r1.z ? r1.y : r1.x; o3.z = r1.x; r1.y = r0.w / r1.x; r1.zw = g_ds_far / g_ds_nearFarDistance; r1.x = r1.z * r1.x + -r1.w; r0.z = r1.y * r1.x; o4.xyzw = r0.xyzw; o7.xyzw = r0.xyzw; o5.w = 0; o6.xy = vicp[0][5].xy; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546 // // using 3Dmigoto v1.2.35 on Wed Apr 20 19:01:44 2016 // // // Buffer Definitions: // // cbuffer DSCommonBuffer // { // // float4x4 g_ds_viewProjectionMatrix;// Offset: 0 Size: 64 // float4x4 g_ds_viewMatrix; // Offset: 64 Size: 64 [unused] // float4x4 g_ds_projectionMatrix; // Offset: 128 Size: 64 [unused] // float4x4 g_ds_worldViewProjectionMatrix;// Offset: 192 Size: 64 [unused] // float g_ds_fogStartZ; // Offset: 256 Size: 4 // float g_ds_recFogEndZ; // Offset: 260 Size: 4 // float g_ds_fogStartY; // Offset: 264 Size: 4 [unused] // float g_ds_recFogEndY; // Offset: 268 Size: 4 [unused] // float3 g_ds_lightDir; // Offset: 272 Size: 12 [unused] // float4 g_ds_directionalLightColor; // Offset: 288 Size: 16 [unused] // float4 g_ds_hemiLightColor0; // Offset: 304 Size: 16 [unused] // float4 g_ds_hemiLightColor1; // Offset: 320 Size: 16 [unused] // float g_ds_nearFar; // Offset: 336 Size: 4 // float g_ds_nearFarDistance; // Offset: 340 Size: 4 // float g_ds_far; // Offset: 344 Size: 4 // float g_ds_near; // Offset: 348 Size: 4 // float3 g_ds_eye; // Offset: 352 Size: 12 // float g_ds_fadeNearStart; // Offset: 368 Size: 4 // float g_ds_fadeNearDist; // Offset: 372 Size: 4 // float g_ds_fadeFarStart; // Offset: 376 Size: 4 // float g_ds_fadeFarDist; // Offset: 380 Size: 4 // float3 g_ds_cameraPos; // Offset: 384 Size: 12 // float3 g_ds_cameraUp; // Offset: 400 Size: 12 [unused] // float4 g_ds_softSpriteParam; // Offset: 416 Size: 16 [unused] // float2 g_ds_softSpriteScaleOffset; // Offset: 432 Size: 8 // float2 g_ds_softSpriteScaleOffsetDummy;// Offset: 440 Size: 8 [unused] // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // DSCommonBuffer cbuffer NA NA 0 1 // // // // Patch Constant signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_TESSFACTOR 0 x 0 QUADEDGE float // SV_TESSFACTOR 1 x 1 QUADEDGE float // SV_TESSFACTOR 2 x 2 QUADEDGE float // SV_TESSFACTOR 3 x 3 QUADEDGE float // SV_INSIDETESSFACTOR 0 x 4 QUADINT float // SV_INSIDETESSFACTOR 1 x 5 QUADINT float // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // COLOR 0 xyzw 1 NONE float xyzw // COLOR 1 xyzw 2 NONE float xyzw // TEXCOORD 0 xyzw 3 NONE float xyzw // TEXCOORD 1 xyzw 4 NONE float xyz // TEXCOORD 2 xy 5 NONE float xy // TEXCOORD 3 xyzw 6 NONE float xyzw // TEXCOORD 4 xyzw 7 NONE float xyzw // TEXCOORD 5 xyzw 8 NONE float xyzw // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // COLOR 0 xyzw 0 NONE float xyzw // TEXCOORD 0 xyz 1 NONE float xyz // TEXCOORD 1 xyz 2 NONE float xyz // TEXCOORD 2 xyzw 3 NONE float xyzw // TEXCOORD 3 xyzw 4 NONE float xyzw // TEXCOORD 4 xyzw 5 NONE float xyzw // TEXCOORD 5 xy 6 NONE float xy // SV_POSITION 0 xyzw 7 POS float xyzw // // Tessellation Domain # of control points // -------------------- -------------------- // Quadrilateral 1 // ds_5_0 dcl_input_control_point_count 1 dcl_tessellator_domain domain_quad dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[28], immediateIndexed dcl_input vDomain.xy dcl_input vicp[1][0].xyzw dcl_input vicp[1][1].xyzw dcl_input vicp[1][2].xyzw dcl_input vicp[1][3].xyzw dcl_input vicp[1][4].xyz dcl_input vicp[1][5].xy dcl_input vicp[1][6].xyzw dcl_input vicp[1][7].xyzw dcl_input vicp[1][8].xyzw dcl_output o0.xyzw dcl_output o1.xyz dcl_output o2.xyz dcl_output o3.xyzw dcl_output o4.xyzw dcl_output o5.xyzw dcl_output o6.xy dcl_output_siv o7.xyzw, position dcl_temps 4 add r0.xy, vDomain.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000) lt r0.z, l(0.000000), r0.y lt r0.w, r0.y, l(0.000000) iadd r0.z, -r0.z, r0.w itof r0.z, r0.z mul r0.w, r0.z, l(0.0606599897) mad r1.y, r0.y, l(0.878680), r0.w mad r0.y, -r0.z, l(0.207106665), r1.y dp2 r0.y, r0.yyyy, r0.zzzz add r0.y, -r0.y, l(1.000000) mul r1.x, r0.y, r0.x mov r1.zw, l(0,0,0,0) add r0.xyzw, r1.xyzw, vicp[0][0].xyzw dp4 r2.x, r0.xyzw, vicp[0][6].xyzw dp4 r2.y, r0.xyzw, vicp[0][7].xyzw dp4 r2.z, r0.xyzw, vicp[0][8].xyzw add r0.xyz, -r2.xyzx, cb0[24].xyzx dp3 r0.x, r0.xyzx, r0.xyzx sqrt r0.x, r0.x add r0.yz, r0.xxxx, -cb0[23].zzxz add r0.xw, r0.xxxx, -cb0[23].xxxz div_sat r0.y, r0.y, cb0[23].w div_sat r0.z, r0.z, -cb0[23].y add r0.yz, -r0.yyzy, l(0.000000, 1.000000, 1.000000, 0.000000) ge r1.zw, l(0.000000, 0.000000, 0.000100, 0.000100), cb0[23].yyyw movc r0.y, r1.z, r0.y, r0.z and r0.z, r1.w, r1.z or r1.z, r1.w, r1.z movc r0.y, r0.z, l(1.000000), r0.y div r3.x, l(-1.000000), cb0[23].y div r3.y, l(1.000000, 1.000000, 1.000000, 1.000000), cb0[23].w mul_sat r0.xz, r0.xxwx, r3.xxyx add r0.xz, -r0.xxzx, l(1.000000, 0.000000, 1.000000, 0.000000) mul r0.x, r0.z, r0.x movc r0.x, r1.z, r0.y, r0.x mul r3.xyzw, vicp[0][1].xyzw, vicp[0][2].xyzw mul o0.w, r0.x, r3.w mov o0.xyz, r3.xyzx mov r0.xw, l(1.000000,0,0,-1.000000) mov r0.yz, vicp[0][4].yyxy mul r0.xy, r0.xyxx, r1.xyxx mad o1.xy, r0.xyxx, r0.zwzz, vicp[0][3].xyxx mad o2.xy, r0.xyxx, r0.zwzz, vicp[0][3].zwzz mov r2.w, l(1.000000) dp4 r0.w, r2.xyzw, cb0[3].xyzw add r1.x, r0.w, -cb0[16].x mul_sat o1.z, r1.x, cb0[16].y mov o2.z, vicp[0][4].z dp4 r0.x, r2.xyzw, cb0[0].xyzw dp4 r0.y, r2.xyzw, cb0[1].xyzw add o5.xyz, -r2.xyzx, cb0[22].xyzx div r1.xy, r0.xyxx, r0.wwww mad o3.xy, r1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000) mul r1.x, cb0[27].x, vicp[0][5].y mul r1.y, r1.x, l(0.500000) mad r1.x, r1.x, l(0.500000), cb0[27].y add r1.x, r0.w, -r1.x mad o3.w, cb0[27].y, l(2.000000), r1.y add r1.y, r0.w, -r1.x add r1.z, l(1.000000), cb0[21].w add r1.w, -r1.x, r1.z lt r1.z, r1.x, r1.z min r1.w, r1.w, l(1.000000) mad r1.y, r1.w, r1.y, r1.x movc r1.x, r1.z, r1.y, r1.x mov o3.z, r1.x div r1.y, r0.w, r1.x div r1.zw, cb0[21].zzzx, cb0[21].yyyy mad r1.x, r1.z, r1.x, -r1.w mul r0.z, r1.x, r1.y mov o4.xyzw, r0.xyzw mov o7.xyzw, r0.xyzw mov o5.w, l(0) mov o6.xy, vicp[0][5].xyxx ret // Approximately 75 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] Again I am confused... Any helps is greatly appreciated! Thank you in advance!
So;)

This is the HULL shader:
// ---- Created with 3Dmigoto v1.2.35 on Wed Apr 20 18:58:35 2016



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


void main(
float4 v0 : POSITION0,
float4 v1 : COLOR0,
float4 v2 : COLOR1,
float4 v3 : TEXCOORD0,
float4 v4 : TEXCOORD1,
float4 v5 : TEXCOORD2,
float4 v6 : TEXCOORD3,
float4 v7 : TEXCOORD4,
float4 v8 : TEXCOORD5,
out float4 o0 : POSITION0,
out float4 o1 : COLOR0,
out float4 o2 : COLOR1,
out float4 o3 : TEXCOORD0,
out float4 o4 : TEXCOORD1,
out float4 o5 : TEXCOORD2,
out float4 o6 : TEXCOORD3,
out float4 o7 : TEXCOORD4,
out float4 o8 : TEXCOORD5)
{
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
// using 3Dmigoto v1.2.35 on Wed Apr 20 18:58:35 2016
//
//
//
// Patch Constant signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TESSFACTOR 0 x 0 QUADEDGE float x
// SV_TESSFACTOR 1 x 1 QUADEDGE float x
// SV_TESSFACTOR 2 x 2 QUADEDGE float x
// SV_TESSFACTOR 3 x 3 QUADEDGE float x
// SV_INSIDETESSFACTOR 0 x 4 QUADINT float x
// SV_INSIDETESSFACTOR 1 x 5 QUADINT float x
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
// COLOR 0 xyzw 1 NONE float xyzw
// COLOR 1 xyzw 2 NONE float xyzw
// TEXCOORD 0 xyzw 3 NONE float xyzw
// TEXCOORD 1 xyzw 4 NONE float xyzw
// TEXCOORD 2 xy 5 NONE float xy
// TEXCOORD 3 xyzw 6 NONE float xyzw
// TEXCOORD 4 xyzw 7 NONE float xyzw
// TEXCOORD 5 xyzw 8 NONE float xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
// COLOR 0 xyzw 1 NONE float xyzw
// COLOR 1 xyzw 2 NONE float xyzw
// TEXCOORD 0 xyzw 3 NONE float xyzw
// TEXCOORD 1 xyzw 4 NONE float xyzw
// TEXCOORD 2 xy 5 NONE float xy
// TEXCOORD 3 xyzw 6 NONE float xyzw
// TEXCOORD 4 xyzw 7 NONE float xyzw
// TEXCOORD 5 xyzw 8 NONE float xyzw
//
// Tessellation Domain # of control points
// -------------------- --------------------
// Quadrilateral 1
//
// Tessellation Output Primitive Partitioning Type
// ------------------------------ ------------------
// Clockwise Triangles Integer
//
hs_5_0
hs_decls
dcl_input_control_point_count 1
dcl_output_control_point_count 1
dcl_tessellator_domain domain_quad
dcl_tessellator_partitioning partitioning_integer
dcl_tessellator_output_primitive output_triangle_cw
dcl_hs_max_tessfactor l(3.000000)
dcl_globalFlags refactoringAllowed
hs_control_point_phase
dcl_input v[1][0].xyzw
dcl_input v[1][1].xyzw
dcl_input v[1][2].xyzw
dcl_input v[1][3].xyzw
dcl_input v[1][4].xyzw
dcl_input v[1][5].xy
dcl_input v[1][6].xyzw
dcl_input v[1][7].xyzw
dcl_input v[1][8].xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xy
dcl_output o6.xyzw
dcl_output o7.xyzw
dcl_output o8.xyzw
mov o0.xyzw, v[0][0].xyzw
mov o1.xyzw, v[0][1].xyzw
mov o2.xyzw, v[0][2].xyzw
mov o3.xyzw, v[0][3].xyzw
mov o4.xyzw, v[0][4].xyzw
mov o5.xy, v[0][5].xyxx
mov o6.xyzw, v[0][6].xyzw
mov o7.xyzw, v[0][7].xyzw
mov o8.xyzw, v[0][8].xyzw
ret
hs_fork_phase
dcl_hs_fork_phase_instance_count 4
dcl_input vForkInstanceID
dcl_output_siv o0.x, finalQuadUeq0EdgeTessFactor
dcl_output_siv o1.x, finalQuadVeq0EdgeTessFactor
dcl_output_siv o2.x, finalQuadUeq1EdgeTessFactor
dcl_output_siv o3.x, finalQuadVeq1EdgeTessFactor
dcl_temps 1
dcl_indexrange o0.x 4
mov r0.x, vForkInstanceID.x
mov o[r0.x + 0].x, l(3.000000)
ret
hs_fork_phase
dcl_hs_fork_phase_instance_count 2
dcl_input vForkInstanceID
dcl_output_siv o4.x, finalQuadUInsideTessFactor
dcl_output_siv o5.x, finalQuadVInsideTessFactor
dcl_temps 1
dcl_indexrange o4.x 2
mov r0.x, vForkInstanceID.x
mov o[r0.x + 4].x, l(1.000000)
ret
// Approximately 16 instruction slots used

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


Seems The HLSL is missing but I bet we can do the ASM variant.
I am unsure where I could un-correct the Texcood... any idea?

And this is the domain one:
// ---- Created with 3Dmigoto v1.2.35 on Wed Apr 20 19:01:44 2016

cbuffer DSCommonBuffer : register(b0)
{
float4x4 g_ds_viewProjectionMatrix : packoffset(c0);
float4x4 g_ds_viewMatrix : packoffset(c4);
float4x4 g_ds_projectionMatrix : packoffset(c8);
float4x4 g_ds_worldViewProjectionMatrix : packoffset(c12);
float g_ds_fogStartZ : packoffset(c16);
float g_ds_recFogEndZ : packoffset(c16.y);
float g_ds_fogStartY : packoffset(c16.z);
float g_ds_recFogEndY : packoffset(c16.w);
float3 g_ds_lightDir : packoffset(c17);
float4 g_ds_directionalLightColor : packoffset(c18);
float4 g_ds_hemiLightColor0 : packoffset(c19);
float4 g_ds_hemiLightColor1 : packoffset(c20);
float g_ds_nearFar : packoffset(c21);
float g_ds_nearFarDistance : packoffset(c21.y);
float g_ds_far : packoffset(c21.z);
float g_ds_near : packoffset(c21.w);
float3 g_ds_eye : packoffset(c22);
float g_ds_fadeNearStart : packoffset(c23);
float g_ds_fadeNearDist : packoffset(c23.y);
float g_ds_fadeFarStart : packoffset(c23.z);
float g_ds_fadeFarDist : packoffset(c23.w);
float3 g_ds_cameraPos : packoffset(c24);
float3 g_ds_cameraUp : packoffset(c25);
float4 g_ds_softSpriteParam : packoffset(c26);
float2 g_ds_softSpriteScaleOffset : packoffset(c27);
float2 g_ds_softSpriteScaleOffsetDummy : packoffset(c27.z);
}



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


void main(
float4 v0 : POSITION0,
float4 v1 : COLOR0,
float4 v2 : COLOR1,
float4 v3 : TEXCOORD0,
float4 v4 : TEXCOORD1,
float4 v5 : TEXCOORD2,
float4 v6 : TEXCOORD3,
float4 v7 : TEXCOORD4,
float4 v8 : TEXCOORD5,
out float4 o0 : COLOR0,
out float4 o1 : TEXCOORD0,
out float4 o2 : TEXCOORD1,
out float4 o3 : TEXCOORD2,
out float4 o4 : TEXCOORD3,
out float4 o5 : TEXCOORD4,
out float2 o6 : TEXCOORD5,
out float4 o7 : SV_POSITION0)
{
// Needs manual fix for instruction:
// unknown dcl_: dcl_input_control_point_count 1
// Needs manual fix for instruction:
// unknown dcl_: dcl_tessellator_domain domain_quad
float4 r0,r1,r2,r3;
uint4 bitmask, uiDest;
float4 fDest;

r0.xy = float2(-0.5,-0.5) + vDomain.xy;
r0.z = cmp(0 < r0.y);
r0.w = cmp(r0.y < 0);
r0.z = (int)-r0.z + (int)r0.w;
r0.z = (int)r0.z;
r0.w = 0.0606599897 * r0.z;
r1.y = r0.y * 0.878679991 + r0.w;
r0.y = -r0.z * 0.207106665 + r1.y;
r0.y = dot(r0.yy, r0.zz);
r0.y = 1 + -r0.y;
r1.x = r0.x * r0.y;
r1.zw = float2(0,0);
r0.xyzw = vicp[0][0].xyzw + r1.xyzw;
r2.x = dot(r0.xyzw, vicp[0][6].xyzw);
r2.y = dot(r0.xyzw, vicp[0][7].xyzw);
r2.z = dot(r0.xyzw, vicp[0][8].xyzw);
r0.xyz = g_ds_cameraPos.xyz + -r2.xyz;
r0.x = dot(r0.xyz, r0.xyz);
r0.x = sqrt(r0.x);
r0.yz = -g_ds_fadeFarStart + r0.xx;
r0.xw = -g_ds_fadeNearStart + r0.xx;
r0.y = saturate(r0.y / g_ds_fadeFarDist);
r0.z = saturate(r0.z / -g_ds_fadeNearDist);
r0.yz = float2(1,1) + -r0.yz;
r1.zw = cmp(float2(9.99999975e-005,9.99999975e-005) >= g_ds_fadeNearDist);
r0.y = r1.z ? r0.y : r0.z;
r0.z = r1.w ? r1.z : 0;
r1.z = (int)r1.w | (int)r1.z;
r0.y = r0.z ? 1 : r0.y;
r3.x = -1 / g_ds_fadeNearDist;
r3.y = 1 / g_ds_fadeFarDist;
r0.xz = saturate(r3.xy * r0.xw);
r0.xz = float2(1,1) + -r0.xz;
r0.x = r0.x * r0.z;
r0.x = r1.z ? r0.y : r0.x;
r3.xyzw = vicp[0][2].xyzw * vicp[0][1].xyzw;
o0.w = r3.w * r0.x;
o0.xyz = r3.xyz;
r0.xw = float2(1,-1);
r0.yz = vicp[0][4].yx;
r0.xy = r1.xy * r0.xy;
o1.xy = r0.xy * r0.zw + vicp[0][3].xy;
o2.xy = r0.xy * r0.zw + vicp[0][3].zw;
r2.w = 1;
r0.w = dot(r2.xyzw, g_ds_viewProjectionMatrix._m03_m13_m23_m33);
r1.x = -g_ds_fogStartZ + r0.w;
o1.z = saturate(g_ds_recFogEndZ * r1.x);
o2.z = vicp[0][4].z;
r0.x = dot(r2.xyzw, g_ds_viewProjectionMatrix._m00_m10_m20_m30);
r0.y = dot(r2.xyzw, g_ds_viewProjectionMatrix._m01_m11_m21_m31);
o5.xyz = g_ds_eye.xyz + -r2.xyz;
r1.xy = r0.xy / r0.ww;
o3.xy = r1.xy * float2(0.5,-0.5) + float2(0.5,0.5);
r1.x = vicp[0][5].y * g_ds_softSpriteScaleOffset.x;
r1.y = 0.5 * r1.x;
r1.x = r1.x * 0.5 + g_ds_softSpriteScaleOffset.y;
r1.x = -r1.x + r0.w;
o3.w = g_ds_softSpriteScaleOffset.y * 2 + r1.y;
r1.y = -r1.x + r0.w;
r1.z = g_ds_near + 1;
r1.w = r1.z + -r1.x;
r1.z = cmp(r1.x < r1.z);
r1.w = min(1, r1.w);
r1.y = r1.w * r1.y + r1.x;
r1.x = r1.z ? r1.y : r1.x;
o3.z = r1.x;
r1.y = r0.w / r1.x;
r1.zw = g_ds_far / g_ds_nearFarDistance;
r1.x = r1.z * r1.x + -r1.w;
r0.z = r1.y * r1.x;
o4.xyzw = r0.xyzw;
o7.xyzw = r0.xyzw;
o5.w = 0;
o6.xy = vicp[0][5].xy;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
// using 3Dmigoto v1.2.35 on Wed Apr 20 19:01:44 2016
//
//
// Buffer Definitions:
//
// cbuffer DSCommonBuffer
// {
//
// float4x4 g_ds_viewProjectionMatrix;// Offset: 0 Size: 64
// float4x4 g_ds_viewMatrix; // Offset: 64 Size: 64 [unused]
// float4x4 g_ds_projectionMatrix; // Offset: 128 Size: 64 [unused]
// float4x4 g_ds_worldViewProjectionMatrix;// Offset: 192 Size: 64 [unused]
// float g_ds_fogStartZ; // Offset: 256 Size: 4
// float g_ds_recFogEndZ; // Offset: 260 Size: 4
// float g_ds_fogStartY; // Offset: 264 Size: 4 [unused]
// float g_ds_recFogEndY; // Offset: 268 Size: 4 [unused]
// float3 g_ds_lightDir; // Offset: 272 Size: 12 [unused]
// float4 g_ds_directionalLightColor; // Offset: 288 Size: 16 [unused]
// float4 g_ds_hemiLightColor0; // Offset: 304 Size: 16 [unused]
// float4 g_ds_hemiLightColor1; // Offset: 320 Size: 16 [unused]
// float g_ds_nearFar; // Offset: 336 Size: 4
// float g_ds_nearFarDistance; // Offset: 340 Size: 4
// float g_ds_far; // Offset: 344 Size: 4
// float g_ds_near; // Offset: 348 Size: 4
// float3 g_ds_eye; // Offset: 352 Size: 12
// float g_ds_fadeNearStart; // Offset: 368 Size: 4
// float g_ds_fadeNearDist; // Offset: 372 Size: 4
// float g_ds_fadeFarStart; // Offset: 376 Size: 4
// float g_ds_fadeFarDist; // Offset: 380 Size: 4
// float3 g_ds_cameraPos; // Offset: 384 Size: 12
// float3 g_ds_cameraUp; // Offset: 400 Size: 12 [unused]
// float4 g_ds_softSpriteParam; // Offset: 416 Size: 16 [unused]
// float2 g_ds_softSpriteScaleOffset; // Offset: 432 Size: 8
// float2 g_ds_softSpriteScaleOffsetDummy;// Offset: 440 Size: 8 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// DSCommonBuffer cbuffer NA NA 0 1
//
//
//
// Patch Constant signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TESSFACTOR 0 x 0 QUADEDGE float
// SV_TESSFACTOR 1 x 1 QUADEDGE float
// SV_TESSFACTOR 2 x 2 QUADEDGE float
// SV_TESSFACTOR 3 x 3 QUADEDGE float
// SV_INSIDETESSFACTOR 0 x 4 QUADINT float
// SV_INSIDETESSFACTOR 1 x 5 QUADINT float
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
// COLOR 0 xyzw 1 NONE float xyzw
// COLOR 1 xyzw 2 NONE float xyzw
// TEXCOORD 0 xyzw 3 NONE float xyzw
// TEXCOORD 1 xyzw 4 NONE float xyz
// TEXCOORD 2 xy 5 NONE float xy
// TEXCOORD 3 xyzw 6 NONE float xyzw
// TEXCOORD 4 xyzw 7 NONE float xyzw
// TEXCOORD 5 xyzw 8 NONE float xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// COLOR 0 xyzw 0 NONE float xyzw
// TEXCOORD 0 xyz 1 NONE float xyz
// TEXCOORD 1 xyz 2 NONE float xyz
// TEXCOORD 2 xyzw 3 NONE float xyzw
// TEXCOORD 3 xyzw 4 NONE float xyzw
// TEXCOORD 4 xyzw 5 NONE float xyzw
// TEXCOORD 5 xy 6 NONE float xy
// SV_POSITION 0 xyzw 7 POS float xyzw
//
// Tessellation Domain # of control points
// -------------------- --------------------
// Quadrilateral 1
//
ds_5_0
dcl_input_control_point_count 1
dcl_tessellator_domain domain_quad
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[28], immediateIndexed
dcl_input vDomain.xy
dcl_input vicp[1][0].xyzw
dcl_input vicp[1][1].xyzw
dcl_input vicp[1][2].xyzw
dcl_input vicp[1][3].xyzw
dcl_input vicp[1][4].xyz
dcl_input vicp[1][5].xy
dcl_input vicp[1][6].xyzw
dcl_input vicp[1][7].xyzw
dcl_input vicp[1][8].xyzw
dcl_output o0.xyzw
dcl_output o1.xyz
dcl_output o2.xyz
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xy
dcl_output_siv o7.xyzw, position
dcl_temps 4
add r0.xy, vDomain.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
lt r0.z, l(0.000000), r0.y
lt r0.w, r0.y, l(0.000000)
iadd r0.z, -r0.z, r0.w
itof r0.z, r0.z
mul r0.w, r0.z, l(0.0606599897)
mad r1.y, r0.y, l(0.878680), r0.w
mad r0.y, -r0.z, l(0.207106665), r1.y
dp2 r0.y, r0.yyyy, r0.zzzz
add r0.y, -r0.y, l(1.000000)
mul r1.x, r0.y, r0.x
mov r1.zw, l(0,0,0,0)
add r0.xyzw, r1.xyzw, vicp[0][0].xyzw
dp4 r2.x, r0.xyzw, vicp[0][6].xyzw
dp4 r2.y, r0.xyzw, vicp[0][7].xyzw
dp4 r2.z, r0.xyzw, vicp[0][8].xyzw
add r0.xyz, -r2.xyzx, cb0[24].xyzx
dp3 r0.x, r0.xyzx, r0.xyzx
sqrt r0.x, r0.x
add r0.yz, r0.xxxx, -cb0[23].zzxz
add r0.xw, r0.xxxx, -cb0[23].xxxz
div_sat r0.y, r0.y, cb0[23].w
div_sat r0.z, r0.z, -cb0[23].y
add r0.yz, -r0.yyzy, l(0.000000, 1.000000, 1.000000, 0.000000)
ge r1.zw, l(0.000000, 0.000000, 0.000100, 0.000100), cb0[23].yyyw
movc r0.y, r1.z, r0.y, r0.z
and r0.z, r1.w, r1.z
or r1.z, r1.w, r1.z
movc r0.y, r0.z, l(1.000000), r0.y
div r3.x, l(-1.000000), cb0[23].y
div r3.y, l(1.000000, 1.000000, 1.000000, 1.000000), cb0[23].w
mul_sat r0.xz, r0.xxwx, r3.xxyx
add r0.xz, -r0.xxzx, l(1.000000, 0.000000, 1.000000, 0.000000)
mul r0.x, r0.z, r0.x
movc r0.x, r1.z, r0.y, r0.x
mul r3.xyzw, vicp[0][1].xyzw, vicp[0][2].xyzw
mul o0.w, r0.x, r3.w
mov o0.xyz, r3.xyzx
mov r0.xw, l(1.000000,0,0,-1.000000)
mov r0.yz, vicp[0][4].yyxy
mul r0.xy, r0.xyxx, r1.xyxx
mad o1.xy, r0.xyxx, r0.zwzz, vicp[0][3].xyxx
mad o2.xy, r0.xyxx, r0.zwzz, vicp[0][3].zwzz
mov r2.w, l(1.000000)
dp4 r0.w, r2.xyzw, cb0[3].xyzw
add r1.x, r0.w, -cb0[16].x
mul_sat o1.z, r1.x, cb0[16].y
mov o2.z, vicp[0][4].z
dp4 r0.x, r2.xyzw, cb0[0].xyzw
dp4 r0.y, r2.xyzw, cb0[1].xyzw
add o5.xyz, -r2.xyzx, cb0[22].xyzx
div r1.xy, r0.xyxx, r0.wwww
mad o3.xy, r1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mul r1.x, cb0[27].x, vicp[0][5].y
mul r1.y, r1.x, l(0.500000)
mad r1.x, r1.x, l(0.500000), cb0[27].y
add r1.x, r0.w, -r1.x
mad o3.w, cb0[27].y, l(2.000000), r1.y
add r1.y, r0.w, -r1.x
add r1.z, l(1.000000), cb0[21].w
add r1.w, -r1.x, r1.z
lt r1.z, r1.x, r1.z
min r1.w, r1.w, l(1.000000)
mad r1.y, r1.w, r1.y, r1.x
movc r1.x, r1.z, r1.y, r1.x
mov o3.z, r1.x
div r1.y, r0.w, r1.x
div r1.zw, cb0[21].zzzx, cb0[21].yyyy
mad r1.x, r1.z, r1.x, -r1.w
mul r0.z, r1.x, r1.y
mov o4.xyzw, r0.xyzw
mov o7.xyzw, r0.xyzw
mov o5.w, l(0)
mov o6.xy, vicp[0][5].xyxx
ret
// Approximately 75 instruction slots used

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


Again I am confused...
Any helps is greatly appreciated!
Thank you in advance!

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 04/20/2016 06:06 PM   
@helifax The Hull shader is useless. Use the domain shader, but in ASM format....the HLSL have some decompiler issues. In CryEngine there are domain shaders with halos issues, take this example as a reference: [code]// // Generated by Microsoft (R) HLSL Shader Compiler 9.30.960.8229 // // using 3Dmigoto v1.1.30 on Sat Jul 11 00:46:07 2015 // // // Buffer Definitions: // // cbuffer PER_FRAME // { // // row_major float4x4 g_VS_ViewProjMatr;// Offset: 0 Size: 64 // float4 g_VS_WorldViewPos; // Offset: 96 Size: 16 // float4 g_VS_HPosScale; // Offset: 336 Size: 16 // // } // // cbuffer PER_MATERIAL // { // // float __0VertexWaveScale__1__2__3; // Offset: 96 Size: 4 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // WaterNormalsSampler sampler NA NA 0 1 // WaterNormalsSampler texture float4 2d 0 1 // PER_FRAME cbuffer NA NA 2 1 // PER_MATERIAL cbuffer NA NA 3 1 // // // // Patch Constant signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_TessFactor 0 x 0 TRIEDGE float // SV_TessFactor 1 x 1 TRIEDGE float // SV_TessFactor 2 x 2 TRIEDGE float // SV_InsideTessFactor 0 x 3 TRIINT float // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // TEXCOORD 0 xyzw 0 NONE float xyzw // TEXCOORD 1 xyzw 1 NONE float // TEXCOORD 2 xyzw 2 NONE float xyzw // TEXCOORD 3 xyzw 3 NONE float xyzw // TEXCOORD 4 xyzw 4 NONE float // // // 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 // // Tessellation Domain # of control points // -------------------- -------------------- // Triangle 3 // ds_5_0 dcl_input_control_point_count 3 dcl_tessellator_domain domain_tri dcl_globalFlags refactoringAllowed dcl_constantbuffer cb2[22], immediateIndexed dcl_constantbuffer cb3[7], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_input vDomain.xyz dcl_input vicp[3][0].xyzw dcl_input vicp[3][2].xyzw dcl_input vicp[3][3].xyzw 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 //add the t125 dcl_temps 4 dcl_resource_texture2d (float,float,float,float) t125 mul r0.xyzw, vDomain.yyyy, vicp[1][0].xyzw mad r0.xyzw, vDomain.xxxx, vicp[0][0].xyzw, r0.xyzw mad r0.xyzw, vDomain.zzzz, vicp[2][0].xyzw, r0.xyzw mul r1.xy, r0.xyxx, l(0.125000, 0.125000, 0.000000, 0.000000) mov o1.xyzw, r0.xyzw sample_l_indexable(texture2d)(float,float,float,float) r0.x, r1.xyxx, t0.wxyz, s0, l(0.000000) mad r0.x, r0.x, l(2.000000), l(-1.000000) mul r1.xyzw, vDomain.yyyy, vicp[1][2].xyzw mad r1.xyzw, vDomain.xxxx, vicp[0][2].xyzw, r1.xyzw mad r1.xyzw, vDomain.zzzz, vicp[2][2].xyzw, r1.xyzw add r2.xyz, -r1.xyzx, cb2[6].xyzx mov o3.xyzw, r1.xyzw mad r2.z, r0.x, cb3[6].x, r2.z mov r2.w, l(1.000000) dp4 r0.x, cb2[0].xyzw, r2.xyzw dp4 r0.y, cb2[1].xyzw, r2.xyzw dp4 r0.w, cb2[3].xyzw, r2.xyzw mov o0.xyw, r0.xyxw // Halo fix ld_indexable(texture2d)(float,float,float,float) r3.xyzw, l(0, 0, 0, 0), t125.xyzw add r3.w, r0.w, -r3.y mad r0.x, r3.w, r3.x, r0.x mad r0.xy, r0.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000), r0.wwww mul r0.xy, r0.xyxx, cb2[21].xyxx mul o2.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000) dp4 o0.z, cb2[2].xyzw, r2.xyzw mov o5.xyzw, r2.xyzw mul r0.x, r0.w, l(0.010000) mov o2.w, r0.w sqrt r0.x, r0.x add r0.x, -r0.x, l(1.000000) max o2.z, r0.x, l(0.000000) mul r0.xyzw, vDomain.yyyy, vicp[1][3].xyzw mad r0.xyzw, vDomain.xxxx, vicp[0][3].xyzw, r0.xyzw mad o4.xyzw, vDomain.zzzz, vicp[2][3].xyzw, r0.xyzw ret // Approximately 32 instruction slots used[/code] Hope this helps!!
@helifax

The Hull shader is useless.

Use the domain shader, but in ASM format....the HLSL have some decompiler issues. In CryEngine there are domain shaders with halos issues, take this example as a reference:

//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.960.8229
//
// using 3Dmigoto v1.1.30 on Sat Jul 11 00:46:07 2015
//
//
// Buffer Definitions:
//
// cbuffer PER_FRAME
// {
//
// row_major float4x4 g_VS_ViewProjMatr;// Offset: 0 Size: 64
// float4 g_VS_WorldViewPos; // Offset: 96 Size: 16
// float4 g_VS_HPosScale; // Offset: 336 Size: 16
//
// }
//
// cbuffer PER_MATERIAL
// {
//
// float __0VertexWaveScale__1__2__3; // Offset: 96 Size: 4
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// WaterNormalsSampler sampler NA NA 0 1
// WaterNormalsSampler texture float4 2d 0 1
// PER_FRAME cbuffer NA NA 2 1
// PER_MATERIAL cbuffer NA NA 3 1
//
//
//
// Patch Constant signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TessFactor 0 x 0 TRIEDGE float
// SV_TessFactor 1 x 1 TRIEDGE float
// SV_TessFactor 2 x 2 TRIEDGE float
// SV_InsideTessFactor 0 x 3 TRIINT float
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD 0 xyzw 0 NONE float xyzw
// TEXCOORD 1 xyzw 1 NONE float
// TEXCOORD 2 xyzw 2 NONE float xyzw
// TEXCOORD 3 xyzw 3 NONE float xyzw
// TEXCOORD 4 xyzw 4 NONE float
//
//
// 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
//
// Tessellation Domain # of control points
// -------------------- --------------------
// Triangle 3
//
ds_5_0
dcl_input_control_point_count 3
dcl_tessellator_domain domain_tri
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb2[22], immediateIndexed
dcl_constantbuffer cb3[7], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input vDomain.xyz
dcl_input vicp[3][0].xyzw
dcl_input vicp[3][2].xyzw
dcl_input vicp[3][3].xyzw
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

//add the t125
dcl_temps 4
dcl_resource_texture2d (float,float,float,float) t125

mul r0.xyzw, vDomain.yyyy, vicp[1][0].xyzw
mad r0.xyzw, vDomain.xxxx, vicp[0][0].xyzw, r0.xyzw
mad r0.xyzw, vDomain.zzzz, vicp[2][0].xyzw, r0.xyzw
mul r1.xy, r0.xyxx, l(0.125000, 0.125000, 0.000000, 0.000000)
mov o1.xyzw, r0.xyzw
sample_l_indexable(texture2d)(float,float,float,float) r0.x, r1.xyxx, t0.wxyz, s0, l(0.000000)
mad r0.x, r0.x, l(2.000000), l(-1.000000)
mul r1.xyzw, vDomain.yyyy, vicp[1][2].xyzw
mad r1.xyzw, vDomain.xxxx, vicp[0][2].xyzw, r1.xyzw
mad r1.xyzw, vDomain.zzzz, vicp[2][2].xyzw, r1.xyzw
add r2.xyz, -r1.xyzx, cb2[6].xyzx
mov o3.xyzw, r1.xyzw
mad r2.z, r0.x, cb3[6].x, r2.z
mov r2.w, l(1.000000)
dp4 r0.x, cb2[0].xyzw, r2.xyzw
dp4 r0.y, cb2[1].xyzw, r2.xyzw
dp4 r0.w, cb2[3].xyzw, r2.xyzw
mov o0.xyw, r0.xyxw

// Halo fix
ld_indexable(texture2d)(float,float,float,float) r3.xyzw, l(0, 0, 0, 0), t125.xyzw
add r3.w, r0.w, -r3.y
mad r0.x, r3.w, r3.x, r0.x

mad r0.xy, r0.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000), r0.wwww
mul r0.xy, r0.xyxx, cb2[21].xyxx
mul o2.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
dp4 o0.z, cb2[2].xyzw, r2.xyzw
mov o5.xyzw, r2.xyzw
mul r0.x, r0.w, l(0.010000)
mov o2.w, r0.w
sqrt r0.x, r0.x
add r0.x, -r0.x, l(1.000000)
max o2.z, r0.x, l(0.000000)
mul r0.xyzw, vDomain.yyyy, vicp[1][3].xyzw
mad r0.xyzw, vDomain.xxxx, vicp[0][3].xyzw, r0.xyzw
mad o4.xyzw, vDomain.zzzz, vicp[2][3].xyzw, r0.xyzw
ret
// Approximately 32 instruction slots used


Hope this helps!!

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 04/20/2016 06:14 PM   
[quote="DHR"]@helifax The Hull shader is useless. Use the domain shader, but in ASM format....the HLSL have some decompiler issues. In CryEngine there are domain shaders with halos issues, take this example as a reference: [code]// // Generated by Microsoft (R) HLSL Shader Compiler 9.30.960.8229 // // using 3Dmigoto v1.1.30 on Sat Jul 11 00:46:07 2015 // // // Buffer Definitions: // // cbuffer PER_FRAME // { // // row_major float4x4 g_VS_ViewProjMatr;// Offset: 0 Size: 64 // float4 g_VS_WorldViewPos; // Offset: 96 Size: 16 // float4 g_VS_HPosScale; // Offset: 336 Size: 16 // // } // // cbuffer PER_MATERIAL // { // // float __0VertexWaveScale__1__2__3; // Offset: 96 Size: 4 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // WaterNormalsSampler sampler NA NA 0 1 // WaterNormalsSampler texture float4 2d 0 1 // PER_FRAME cbuffer NA NA 2 1 // PER_MATERIAL cbuffer NA NA 3 1 // // // // Patch Constant signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_TessFactor 0 x 0 TRIEDGE float // SV_TessFactor 1 x 1 TRIEDGE float // SV_TessFactor 2 x 2 TRIEDGE float // SV_InsideTessFactor 0 x 3 TRIINT float // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // TEXCOORD 0 xyzw 0 NONE float xyzw // TEXCOORD 1 xyzw 1 NONE float // TEXCOORD 2 xyzw 2 NONE float xyzw // TEXCOORD 3 xyzw 3 NONE float xyzw // TEXCOORD 4 xyzw 4 NONE float // // // 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 // // Tessellation Domain # of control points // -------------------- -------------------- // Triangle 3 // ds_5_0 dcl_input_control_point_count 3 dcl_tessellator_domain domain_tri dcl_globalFlags refactoringAllowed dcl_constantbuffer cb2[22], immediateIndexed dcl_constantbuffer cb3[7], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_input vDomain.xyz dcl_input vicp[3][0].xyzw dcl_input vicp[3][2].xyzw dcl_input vicp[3][3].xyzw 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 //add the t125 dcl_temps 4 dcl_resource_texture2d (float,float,float,float) t125 mul r0.xyzw, vDomain.yyyy, vicp[1][0].xyzw mad r0.xyzw, vDomain.xxxx, vicp[0][0].xyzw, r0.xyzw mad r0.xyzw, vDomain.zzzz, vicp[2][0].xyzw, r0.xyzw mul r1.xy, r0.xyxx, l(0.125000, 0.125000, 0.000000, 0.000000) mov o1.xyzw, r0.xyzw sample_l_indexable(texture2d)(float,float,float,float) r0.x, r1.xyxx, t0.wxyz, s0, l(0.000000) mad r0.x, r0.x, l(2.000000), l(-1.000000) mul r1.xyzw, vDomain.yyyy, vicp[1][2].xyzw mad r1.xyzw, vDomain.xxxx, vicp[0][2].xyzw, r1.xyzw mad r1.xyzw, vDomain.zzzz, vicp[2][2].xyzw, r1.xyzw add r2.xyz, -r1.xyzx, cb2[6].xyzx mov o3.xyzw, r1.xyzw mad r2.z, r0.x, cb3[6].x, r2.z mov r2.w, l(1.000000) dp4 r0.x, cb2[0].xyzw, r2.xyzw dp4 r0.y, cb2[1].xyzw, r2.xyzw dp4 r0.w, cb2[3].xyzw, r2.xyzw mov o0.xyw, r0.xyxw // Halo fix ld_indexable(texture2d)(float,float,float,float) r3.xyzw, l(0, 0, 0, 0), t125.xyzw add r3.w, r0.w, -r3.y mad r0.x, r3.w, r3.x, r0.x mad r0.xy, r0.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000), r0.wwww mul r0.xy, r0.xyxx, cb2[21].xyxx mul o2.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000) dp4 o0.z, cb2[2].xyzw, r2.xyzw mov o5.xyzw, r2.xyzw mul r0.x, r0.w, l(0.010000) mov o2.w, r0.w sqrt r0.x, r0.x add r0.x, -r0.x, l(1.000000) max o2.z, r0.x, l(0.000000) mul r0.xyzw, vDomain.yyyy, vicp[1][3].xyzw mad r0.xyzw, vDomain.xxxx, vicp[0][3].xyzw, r0.xyzw mad o4.xyzw, vDomain.zzzz, vicp[2][3].xyzw, r0.xyzw ret // Approximately 32 instruction slots used[/code] Hope this helps!![/quote] YUPP! Already done that:) After I actually started reading the shader;) And I have already corrected the TexCoord for the HALOS:) YEYEYEYE! I was more intimidated by the name (Domain and Hull) and didn't actually look inside the shader a lot;) BIG THANKS!
DHR said:@helifax

The Hull shader is useless.

Use the domain shader, but in ASM format....the HLSL have some decompiler issues. In CryEngine there are domain shaders with halos issues, take this example as a reference:

//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.960.8229
//
// using 3Dmigoto v1.1.30 on Sat Jul 11 00:46:07 2015
//
//
// Buffer Definitions:
//
// cbuffer PER_FRAME
// {
//
// row_major float4x4 g_VS_ViewProjMatr;// Offset: 0 Size: 64
// float4 g_VS_WorldViewPos; // Offset: 96 Size: 16
// float4 g_VS_HPosScale; // Offset: 336 Size: 16
//
// }
//
// cbuffer PER_MATERIAL
// {
//
// float __0VertexWaveScale__1__2__3; // Offset: 96 Size: 4
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// WaterNormalsSampler sampler NA NA 0 1
// WaterNormalsSampler texture float4 2d 0 1
// PER_FRAME cbuffer NA NA 2 1
// PER_MATERIAL cbuffer NA NA 3 1
//
//
//
// Patch Constant signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TessFactor 0 x 0 TRIEDGE float
// SV_TessFactor 1 x 1 TRIEDGE float
// SV_TessFactor 2 x 2 TRIEDGE float
// SV_InsideTessFactor 0 x 3 TRIINT float
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD 0 xyzw 0 NONE float xyzw
// TEXCOORD 1 xyzw 1 NONE float
// TEXCOORD 2 xyzw 2 NONE float xyzw
// TEXCOORD 3 xyzw 3 NONE float xyzw
// TEXCOORD 4 xyzw 4 NONE float
//
//
// 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
//
// Tessellation Domain # of control points
// -------------------- --------------------
// Triangle 3
//
ds_5_0
dcl_input_control_point_count 3
dcl_tessellator_domain domain_tri
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb2[22], immediateIndexed
dcl_constantbuffer cb3[7], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input vDomain.xyz
dcl_input vicp[3][0].xyzw
dcl_input vicp[3][2].xyzw
dcl_input vicp[3][3].xyzw
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

//add the t125
dcl_temps 4
dcl_resource_texture2d (float,float,float,float) t125

mul r0.xyzw, vDomain.yyyy, vicp[1][0].xyzw
mad r0.xyzw, vDomain.xxxx, vicp[0][0].xyzw, r0.xyzw
mad r0.xyzw, vDomain.zzzz, vicp[2][0].xyzw, r0.xyzw
mul r1.xy, r0.xyxx, l(0.125000, 0.125000, 0.000000, 0.000000)
mov o1.xyzw, r0.xyzw
sample_l_indexable(texture2d)(float,float,float,float) r0.x, r1.xyxx, t0.wxyz, s0, l(0.000000)
mad r0.x, r0.x, l(2.000000), l(-1.000000)
mul r1.xyzw, vDomain.yyyy, vicp[1][2].xyzw
mad r1.xyzw, vDomain.xxxx, vicp[0][2].xyzw, r1.xyzw
mad r1.xyzw, vDomain.zzzz, vicp[2][2].xyzw, r1.xyzw
add r2.xyz, -r1.xyzx, cb2[6].xyzx
mov o3.xyzw, r1.xyzw
mad r2.z, r0.x, cb3[6].x, r2.z
mov r2.w, l(1.000000)
dp4 r0.x, cb2[0].xyzw, r2.xyzw
dp4 r0.y, cb2[1].xyzw, r2.xyzw
dp4 r0.w, cb2[3].xyzw, r2.xyzw
mov o0.xyw, r0.xyxw

// Halo fix
ld_indexable(texture2d)(float,float,float,float) r3.xyzw, l(0, 0, 0, 0), t125.xyzw
add r3.w, r0.w, -r3.y
mad r0.x, r3.w, r3.x, r0.x

mad r0.xy, r0.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000), r0.wwww
mul r0.xy, r0.xyxx, cb2[21].xyxx
mul o2.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
dp4 o0.z, cb2[2].xyzw, r2.xyzw
mov o5.xyzw, r2.xyzw
mul r0.x, r0.w, l(0.010000)
mov o2.w, r0.w
sqrt r0.x, r0.x
add r0.x, -r0.x, l(1.000000)
max o2.z, r0.x, l(0.000000)
mul r0.xyzw, vDomain.yyyy, vicp[1][3].xyzw
mad r0.xyzw, vDomain.xxxx, vicp[0][3].xyzw, r0.xyzw
mad o4.xyzw, vDomain.zzzz, vicp[2][3].xyzw, r0.xyzw
ret
// Approximately 32 instruction slots used


Hope this helps!!


YUPP!
Already done that:) After I actually started reading the shader;) And I have already corrected the TexCoord for the HALOS:) YEYEYEYE!

I was more intimidated by the name (Domain and Hull) and didn't actually look inside the shader a lot;)

BIG THANKS!

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 04/20/2016 06:26 PM   
So now I have another question hehehe:)) I have this Vertex shader that is used in around 30 PS shaders ^_^. All related to lighting. In the vertex shader I just stereorize one of the TexCoords. But because .w == 1 always I can't take the convergence into account:( And I can't fix 30 shaders by hand (all are different) So, I am wondering what are my alternatives... Would using the DepthBuffer work? Do I need to scale it to the correct size? Or could I use the InverseProjectionMatrix to extract the depth? Kinda like this: [code] depth=dot(r1.xyzw, g_InvProjMatrix._m03_m13_m23_m33); [/code] So the Pixel Shader is this (provides exact result as when the VS is disabled - everything goes black) [code] // a048d2fae9b16f67-ps.txt Ligths sampling... // // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546 // // // Buffer Definitions: // // cbuffer cbFog // { // // struct FogParam // { // // float4 Param; // Offset: 0 // float4 Col; // Offset: 16 // float4 ExtParam; // Offset: 32 // float4 HeightParam; // Offset: 48 // float4 HeightCol; // Offset: 64 // bool4 fogType; // Offset: 80 // // } FC_FogParamArray[2]; // Offset: 0 Size: 192 // // } // // cbuffer cbLightAccParam // { // // float4x4 g_InvProjMatrix; // Offset: 0 Size: 64 // float4x3 g_ViewMatrix; // Offset: 64 Size: 48 [unused] // float4 g_ScreenSize; // Offset: 112 Size: 16 // float4x4 g_CameraMatrix; // Offset: 128 Size: 64 // float4 g_specPowerParam; // Offset: 192 Size: 16 [unused] // float4x4 g_ProjMatrix; // Offset: 208 Size: 64 [unused] // uint g_lightCount; // Offset: 272 Size: 4 [unused] // bool g_visualizeLightCount; // Offset: 276 Size: 4 // uint g_spotLightCount; // Offset: 280 Size: 4 [unused] // uint g_lineLightCount; // Offset: 284 Size: 4 [unused] // float g_frustumNear; // Offset: 288 Size: 4 [unused] // float g_frustumFar; // Offset: 292 Size: 4 [unused] // float g_frustumSliceScale; // Offset: 296 Size: 4 [unused] // float g_frustumSliceBias; // Offset: 300 Size: 4 [unused] // uint4 g_lightTileSize; // Offset: 304 Size: 16 [unused] // // } // // Resource bind info for gLitTextureFlat // { // // uint2 $Element; // Offset: 0 Size: 8 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // SS_ClampPoint sampler NA NA 7 1 // g_DepthTexture texture float4 2d 1 1 // g_GBuffer2Texture texture float4 2d 4 1 // g_GBuffer3Texture texture float4 2d 5 1 // g_IrradianceTexture texture float4 2d 6 1 // g_SpecularAccTexture texture float4 2d 7 1 // g_EmissiveAccTexture texture float4 2d 8 1 // gLitTextureFlat texture struct r/o 17 1 // cbLightAccParam cbuffer NA NA 0 1 // cbFog cbuffer NA NA 6 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_POSITION 0 xyzw 0 POS float xy // TEXCOORD 0 xy 1 NONE float xy // TEXCOORD 1 xyzw 2 NONE float xy // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_TARGET 0 xyzw 0 TARGET float xyzw // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb6[12], dynamicIndexed dcl_constantbuffer cb0[18], immediateIndexed dcl_sampler s7, mode_default dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t4 dcl_resource_texture2d (float,float,float,float) t5 dcl_resource_texture2d (float,float,float,float) t6 dcl_resource_texture2d (float,float,float,float) t7 dcl_resource_texture2d (float,float,float,float) t8 dcl_resource_structured t17, 8 dcl_input_ps_siv linear noperspective v0.xy, position dcl_input_ps linear v1.xy dcl_input_ps linear v2.xy dcl_output o0.xyzw dcl_temps 3 // HERE Texture contains LIGHTS 1 sample_indexable(texture2d)(float,float,float,float) r0.xyz, v1.xyxx, t6.xyzw, s7 // HERE Texture contains LIGHTS 2 sample_indexable(texture2d)(float,float,float,float) r1.xyz, v1.xyxx, t7.xyzw, s7 // LIGHTS added in r0. Sample input is v1 which I believe comes from below vertex shader. add r0.xyz, r0.xyzx, r1.xyzx sample_indexable(texture2d)(float,float,float,float) r1.xyz, v1.xyxx, t8.xyzw, s7 add r0.xyz, r0.xyzx, r1.xyzx ftou r1.xy, v0.yxyy utof r1.xy, r1.xyxx mad r0.w, r1.x, cb0[7].x, r1.y ftou r0.w, r0.w ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r1.xy, r0.w, l(0), t17.xyxx ushr r0.w, r1.x, l(16) f16tof32 r1.xy, r1.xyxx f16tof32 r1.z, r0.w movc r0.xyz, cb0[17].yyyy, r1.xyzx, r0.xyzx sample_indexable(texture2d)(float,float,float,float) r1.z, v1.xyxx, t1.yzxw, s7 mov r1.xy, v2.xyxx mov r1.w, l(1.000000) // DOESN'T WORK HERE. It corrects Ambiental Light (or breaks it as is working) dp4 r2.x, r1.xyzw, cb0[0].xyzw dp4 r2.y, r1.xyzw, cb0[1].xyzw dp4 r2.z, r1.xyzw, cb0[2].xyzw dp4 r0.w, r1.xyzw, cb0[3].xyzw div r1.xyz, r2.xyzx, r0.wwww // DOESN'T WORK HERE. It corrects Ambiental Light (or breaks it as is working) dp3 r2.x, r1.xyzx, cb0[8].xyzx dp3 r2.y, r1.xyzx, cb0[10].xyzx dp3 r0.w, r1.xyzx, cb0[9].xyzx dp2 r1.x, r2.xyxx, r2.xyxx // DOESN'T WORK HERE. It corrects Ambiental Light (or breaks it as is working) sqrt r1.x, r1.x sample_indexable(texture2d)(float,float,float,float) r1.y, v1.xyxx, t5.xwyz, s7 mul r1.y, r1.y, l(255.000000) ftoi r1.y, r1.y imul null, r1.y, r1.y, l(6) add r1.x, r1.x, -cb6[r1.y + 2].y mul r1.x, r1.x, cb6[r1.y + 2].z exp r1.x, -r1.x mad_sat r1.x, -r1.x, cb6[r1.y + 2].x, cb6[r1.y + 2].x dp3 r1.z, r0.xyzx, l(0.298910, 0.586610, 0.114480, 0.000000) add r1.z, r1.z, l(-1.000000) mad r1.w, cb6[r1.y + 1].w, r1.z, l(1.000000) mad r1.z, cb6[r1.y + 4].w, r1.z, l(1.000000) mad r2.xyz, cb6[r1.y + 1].xyzx, r1.wwww, -r0.xyzx mad r0.xyz, r1.xxxx, r2.xyzx, r0.xyzx mad r1.xzw, cb6[r1.y + 4].xxyz, r1.zzzz, -r0.xxyz add r0.w, r0.w, cb6[r1.y + 3].w add r0.w, r0.w, -cb6[r1.y + 3].y mul_sat r0.w, r0.w, cb6[r1.y + 3].z mul_sat r0.w, r0.w, cb6[r1.y + 3].x mad o0.xyz, r0.wwww, r1.xzwx, r0.xyzx sample_indexable(texture2d)(float,float,float,float) r0.x, v1.xyxx, t4.wxyz, s7 mov o0.w, r0.x ret // Approximately 50 instruction slots used [/code] Vertex shader: [code] // 7ae816fade234544-vs_replace -> Light FIX cbuffer cbLightAccVtxParam : register(b4) { float4 g_vtxParam : packoffset(c0); float4x4 g_transformMatrix : packoffset(c1); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : POSITION0, float2 v1 : TEXCOORD0, out float4 o0 : SV_POSITION0, out float4 o1 : TEXCOORD0, out float4 o2 : TEXCOORD1) { float4 r0; uint4 bitmask, uiDest; float4 fDest; r0.xyw = v0.xyw; r0.z = g_vtxParam.x; o0.xyzw = r0.xyzw; float4 stereo = StereoParams.Load(0); o2.xyzw = r0.xyzw; // Attempt to use z or w failed both are 1.0 /* if (r0.z < 0.5) // z is always 1.0 o2.x -= stereo.x * 0.5 ; else o2.x -= stereo.x * 0.95 ; */ // Approximation correction. Value should be lerp (0.5, 0.95) from closer to infinity. o2.x -= stereo.x * 0.95; // DON'T TOUCH o1.xy = v1.xy; return; } [/code] Anyone has any thoughts?:)
So now I have another question hehehe:))

I have this Vertex shader that is used in around 30 PS shaders ^_^. All related to lighting.
In the vertex shader I just stereorize one of the TexCoords.

But because .w == 1 always I can't take the convergence into account:( And I can't fix 30 shaders by hand (all are different)

So, I am wondering what are my alternatives... Would using the DepthBuffer work?
Do I need to scale it to the correct size?
Or could I use the InverseProjectionMatrix to extract the depth? Kinda like this:
depth=dot(r1.xyzw, g_InvProjMatrix._m03_m13_m23_m33);



So the Pixel Shader is this (provides exact result as when the VS is disabled - everything goes black)

// a048d2fae9b16f67-ps.txt Ligths sampling...
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions:
//
// cbuffer cbFog
// {
//
// struct FogParam
// {
//
// float4 Param; // Offset: 0
// float4 Col; // Offset: 16
// float4 ExtParam; // Offset: 32
// float4 HeightParam; // Offset: 48
// float4 HeightCol; // Offset: 64
// bool4 fogType; // Offset: 80
//
// } FC_FogParamArray[2]; // Offset: 0 Size: 192
//
// }
//
// cbuffer cbLightAccParam
// {
//
// float4x4 g_InvProjMatrix; // Offset: 0 Size: 64
// float4x3 g_ViewMatrix; // Offset: 64 Size: 48 [unused]
// float4 g_ScreenSize; // Offset: 112 Size: 16
// float4x4 g_CameraMatrix; // Offset: 128 Size: 64
// float4 g_specPowerParam; // Offset: 192 Size: 16 [unused]
// float4x4 g_ProjMatrix; // Offset: 208 Size: 64 [unused]
// uint g_lightCount; // Offset: 272 Size: 4 [unused]
// bool g_visualizeLightCount; // Offset: 276 Size: 4
// uint g_spotLightCount; // Offset: 280 Size: 4 [unused]
// uint g_lineLightCount; // Offset: 284 Size: 4 [unused]
// float g_frustumNear; // Offset: 288 Size: 4 [unused]
// float g_frustumFar; // Offset: 292 Size: 4 [unused]
// float g_frustumSliceScale; // Offset: 296 Size: 4 [unused]
// float g_frustumSliceBias; // Offset: 300 Size: 4 [unused]
// uint4 g_lightTileSize; // Offset: 304 Size: 16 [unused]
//
// }
//
// Resource bind info for gLitTextureFlat
// {
//
// uint2 $Element; // Offset: 0 Size: 8
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_ClampPoint sampler NA NA 7 1
// g_DepthTexture texture float4 2d 1 1
// g_GBuffer2Texture texture float4 2d 4 1
// g_GBuffer3Texture texture float4 2d 5 1
// g_IrradianceTexture texture float4 2d 6 1
// g_SpecularAccTexture texture float4 2d 7 1
// g_EmissiveAccTexture texture float4 2d 8 1
// gLitTextureFlat texture struct r/o 17 1
// cbLightAccParam cbuffer NA NA 0 1
// cbFog cbuffer NA NA 6 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xy
// TEXCOORD 0 xy 1 NONE float xy
// TEXCOORD 1 xyzw 2 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb6[12], dynamicIndexed
dcl_constantbuffer cb0[18], immediateIndexed
dcl_sampler s7, mode_default
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_structured t17, 8
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xy
dcl_output o0.xyzw
dcl_temps 3

// HERE Texture contains LIGHTS 1
sample_indexable(texture2d)(float,float,float,float) r0.xyz, v1.xyxx, t6.xyzw, s7

// HERE Texture contains LIGHTS 2
sample_indexable(texture2d)(float,float,float,float) r1.xyz, v1.xyxx, t7.xyzw, s7

// LIGHTS added in r0. Sample input is v1 which I believe comes from below vertex shader.
add r0.xyz, r0.xyzx, r1.xyzx
sample_indexable(texture2d)(float,float,float,float) r1.xyz, v1.xyxx, t8.xyzw, s7
add r0.xyz, r0.xyzx, r1.xyzx
ftou r1.xy, v0.yxyy
utof r1.xy, r1.xyxx
mad r0.w, r1.x, cb0[7].x, r1.y
ftou r0.w, r0.w
ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r1.xy, r0.w, l(0), t17.xyxx
ushr r0.w, r1.x, l(16)
f16tof32 r1.xy, r1.xyxx
f16tof32 r1.z, r0.w
movc r0.xyz, cb0[17].yyyy, r1.xyzx, r0.xyzx
sample_indexable(texture2d)(float,float,float,float) r1.z, v1.xyxx, t1.yzxw, s7
mov r1.xy, v2.xyxx
mov r1.w, l(1.000000)

// DOESN'T WORK HERE. It corrects Ambiental Light (or breaks it as is working)

dp4 r2.x, r1.xyzw, cb0[0].xyzw
dp4 r2.y, r1.xyzw, cb0[1].xyzw
dp4 r2.z, r1.xyzw, cb0[2].xyzw
dp4 r0.w, r1.xyzw, cb0[3].xyzw
div r1.xyz, r2.xyzx, r0.wwww

// DOESN'T WORK HERE. It corrects Ambiental Light (or breaks it as is working)

dp3 r2.x, r1.xyzx, cb0[8].xyzx
dp3 r2.y, r1.xyzx, cb0[10].xyzx
dp3 r0.w, r1.xyzx, cb0[9].xyzx
dp2 r1.x, r2.xyxx, r2.xyxx

// DOESN'T WORK HERE. It corrects Ambiental Light (or breaks it as is working)

sqrt r1.x, r1.x
sample_indexable(texture2d)(float,float,float,float) r1.y, v1.xyxx, t5.xwyz, s7
mul r1.y, r1.y, l(255.000000)
ftoi r1.y, r1.y
imul null, r1.y, r1.y, l(6)
add r1.x, r1.x, -cb6[r1.y + 2].y
mul r1.x, r1.x, cb6[r1.y + 2].z
exp r1.x, -r1.x
mad_sat r1.x, -r1.x, cb6[r1.y + 2].x, cb6[r1.y + 2].x
dp3 r1.z, r0.xyzx, l(0.298910, 0.586610, 0.114480, 0.000000)
add r1.z, r1.z, l(-1.000000)
mad r1.w, cb6[r1.y + 1].w, r1.z, l(1.000000)
mad r1.z, cb6[r1.y + 4].w, r1.z, l(1.000000)
mad r2.xyz, cb6[r1.y + 1].xyzx, r1.wwww, -r0.xyzx
mad r0.xyz, r1.xxxx, r2.xyzx, r0.xyzx
mad r1.xzw, cb6[r1.y + 4].xxyz, r1.zzzz, -r0.xxyz
add r0.w, r0.w, cb6[r1.y + 3].w
add r0.w, r0.w, -cb6[r1.y + 3].y
mul_sat r0.w, r0.w, cb6[r1.y + 3].z
mul_sat r0.w, r0.w, cb6[r1.y + 3].x
mad o0.xyz, r0.wwww, r1.xzwx, r0.xyzx
sample_indexable(texture2d)(float,float,float,float) r0.x, v1.xyxx, t4.wxyz, s7
mov o0.w, r0.x
ret
// Approximately 50 instruction slots used


Vertex shader:
// 7ae816fade234544-vs_replace -> Light FIX

cbuffer cbLightAccVtxParam : register(b4)
{
float4 g_vtxParam : packoffset(c0);
float4x4 g_transformMatrix : packoffset(c1);
}

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

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

r0.xyw = v0.xyw;
r0.z = g_vtxParam.x;
o0.xyzw = r0.xyzw;

float4 stereo = StereoParams.Load(0);
o2.xyzw = r0.xyzw;

// Attempt to use z or w failed both are 1.0
/*
if (r0.z < 0.5) // z is always 1.0
o2.x -= stereo.x * 0.5 ;
else
o2.x -= stereo.x * 0.95 ;
*/

// Approximation correction. Value should be lerp (0.5, 0.95) from closer to infinity.
o2.x -= stereo.x * 0.95;

// DON'T TOUCH
o1.xy = v1.xy;

return;
}


Anyone has any thoughts?:)

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 04/20/2016 06:50 PM   
Double post...
Double post...

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 04/20/2016 07:29 PM   
Great that the Domain shader worked! That PS in ASM looks similar to the HLSL shadows one posted in the DS3 thread. You can try using the same formula, but in ASM....where r0.w is "depth" [code]. . . sample_indexable(texture2d)(float,float,float,float) r1.z, v1.xyxx, t1.yzxw, s7 mov r1.xy, v2.xyxx mov r1.w, l(1.000000) //dp4 r0.w, r1.xyzw, cb0[3].xyzw --> depth here --> fixing code r1.x+=separation * (depth * convergence-1) in ASM of course dp4 r2.x, r1.xyzw, cb0[0].xyzw dp4 r2.y, r1.xyzw, cb0[1].xyzw dp4 r2.z, r1.xyzw, cb0[2].xyzw dp4 r0.w, r1.xyzw, cb0[3].xyzw div r1.xyz, r2.xyzx, r0.wwww . . .[/code] *Edit: i change the lines....r1 is used in the dp4 r0.w......
Great that the Domain shader worked!


That PS in ASM looks similar to the HLSL shadows one posted in the DS3 thread.
You can try using the same formula, but in ASM....where r0.w is "depth"

.
.
.
sample_indexable(texture2d)(float,float,float,float) r1.z, v1.xyxx, t1.yzxw, s7
mov r1.xy, v2.xyxx
mov r1.w, l(1.000000)

//dp4 r0.w, r1.xyzw, cb0[3].xyzw
--> depth here
--> fixing code r1.x+=separation * (depth * convergence-1) in ASM of course

dp4 r2.x, r1.xyzw, cb0[0].xyzw
dp4 r2.y, r1.xyzw, cb0[1].xyzw
dp4 r2.z, r1.xyzw, cb0[2].xyzw
dp4 r0.w, r1.xyzw, cb0[3].xyzw
div r1.xyz, r2.xyzx, r0.wwww
.
.
.


*Edit: i change the lines....r1 is used in the dp4 r0.w......

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 04/20/2016 10:10 PM   
  55 / 88    
Scroll To Top