Hello everyone
i wanna try to fix some unity5.3 5.4 dx11 early access games with the great unity templates
from DSS. i dont have programing knowledge how to set it up with cygwin and were to put the
scripts correctly. My question is can anyone please make a step by step guide or is it too
complicated for a non coder?
Thanks all for keepin 3d vision alive
Hello everyone
i wanna try to fix some unity5.3 5.4 dx11 early access games with the great unity templates
from DSS. i dont have programing knowledge how to set it up with cygwin and were to put the
scripts correctly. My question is can anyone please make a step by step guide or is it too
complicated for a non coder?
You should try and run through the lessons in bo3b's school first. They'll give you a better understanding of what you're dealing with, and will help you solve problems. They don't directly apply to the DX11/unity stuff, but the concepts are similar. You don't need to be a programmer to learn some basic fixing, and having that basic understanding should help you understand the unity stuff better, once someone (hopefully) provides the information you're asking for.
You should try and run through the lessons in bo3b's school first. They'll give you a better understanding of what you're dealing with, and will help you solve problems. They don't directly apply to the DX11/unity stuff, but the concepts are similar. You don't need to be a programmer to learn some basic fixing, and having that basic understanding should help you understand the unity stuff better, once someone (hopefully) provides the information you're asking for.
Ps: Tried both the ASM and HLSL variant to fix (as I noticed the error there in HLSL ^_^)
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
@helifax
my first try with the PS will be this:
[code]r1.z = LinearDepth.Load(r1.xyz).x;
r2.xy = v0.xy * Unproject.xy + Unproject.zw;
r1.xy = r2.xy * r1.zz;
r1.w = 1;
//Fix
float4 stereo = StereoParams.Load(0);
r1.x -= stereo.x * (r1.z - stereo.y);
r2.x = dot(r1.xyzw, EyeToLightSpace._m00_m10_m20_m30);
r2.y = dot(r1.xyzw, EyeToLightSpace._m01_m11_m21_m31);
r0.w = dot(r1.xyzw, EyeToLightSpace._m02_m12_m22_m32);
r0.w = -CascadeShadowSettings.x + r0.w;
r1.xy = r2.xy * CascadeShadowMapSize + float2(0.5,0.5);[/code]
You see shadows separate (assuming shadows are 2D without any fix) with that code? no matter if there wrong, but at least separated (no 2D).
Thks DHR,
Tried all the "hacks" in my book;) Both regular and less than trivial;)
After spending some time I am not sure this is the right shader;)
Yes it does separate the shadows that are affected by this shader, but it looks like is missing a FOV division :( (Or frustum correction).
Funny enough, I couldn't find the other PS for other shadows :(
So, I bet is a CS (out of the 120) that actually controls the shadow/lighting. I could find one VS for all shadows though! And trying any correction on that gives 2D => again looks like a CS is in the middle (between VS and PS ) ^_^
Many thanks again! If you wonder what the game is, is ELEX ;) If you feel brave and want to try something new, give this game a go ;)
Cheers,
Helifax
Tried all the "hacks" in my book;) Both regular and less than trivial;)
After spending some time I am not sure this is the right shader;)
Yes it does separate the shadows that are affected by this shader, but it looks like is missing a FOV division :( (Or frustum correction).
Funny enough, I couldn't find the other PS for other shadows :(
So, I bet is a CS (out of the 120) that actually controls the shadow/lighting. I could find one VS for all shadows though! And trying any correction on that gives 2D => again looks like a CS is in the middle (between VS and PS ) ^_^
Many thanks again! If you wonder what the game is, is ELEX ;) If you feel brave and want to try something new, give this game a go ;)
Cheers,
Helifax
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
If the shadows are 2D and using the previous fixing code you see the shadows separate (become 3D)....you are in the right track.... Next step, you need to find the correct signs for the formula and correct value for the FOV correction.
Since in the headers you don't have the Projection Matrix (or the Inverse) you will need to use Frame Analysis for that later (probably the matrix is in an undeclared contant buffer or in the VS)
Now try to multiplicate the fix for a value that align the shadows...start with 0.5... (changing the signs)...now you need some test and try different combinations.
[code]r1.x -= stereo.x * (r1.z - stereo.y) * 0,5;[/code]
If you see that the shadows are aligned even eye to eye (paralel) or moved strange when you move the camera....we need a different approach.
If the shadows are 2D and using the previous fixing code you see the shadows separate (become 3D)....you are in the right track.... Next step, you need to find the correct signs for the formula and correct value for the FOV correction.
Since in the headers you don't have the Projection Matrix (or the Inverse) you will need to use Frame Analysis for that later (probably the matrix is in an undeclared contant buffer or in the VS)
Now try to multiplicate the fix for a value that align the shadows...start with 0.5... (changing the signs)...now you need some test and try different combinations.
r1.x -= stereo.x * (r1.z - stereo.y) * 0,5;
If you see that the shadows are aligned even eye to eye (paralel) or moved strange when you move the camera....we need a different approach.
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shadows are in 3D but it seems they are pushed at infinity. They look OK in the background but too much separation near the character. This is because I only use the stereo separation.
Weird thing is that normally things are the other way around: They look ok close, but not far.
Again, I am running out of ideas :(
One thing to note: "vPos.x += stereo.x * (r1.z / stereo.y -1);" GIVES the EXACT same result as "vPos.x -= stereo.x;"
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
@Helifax
Start with the fix i suggest:
[code]r1.x -= stereo.x * (r1.z - stereo.y) * FOV;[/code]
In r1.z is the depth. you are not using it, that's why the shadows are paralel in each eye.
You need to try changing the signs of the formula and FOV. For FOV try a fix number first, don't use constant buffers directly...when you have the FOV number you have to use Frame Analysis to locate the constant buffer that holds that number.
In r1.z is the depth. you are not using it, that's why the shadows are paralel in each eye.
You need to try changing the signs of the formula and FOV. For FOV try a fix number first, don't use constant buffers directly...when you have the FOV number you have to use Frame Analysis to locate the constant buffer that holds that number.
your shader is definitely the correct one. Looks like that is one of that games which needs some depth buffer offset and scaling.
I almost fixed a shadow shader which is responsible for the very near shadows in the starting area when looking directly east. It only needs some view direction correction. I got some approximate offset and scale numbers by trial and error but maybe we could identify the real numbers in some buffers.
PS e2152343856ed197:
// Very near Shadows, start area
// ---- Created with 3Dmigoto v1.2.65 on Wed Oct 25 17:47:27 2017
Have you already experimented with HUD shaders in ELEX? Looks like there is some real madness there. They even use different pixel shaders for different characters within the same word. Not enough with that, as soon as you enable the vertex shader fix for different partner PS, there are a lot of double correction and clipping issues (works with only one PS enabled). I'll write more about that if I've done more experiments.
[quote="DHR"]@Helifax
Start with the fix i suggest:
[code]r1.x -= stereo.x * (r1.z - stereo.y) * FOV;[/code]
In r1.z is the depth. you are not using it, that's why the shadows are paralel in each eye.
You need to try changing the signs of the formula and FOV. For FOV try a fix number first, don't use constant buffers directly...when you have the FOV number you have to use Frame Analysis to locate the constant buffer that holds that number.
[/quote]
DHR, I already tried all of this and already told you it doesn't work! Don't you think I wouldn't ask for help it was so "trivial" ? :) I tried all of the ABC of shadow fixing, including inverting the "EyeToLightSpace" matrix (I have no idea in what space that is.) I said "F@ck it, let's try". Also other fancy and much more complicated stuff;) I even tried to get the damn Projection Matrix from a different VS to apply the damn FOV.
The formula breaks the shadows completely (as the depth is wrong)
@mx-2:
I think is onto something there;)) And this is exactly what I believe is happening!
Have you tried dumping the CB constants (Frame Analysis? If I remember right, I think Unproject.x is 0.916 something) I think we need to use those "Unprojects" to correctly scale the depth buffer!
What are your thoughts?
I didn't look into the VS for the HUD. If is a double correction we can fix that (in the Pixel Shaders). I started with these shadows are they are driving me crazy:))
Edit:
The "unproject" cb looks like this:
cb0[5].x: 0.00106916716
cb0[5].y: -0.00106916716
cb0[5].z: -1.02640045
cb0[5].w: 0.577350259
In r1.z is the depth. you are not using it, that's why the shadows are paralel in each eye.
You need to try changing the signs of the formula and FOV. For FOV try a fix number first, don't use constant buffers directly...when you have the FOV number you have to use Frame Analysis to locate the constant buffer that holds that number.
DHR, I already tried all of this and already told you it doesn't work! Don't you think I wouldn't ask for help it was so "trivial" ? :) I tried all of the ABC of shadow fixing, including inverting the "EyeToLightSpace" matrix (I have no idea in what space that is.) I said "F@ck it, let's try". Also other fancy and much more complicated stuff;) I even tried to get the damn Projection Matrix from a different VS to apply the damn FOV.
The formula breaks the shadows completely (as the depth is wrong)
@mx-2:
I think is onto something there;)) And this is exactly what I believe is happening!
Have you tried dumping the CB constants (Frame Analysis? If I remember right, I think Unproject.x is 0.916 something) I think we need to use those "Unprojects" to correctly scale the depth buffer!
What are your thoughts?
I didn't look into the VS for the HUD. If is a double correction we can fix that (in the Pixel Shaders). I started with these shadows are they are driving me crazy:))
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
I run into some problems in my Elex fix. I managed to fix point light shadows in Elex in this huge compute shader. The fix itself is almost identical to the other shadow fixes in that game but it introduces some problems (see picture):
- There are some strange artifacts around the players head and on that junk on the left
- The far light is clipped on the left/right dependent on the rendered eye
Second problem is that strange decal vertex shader which has some strange "dcl_input_sgv v1.x, instance_id" and "dcl_output_siv o2.xyzw, position" registers. These prevent using HLSL and in addition everything in this shader behaves differently.
If I add some constant values to any of the outputs nothing happens. If I multiply on output with a constant slightly above 1, the objects move a bit. However, if I increase these values to about 1.8 the whole objects get clipped even though the PS is modified to output constant color.
The true name of god of 3d is?
Asus Rog Swift PG27V - 3D Vision 2 - Ventus RTX 2080 TI (MSI) - i7 7700 - 16GB RAM - WIN 10 / WIN 7
Not easy to find lol
Asus Rog Swift PG27V - 3D Vision 2 - Ventus RTX 2080 TI (MSI) - i7 7700 - 16GB RAM - WIN 10 / WIN 7
You're welcome!
i wanna try to fix some unity5.3 5.4 dx11 early access games with the great unity templates
from DSS. i dont have programing knowledge how to set it up with cygwin and were to put the
scripts correctly. My question is can anyone please make a step by step guide or is it too
complicated for a non coder?
Thanks all for keepin 3d vision alive
I have tried most of the usual stuff, but it failed:(
Anyone has any idea on how to fix this one? (is a shadow Shader for the record ^_^)
Edit:
the VS is this:
Ps: Tried both the ASM and HLSL variant to fix (as I noticed the error there in HLSL ^_^)
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)
my first try with the PS will be this:
You see shadows separate (assuming shadows are 2D without any fix) with that code? no matter if there wrong, but at least separated (no 2D).
MY WEB
Helix Mod - Making 3D Better
My 3D Screenshot Gallery
Like my fixes? you can donate to Paypal: dhr.donation@gmail.com
Tried all the "hacks" in my book;) Both regular and less than trivial;)
After spending some time I am not sure this is the right shader;)
Yes it does separate the shadows that are affected by this shader, but it looks like is missing a FOV division :( (Or frustum correction).
Funny enough, I couldn't find the other PS for other shadows :(
So, I bet is a CS (out of the 120) that actually controls the shadow/lighting. I could find one VS for all shadows though! And trying any correction on that gives 2D => again looks like a CS is in the middle (between VS and PS ) ^_^
Many thanks again! If you wonder what the game is, is ELEX ;) If you feel brave and want to try something new, give this game a go ;)
Cheers,
Helifax
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)
Since in the headers you don't have the Projection Matrix (or the Inverse) you will need to use Frame Analysis for that later (probably the matrix is in an undeclared contant buffer or in the VS)
Now try to multiplicate the fix for a value that align the shadows...start with 0.5... (changing the signs)...now you need some test and try different combinations.
If you see that the shadows are aligned even eye to eye (paralel) or moved strange when you move the camera....we need a different approach.
MY WEB
Helix Mod - Making 3D Better
My 3D Screenshot Gallery
Like my fixes? you can donate to Paypal: dhr.donation@gmail.com
Close I came is this:
Shadows are in 3D but it seems they are pushed at infinity. They look OK in the background but too much separation near the character. This is because I only use the stereo separation.
Weird thing is that normally things are the other way around: They look ok close, but not far.
Again, I am running out of ideas :(
One thing to note: "vPos.x += stereo.x * (r1.z / stereo.y -1);" GIVES the EXACT same result as "vPos.x -= stereo.x;"
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)
Start with the fix i suggest:
In r1.z is the depth. you are not using it, that's why the shadows are paralel in each eye.
You need to try changing the signs of the formula and FOV. For FOV try a fix number first, don't use constant buffers directly...when you have the FOV number you have to use Frame Analysis to locate the constant buffer that holds that number.
MY WEB
Helix Mod - Making 3D Better
My 3D Screenshot Gallery
Like my fixes? you can donate to Paypal: dhr.donation@gmail.com
your shader is definitely the correct one. Looks like that is one of that games which needs some depth buffer offset and scaling.
I almost fixed a shadow shader which is responsible for the very near shadows in the starting area when looking directly east. It only needs some view direction correction. I got some approximate offset and scale numbers by trial and error but maybe we could identify the real numbers in some buffers.
PS e2152343856ed197:
Have you already experimented with HUD shaders in ELEX? Looks like there is some real madness there. They even use different pixel shaders for different characters within the same word. Not enough with that, as soon as you enable the vertex shader fix for different partner PS, there are a lot of double correction and clipping issues (works with only one PS enabled). I'll write more about that if I've done more experiments.
My 3D fixes with Helixmod for the Risen series on GitHub
Bo3b's School for Shaderhackers - starting point for your first 3D fix
DHR, I already tried all of this and already told you it doesn't work! Don't you think I wouldn't ask for help it was so "trivial" ? :) I tried all of the ABC of shadow fixing, including inverting the "EyeToLightSpace" matrix (I have no idea in what space that is.) I said "F@ck it, let's try". Also other fancy and much more complicated stuff;) I even tried to get the damn Projection Matrix from a different VS to apply the damn FOV.
The formula breaks the shadows completely (as the depth is wrong)
@mx-2:
I think is onto something there;)) And this is exactly what I believe is happening!
Have you tried dumping the CB constants (Frame Analysis? If I remember right, I think Unproject.x is 0.916 something) I think we need to use those "Unprojects" to correctly scale the depth buffer!
What are your thoughts?
I didn't look into the VS for the HUD. If is a double correction we can fix that (in the Pixel Shaders). I started with these shadows are they are driving me crazy:))
Edit:
The "unproject" cb looks like this:
cb0[5].x: 0.00106916716
cb0[5].y: -0.00106916716
cb0[5].z: -1.02640045
cb0[5].w: 0.577350259
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)
- There are some strange artifacts around the players head and on that junk on the left
- The far light is clipped on the left/right dependent on the rendered eye
Second problem is that strange decal vertex shader which has some strange "dcl_input_sgv v1.x, instance_id" and "dcl_output_siv o2.xyzw, position" registers. These prevent using HLSL and in addition everything in this shader behaves differently.
If I add some constant values to any of the outputs nothing happens. If I multiply on output with a constant slightly above 1, the objects move a bit. However, if I increase these values to about 1.8 the whole objects get clipped even though the PS is modified to output constant color.
Does anybody has an idea for a fix?
My 3D fixes with Helixmod for the Risen series on GitHub
Bo3b's School for Shaderhackers - starting point for your first 3D fix