So I've done my fair share of experimentation today based on DarkStarSword's suggestions, and unfortunately have not had successful results.
First I'll include my own attempt at code based on DSS's comments. As you'll note, I have multiple variations in the code all commented out now, but I had tried each one individually. As per DSS's excellent suggestion, params.y is a transitional constant from 0 to 1 that I use in the test code that REALLY helps in seeing exactly what is changing. All of the below was done without any correction done in the VS, only in the suggested area of the PS.
The results were nearly all identical: a slight shift, correcting some parts of the shadows on one axis while further separating other parts that were originally correct on another.
Before fix:
[img]https://forums.geforce.com/cmd/default/download-comment-attachment/66885/[/img]
After fix:
[img]https://forums.geforce.com/cmd/default/download-comment-attachment/66886/[/img]
Code:
[code]<snip>
//r1.xyz = r1.xyz + camera_pos.xyz;
/* My attempt at code
// Adding code to fix lighting/shadows
float4 params = IniParams.Load(0); float4 stereo = StereoParams.Load(0);
float separation = stereo.x; float convergence = stereo.y;
// Test shadows transition
if (params.y > 0)
{
r1.xyz = r1.yzw * r1.xxx;
/* Standard correction alone
r1.x -= separation * (r1.w - convergence) * params.y;
*/
/* DSS - View space option 1
//Interpretation 1
r1.x -= separation * (r1.w - convergence) * camera_inv_projection._m00 * params.y;
//Interpretation 2
r1.x = (r1.x - (separation * (r1.w - convergence))) * camera_inv_projection._m00 * params.y;
*/
/* DSS - View space option 2
//Interpretation 1
r1.x -= separation * (r1.w - convergence) / camera_projection._m00 * params.y;
//Interpretation 2
r1.x = (r1.x - (separation * (r1.w - convergence))) / camera_projection._m00 * params.y;
*/
/* DSS - View space option 3
r1 = mul(camera_projection, r1); // Also tried with camera_view matrix
r1.x -= separation * (r1.w - convergence) * params.y;
r1 = mul(camera_inv_projection, r1); // Also tried with camera_inv_view matrix
*/
// All of above followed by:
r1.xyz += camera_pos.xyz;
}
else
{
r1.xyz = r1.yzw * r1.xxx + camera_pos.xyz;
}
*/[/code]
I did not understand the 4th viewspace option to test that. Similarly, I could not determine what would have been different in the world space options vs what I had tried in the viewspace options, so didn't do any of those.
After a while of experimenting on all this, I then read the rest of DSS's post and realized he provided his very own coding for me to try, which I did, and unfortunately that REALLY broke things. It made the lights shift all over the place as the camera moved around. I tried with and without the correction in the VS. I'll include the code I used of his (with his comments removed, and a few of mine added) to have checked to make sure I didn't make any mistake in utilizing it.
[code]/* DarkStarSword's code
r1.xyz = r1.yzw * r1.xxx;
float4 stereo = StereoParams.Load(0);
float4 tmp;
tmp = mul(camera_view, float4(r1.xyz, 1)); // 0 made lights disappear
tmp = mul(camera_projection, tmp);
tmp = tmp / tmp.w; // Commenting this out changed the location, but still as broken as with it
tmp.x -= stereo.x * (tmp.z - stereo.y);
tmp = mul(camera_inv_projection, tmp);
tmp = mul(camera_inv_view, tmp);
r1.xyz = tmp.xyz / tmp.w; // Attempted without divide by tmp.w as well
r1.xyz = r1.xyz + camera_pos.xyz;
*/[/code]
I gotta say, this has been an excellent exercise. I've definitely learned a lot already... maybe not as much of "understanding how it works" but a fair bit of "learning how to do it" part (which, in my employment experience in IT support, that has always been the important part to come first and then the deeper understanding to follow), so I'm quite eager to keep at it.
So I've done my fair share of experimentation today based on DarkStarSword's suggestions, and unfortunately have not had successful results.
First I'll include my own attempt at code based on DSS's comments. As you'll note, I have multiple variations in the code all commented out now, but I had tried each one individually. As per DSS's excellent suggestion, params.y is a transitional constant from 0 to 1 that I use in the test code that REALLY helps in seeing exactly what is changing. All of the below was done without any correction done in the VS, only in the suggested area of the PS.
The results were nearly all identical: a slight shift, correcting some parts of the shadows on one axis while further separating other parts that were originally correct on another.
Before fix:
After fix:
Code:
<snip>
//r1.xyz = r1.xyz + camera_pos.xyz;
/* My attempt at code
// Adding code to fix lighting/shadows
float4 params = IniParams.Load(0); float4 stereo = StereoParams.Load(0);
float separation = stereo.x; float convergence = stereo.y;
// Test shadows transition
if (params.y > 0)
{
r1.xyz = r1.yzw * r1.xxx;
I did not understand the 4th viewspace option to test that. Similarly, I could not determine what would have been different in the world space options vs what I had tried in the viewspace options, so didn't do any of those.
After a while of experimenting on all this, I then read the rest of DSS's post and realized he provided his very own coding for me to try, which I did, and unfortunately that REALLY broke things. It made the lights shift all over the place as the camera moved around. I tried with and without the correction in the VS. I'll include the code I used of his (with his comments removed, and a few of mine added) to have checked to make sure I didn't make any mistake in utilizing it.
/* DarkStarSword's code
r1.xyz = r1.yzw * r1.xxx;
float4 stereo = StereoParams.Load(0);
float4 tmp;
tmp = mul(camera_view, float4(r1.xyz, 1)); // 0 made lights disappear
tmp = mul(camera_projection, tmp);
tmp = tmp / tmp.w; // Commenting this out changed the location, but still as broken as with it
tmp.x -= stereo.x * (tmp.z - stereo.y);
tmp = mul(camera_inv_projection, tmp);
tmp = mul(camera_inv_view, tmp);
r1.xyz = tmp.xyz / tmp.w; // Attempted without divide by tmp.w as well
r1.xyz = r1.xyz + camera_pos.xyz;
*/
I gotta say, this has been an excellent exercise. I've definitely learned a lot already... maybe not as much of "understanding how it works" but a fair bit of "learning how to do it" part (which, in my employment experience in IT support, that has always been the important part to come first and then the deeper understanding to follow), so I'm quite eager to keep at it.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
I for one would love to see a complete Vermintide fix, its a great game. Keep it up.
I'm finally delving deeper into this and am learning a hell of a lot and have one more tricky issue (to me anyway) to resolve before I can release my first contribution and update for the Guild wars 2 Expansion.
I have now made the fix 64x bit compatible, with the latest dll, removed the Sweet FX requirement and fixed the existing fixes presets to work with the later 64x dll, and improved the depth settings for various elements.
I am now currently trying to out right disable 3 UI textures that are part of the shader I am using texture filtering on which I have decided are just more of an annoyance and not particularly useful to the game. (part of characters life bars which are correct in stereo above their heads.)
A little confused how to go about this, since I am already using texture filtering on the offending shader to achieve crosshair to depth, and I don't see any particular mention to this scenario in the advanced features.
https://forums.geforce.com/default/topic/888367/3d-vision/guild-wars-2-expac-wip-action-cam-crosshair-fixed-64x-client-compatible-/2/?offset=17#4719667
as usual any help is much appreciated
I for one would love to see a complete Vermintide fix, its a great game. Keep it up.
I'm finally delving deeper into this and am learning a hell of a lot and have one more tricky issue (to me anyway) to resolve before I can release my first contribution and update for the Guild wars 2 Expansion.
I have now made the fix 64x bit compatible, with the latest dll, removed the Sweet FX requirement and fixed the existing fixes presets to work with the later 64x dll, and improved the depth settings for various elements.
I am now currently trying to out right disable 3 UI textures that are part of the shader I am using texture filtering on which I have decided are just more of an annoyance and not particularly useful to the game. (part of characters life bars which are correct in stereo above their heads.)
A little confused how to go about this, since I am already using texture filtering on the offending shader to achieve crosshair to depth, and I don't see any particular mention to this scenario in the advanced features.
i7-4790K CPU 4.8Ghz stable overclock.
16 GB RAM Corsair
ASUS Turbo 2080TI
Samsung SSD 840Pro
ASUS Z97-WS3D
Surround ASUS Rog Swift PG278Q(R), 2x PG278Q (yes it works)
Obutto R3volution.
Windows 10 pro 64x (Windows 7 Dual boot)
[quote="necropants"]I am now currently trying to out right disable 3 UI textures that are part of the shader I am using texture filtering on which I have decided are just more of an annoyance and not particularly useful to the game. (part of characters life bars which are correct in stereo above their heads.)
A little confused how to go about this, since I am already using texture filtering on the offending shader to achieve crosshair to depth, and I don't see any particular mention to this scenario in the advanced features.
[/quote]
To assign different values to different textures in a shader:
Dx9Settings.ini-
[code]//example shader
[VSC1E56494]
CheckTexCRC = true
VBOffsetList = 0;
ValForDefined = 2
ValNotDefined = 0
TexCounterReg = 254
UseDefinedOnly = false
DefinedTexturesVS = FAFAA202;C0FF5C55;6EDCD2FF;
[TEXC0FF5C55]
Index = 3
[TEX6EDCD2FF]
Index = 4
[VBC1E56494.0]
PointsList = 554[/code]
Here, FAFAA202 is assigned an index of 2, C0FF5C55 is assigned an index of 3, and 6EDCD2FF is assigned to 4.
And in the shader file:
[code] vs_3_0
def c100, 0, 0, 0, 0
def c247, 0.75, 2, 0.0625, 3
dcl_2d s0
..
..
texldl r24, c247.z, s0
mov r14.x, c254.x //move index value to temporary register
if_eq r14.x, c247.y //if Index = 2- for Crosshair
mul r24.x, r24.x, -c247.x
add r10.x, r10.x, -r24.x //push into depth
endif
if_eq r14.x, c247.w //if Index = 3- for health bars
mov r10, c100 //disable
endif
mov o0, r10
[/code]
Let me know if this helps or not.
necropants said:I am now currently trying to out right disable 3 UI textures that are part of the shader I am using texture filtering on which I have decided are just more of an annoyance and not particularly useful to the game. (part of characters life bars which are correct in stereo above their heads.)
A little confused how to go about this, since I am already using texture filtering on the offending shader to achieve crosshair to depth, and I don't see any particular mention to this scenario in the advanced features.
To assign different values to different textures in a shader:
[quote="DJ-RK"]So I've done my fair share of experimentation today based on DarkStarSword's suggestions, and unfortunately have not had successful results.
First I'll include my own attempt at code based on DSS's comments. As you'll note, I have multiple variations in the code all commented out now, but I had tried each one individually. As per DSS's excellent suggestion, params.y is a transitional constant from 0 to 1 that I use in the test code that REALLY helps in seeing exactly what is changing. All of the below was done without any correction done in the VS, only in the suggested area of the PS.
The results were nearly all identical: a slight shift, correcting some parts of the shadows on one axis while further separating other parts that were originally correct on another.
Before fix:
[img]https://forums.geforce.com/cmd/default/download-comment-attachment/66885/[/img]
After fix:
[img]https://forums.geforce.com/cmd/default/download-comment-attachment/66886/[/img]
Code:
[code]<snip>
//r1.xyz = r1.xyz + camera_pos.xyz;
/* My attempt at code
// Adding code to fix lighting/shadows
float4 params = IniParams.Load(0); float4 stereo = StereoParams.Load(0);
float separation = stereo.x; float convergence = stereo.y;
// Test shadows transition
if (params.y > 0)
{
r1.xyz = r1.yzw * r1.xxx;
/* Standard correction alone
r1.x -= separation * (r1.w - convergence) * params.y;
*/
/* DSS - View space option 1
//Interpretation 1
r1.x -= separation * (r1.w - convergence) * camera_inv_projection._m00 * params.y;
//Interpretation 2
r1.x = (r1.x - (separation * (r1.w - convergence))) * camera_inv_projection._m00 * params.y;
*/
/* DSS - View space option 2
//Interpretation 1
r1.x -= separation * (r1.w - convergence) / camera_projection._m00 * params.y;
//Interpretation 2
r1.x = (r1.x - (separation * (r1.w - convergence))) / camera_projection._m00 * params.y;
*/
/* DSS - View space option 3
r1 = mul(camera_projection, r1); // Also tried with camera_view matrix
r1.x -= separation * (r1.w - convergence) * params.y;
r1 = mul(camera_inv_projection, r1); // Also tried with camera_inv_view matrix
*/
// All of above followed by:
r1.xyz += camera_pos.xyz;
}
else
{
r1.xyz = r1.yzw * r1.xxx + camera_pos.xyz;
}
*/[/code]
I did not understand the 4th viewspace option to test that. Similarly, I could not determine what would have been different in the world space options vs what I had tried in the viewspace options, so didn't do any of those.
After a while of experimenting on all this, I then read the rest of DSS's post and realized he provided his very own coding for me to try, which I did, and unfortunately that REALLY broke things. It made the lights shift all over the place as the camera moved around. I tried with and without the correction in the VS. I'll include the code I used of his (with his comments removed, and a few of mine added) to have checked to make sure I didn't make any mistake in utilizing it.
[code]/* DarkStarSword's code
r1.xyz = r1.yzw * r1.xxx;
float4 stereo = StereoParams.Load(0);
float4 tmp;
tmp = mul(camera_view, float4(r1.xyz, 1)); // 0 made lights disappear
tmp = mul(camera_projection, tmp);
tmp = tmp / tmp.w; // Commenting this out changed the location, but still as broken as with it
tmp.x -= stereo.x * (tmp.z - stereo.y);
tmp = mul(camera_inv_projection, tmp);
tmp = mul(camera_inv_view, tmp);
r1.xyz = tmp.xyz / tmp.w; // Attempted without divide by tmp.w as well
r1.xyz = r1.xyz + camera_pos.xyz;
*/[/code]
I gotta say, this has been an excellent exercise. I've definitely learned a lot already... maybe not as much of "understanding how it works" but a fair bit of "learning how to do it" part (which, in my employment experience in IT support, that has always been the important part to come first and then the deeper understanding to follow), so I'm quite eager to keep at it.[/quote]
I've not followed all this thread or what Darkstarsword posted, but there are a couple of errors in your different attempts.
- In the various Viewspace options 1 & 2 you need to be correcting with r1.z, not r1.w
- In Viewspace option 3 you need to make sure you set r1.w=1 before doing the matrix multiplication.
- In the other attempt at doing the tarnsformation via View and Projection (the one you said goes all over the place), this has to be done on the World Coord, which is (r1.yzw * r1.xxx + camera_pos.xyz)
Give each a go and see if you have any luck.
DJ-RK said:So I've done my fair share of experimentation today based on DarkStarSword's suggestions, and unfortunately have not had successful results.
First I'll include my own attempt at code based on DSS's comments. As you'll note, I have multiple variations in the code all commented out now, but I had tried each one individually. As per DSS's excellent suggestion, params.y is a transitional constant from 0 to 1 that I use in the test code that REALLY helps in seeing exactly what is changing. All of the below was done without any correction done in the VS, only in the suggested area of the PS.
The results were nearly all identical: a slight shift, correcting some parts of the shadows on one axis while further separating other parts that were originally correct on another.
Before fix:
After fix:
Code:
<snip>
//r1.xyz = r1.xyz + camera_pos.xyz;
/* My attempt at code
// Adding code to fix lighting/shadows
float4 params = IniParams.Load(0); float4 stereo = StereoParams.Load(0);
float separation = stereo.x; float convergence = stereo.y;
// Test shadows transition
if (params.y > 0)
{
r1.xyz = r1.yzw * r1.xxx;
I did not understand the 4th viewspace option to test that. Similarly, I could not determine what would have been different in the world space options vs what I had tried in the viewspace options, so didn't do any of those.
After a while of experimenting on all this, I then read the rest of DSS's post and realized he provided his very own coding for me to try, which I did, and unfortunately that REALLY broke things. It made the lights shift all over the place as the camera moved around. I tried with and without the correction in the VS. I'll include the code I used of his (with his comments removed, and a few of mine added) to have checked to make sure I didn't make any mistake in utilizing it.
/* DarkStarSword's code
r1.xyz = r1.yzw * r1.xxx;
float4 stereo = StereoParams.Load(0);
float4 tmp;
tmp = mul(camera_view, float4(r1.xyz, 1)); // 0 made lights disappear
tmp = mul(camera_projection, tmp);
tmp = tmp / tmp.w; // Commenting this out changed the location, but still as broken as with it
tmp.x -= stereo.x * (tmp.z - stereo.y);
tmp = mul(camera_inv_projection, tmp);
tmp = mul(camera_inv_view, tmp);
r1.xyz = tmp.xyz / tmp.w; // Attempted without divide by tmp.w as well
r1.xyz = r1.xyz + camera_pos.xyz;
*/
I gotta say, this has been an excellent exercise. I've definitely learned a lot already... maybe not as much of "understanding how it works" but a fair bit of "learning how to do it" part (which, in my employment experience in IT support, that has always been the important part to come first and then the deeper understanding to follow), so I'm quite eager to keep at it.
I've not followed all this thread or what Darkstarsword posted, but there are a couple of errors in your different attempts.
- In the various Viewspace options 1 & 2 you need to be correcting with r1.z, not r1.w
- In Viewspace option 3 you need to make sure you set r1.w=1 before doing the matrix multiplication.
- In the other attempt at doing the tarnsformation via View and Projection (the one you said goes all over the place), this has to be done on the World Coord, which is (r1.yzw * r1.xxx + camera_pos.xyz)
[quote="mike_ar69"]I've not followed all this thread or what Darkstarsword posted, but there are a couple of errors in your different attempts.
- In the various Viewspace options 1 & 2 you need to be correcting with r1.z, not r1.w
- In Viewspace option 3 you need to make sure you set r1.w=1 before doing the matrix multiplication.
- In the other attempt at doing the tarnsformation via View and Projection (the one you said goes all over the place), this has to be done on the World Coord, which is (r1.yzw * r1.xxx + camera_pos.xyz)
Give each a go and see if you have any luck.[/quote]
Thanks Mike, I really appreciate you taking a look and providing your feedback, but unfortunately I tried all your suggestions and none of them worked.
I've tried experimenting more with the code on my own, without success, so at this point I'm back to researching bo3b's materials further to try to get a better understanding and then come back to it. I have, however, fixed another couple broken effects (broken water reflections), so I am still making progress on the fix, however these lights and shadows seem to be extremely stubborn.
mike_ar69 said:I've not followed all this thread or what Darkstarsword posted, but there are a couple of errors in your different attempts.
- In the various Viewspace options 1 & 2 you need to be correcting with r1.z, not r1.w
- In Viewspace option 3 you need to make sure you set r1.w=1 before doing the matrix multiplication.
- In the other attempt at doing the tarnsformation via View and Projection (the one you said goes all over the place), this has to be done on the World Coord, which is (r1.yzw * r1.xxx + camera_pos.xyz)
Give each a go and see if you have any luck.
Thanks Mike, I really appreciate you taking a look and providing your feedback, but unfortunately I tried all your suggestions and none of them worked.
I've tried experimenting more with the code on my own, without success, so at this point I'm back to researching bo3b's materials further to try to get a better understanding and then come back to it. I have, however, fixed another couple broken effects (broken water reflections), so I am still making progress on the fix, however these lights and shadows seem to be extremely stubborn.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Now I am puzzled...
I'm downloading this game just for the kicks:))
Can you post me the location where I can find your fix so far? And can you also please tell me what are the shaders that you found related to the shadows?
I'll try to give a quick look;))
Cheers!
Now I am puzzled...
I'm downloading this game just for the kicks:))
Can you post me the location where I can find your fix so far? And can you also please tell me what are the shaders that you found related to the shadows?
I'll try to give a quick look;))
Cheers!
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
[quote="DJ-RK"][quote="mike_ar69"]I've not followed all this thread or what Darkstarsword posted, but there are a couple of errors in your different attempts.
- In the various Viewspace options 1 & 2 you need to be correcting with r1.z, not r1.w
- In Viewspace option 3 you need to make sure you set r1.w=1 before doing the matrix multiplication.
- In the other attempt at doing the tarnsformation via View and Projection (the one you said goes all over the place), this has to be done on the World Coord, which is (r1.yzw * r1.xxx + camera_pos.xyz)
Give each a go and see if you have any luck.[/quote]
Thanks Mike, I really appreciate you taking a look and providing your feedback, but unfortunately I tried all your suggestions and none of them worked.
I've tried experimenting more with the code on my own, without success, so at this point I'm back to researching bo3b's materials further to try to get a better understanding and then come back to it. I have, however, fixed another couple broken effects (broken water reflections), so I am still making progress on the fix, however these lights and shadows seem to be extremely stubborn.[/quote]
No problem - it was worth a try. Another thing I forgot to mention is that sometimes you need to use "-r1.z". Perhaps give that a whirl. Without the game I can't try it myself. As someone else mentioned, at some point it's a lot of trial and error. Good luck with it though :-)
mike_ar69 said:I've not followed all this thread or what Darkstarsword posted, but there are a couple of errors in your different attempts.
- In the various Viewspace options 1 & 2 you need to be correcting with r1.z, not r1.w
- In Viewspace option 3 you need to make sure you set r1.w=1 before doing the matrix multiplication.
- In the other attempt at doing the tarnsformation via View and Projection (the one you said goes all over the place), this has to be done on the World Coord, which is (r1.yzw * r1.xxx + camera_pos.xyz)
Give each a go and see if you have any luck.
Thanks Mike, I really appreciate you taking a look and providing your feedback, but unfortunately I tried all your suggestions and none of them worked.
I've tried experimenting more with the code on my own, without success, so at this point I'm back to researching bo3b's materials further to try to get a better understanding and then come back to it. I have, however, fixed another couple broken effects (broken water reflections), so I am still making progress on the fix, however these lights and shadows seem to be extremely stubborn.
No problem - it was worth a try. Another thing I forgot to mention is that sometimes you need to use "-r1.z". Perhaps give that a whirl. Without the game I can't try it myself. As someone else mentioned, at some point it's a lot of trial and error. Good luck with it though :-)
[quote="helifax"]Now I am puzzled...
I'm downloading this game just for the kicks:))
Can you post me the location where I can find your fix so far? And can you also please tell me what are the shaders that you found related to the shadows?
I'll try to give a quick look;))
Cheers![/quote]
The window lighting on the table is in the inn, which is the hub for the game, so the first place you start in. The 2nd set of photos with the lights on the bridge are the first set of broken lights you come across in the first level.
I can give you the shader CRC's or attach the files on here if you want. Not too hard to find them, though.
Edit: Oh, I just realized you asked where my existing fix is, so here's the link: http://www.mediafire.com/download/mp146z24ofkzao1/Warhammer_Vermintide_Fix_v0.2.zip
Doesn't contain any of the shaders that I haven't fixed yet, ie. the ones in these examples I've posted.
@Mike: I gave that other last suggestion a try as well, on all the different variations and still nothing. Indeed, back to experimenting more.
helifax said:Now I am puzzled...
I'm downloading this game just for the kicks:))
Can you post me the location where I can find your fix so far? And can you also please tell me what are the shaders that you found related to the shadows?
I'll try to give a quick look;))
Cheers!
The window lighting on the table is in the inn, which is the hub for the game, so the first place you start in. The 2nd set of photos with the lights on the bridge are the first set of broken lights you come across in the first level.
I can give you the shader CRC's or attach the files on here if you want. Not too hard to find them, though.
Doesn't contain any of the shaders that I haven't fixed yet, ie. the ones in these examples I've posted.
@Mike: I gave that other last suggestion a try as well, on all the different variations and still nothing. Indeed, back to experimenting more.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
*praying Helifax gets into the game and is compelled to help fix it. I think its a blast. =)
i7-4790K CPU 4.8Ghz stable overclock.
16 GB RAM Corsair
ASUS Turbo 2080TI
Samsung SSD 840Pro
ASUS Z97-WS3D
Surround ASUS Rog Swift PG278Q(R), 2x PG278Q (yes it works)
Obutto R3volution.
Windows 10 pro 64x (Windows 7 Dual boot)
[quote="DJ-RK"][quote="helifax"]Now I am puzzled...
I'm downloading this game just for the kicks:))
Can you post me the location where I can find your fix so far? And can you also please tell me what are the shaders that you found related to the shadows?
I'll try to give a quick look;))
Cheers![/quote]
The window lighting on the table is in the inn, which is the hub for the game, so the first place you start in. The 2nd set of photos with the lights on the bridge are the first set of broken lights you come across in the first level.
I can give you the shader CRC's or attach the files on here if you want. Not too hard to find them, though.
Edit: Oh, I just realized you asked where my existing fix is, so here's the link: http://www.mediafire.com/download/mp146z24ofkzao1/Warhammer_Vermintide_Fix_v0.2.zip
Doesn't contain any of the shaders that I haven't fixed yet, ie. the ones in these examples I've posted.
@Mike: I gave that other last suggestion a try as well, on all the different variations and still nothing. Indeed, back to experimenting more.[/quote]
Big thanks for the WIP;)) It will have to wait a bit as I am having some hardware issues with my laptop currently. Once I'll fix it, I'll take a look;)
cheers!
helifax said:Now I am puzzled...
I'm downloading this game just for the kicks:))
Can you post me the location where I can find your fix so far? And can you also please tell me what are the shaders that you found related to the shadows?
I'll try to give a quick look;))
Cheers!
The window lighting on the table is in the inn, which is the hub for the game, so the first place you start in. The 2nd set of photos with the lights on the bridge are the first set of broken lights you come across in the first level.
I can give you the shader CRC's or attach the files on here if you want. Not too hard to find them, though.
Doesn't contain any of the shaders that I haven't fixed yet, ie. the ones in these examples I've posted.
@Mike: I gave that other last suggestion a try as well, on all the different variations and still nothing. Indeed, back to experimenting more.
Big thanks for the WIP;)) It will have to wait a bit as I am having some hardware issues with my laptop currently. Once I'll fix it, I'll take a look;)
cheers!
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've slightly shifted my focus to working on another game as an easier example to help me learn (and will return to Vermintide shortly). It's a Dx9 game, and shadows are in 2D. I'm using Mike's comments in the Shogun discussion previously linked as a basis for the fix, and I believe I've located the correct location to fix. Problem is, I've only been able to locate the registers for the projection matrix, but there does not seem to be any for an inv projection matrix, and I'm confident I've done a thorough search through all the dumps. Is there any way for me to either build my own inv proj matrix, or otherwise perform equivalent calculations in ASM, using the existing projection matrix as a basis?
I've included the code from the PS that I've implemented up to this point.
dp4 r11.x, r10, c102 <--Am using the VPM here
dp4 r11.y, r10, c103
dp4 r11.z, r10, c104
dp4 r11.w, r10, c105
texldl r24, c2.x, s13 //c2.x is an already defined constant with stereo fix value
add r24.y, r11.w, -r24.y
mul r24.x, r24.x, r24.y
add r11.x, r11.x, -r24.x
//Here is where inverse VPM should occur, but no registers exist for it. The following is code from Mike's example
dp4 r10.x, r11, c20 <-- Use the inverse VPM here
dp4 r10.y, r11, c21
dp4 r10.z, r11, c22
dp4 r10.w, r11, c23
// approximately 88 instruction slots used (17 texture, 71 arithmetic)
Edit: Also, how do you divide in ASM shader code for Christ's sake? I managed to fix some lights rendered at depth/in 2D, but I did it by multiplying the correction by a fixed value of 0.25, which I'm assuming would be the same as dividing by the projection matrix m00 component, but for the life of me I can't find the correct operand for division, if one even exists. In one of my resources it says there is an operand DIV in ASM, but that doesn't seem to work, and the MSDN library for shader ASM doesn't provide any operands for division. Really starting to hate working with Dx9 games and wishing HLSL/3DMigoto was usable instead.
*Bangs face on keyboard*
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Where has c102-c105 come from in that shader? It's not defined in the shader and I don't see it listed in the headers, so the game isn't passing it in.
If you are copying that matrix from another shader with Helix Mod, you can use Helix mod to inverse it for you (unless it's a 3x4 matrix like Unity 5 has started using). e.g. if you were copying the view-projection matrix from c4-c7 in vertex shader 11111111 you could do something like this:
[code]
[VS11111111]
GetMatrixFromReg = 4
InverseMatrix = true
DoubleInverseMatrix = true
[VS22222222]
UseMatrix = true
MatrixReg = 200
[/code]
Then you would have the inverse view-projection matrix in c200-c203 and the forward view-projection matrix in c204-c207 (because DoubleInverseMatrix will inverse the inverse, which is almost the same as not inversing it, but means we can use just one of the two available matrix copy slots in Helix Mod to effectively copy two matrices).
If you just want to inverse a matrix that is already available in a shader you can do much the same thing, just put everything in a single section for the shader (and in that case you probably wouldn't bother with DoubleInverseMatrix since you already have the forwards matrix).
http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List
As for division - in SM3/DX9 there is no division operation (that's SM4/DX10 and above), but there is a reciprocal instruction you can use instead to multiply by 1/x, which is effectively the same thing as a division. e.g. to divide r31.x by r4.x you would do:
[code]
rcp r31.w, r4.x
mul r31.x, r31.x, r31.w
[/code]
If you are wondering why, it's because a "division" is a *very* slow operation, many times slower than a multiplication, so it is best avoided. But, thanks to a really interesting properly of how floating point numbers are encoded for IEEE 754, the reciprocal can be approximated very quickly by using an integer subtraction (I'd guess that the hardware might do something a little more accurate than this unless the partial precision modifier is used, but still should be many times faster than a true division):
[url]https://en.wikipedia.org/wiki/Floating_point#Piecewise_linear_approximation_to_exponential_and_logarithm[/url]
Where has c102-c105 come from in that shader? It's not defined in the shader and I don't see it listed in the headers, so the game isn't passing it in.
If you are copying that matrix from another shader with Helix Mod, you can use Helix mod to inverse it for you (unless it's a 3x4 matrix like Unity 5 has started using). e.g. if you were copying the view-projection matrix from c4-c7 in vertex shader 11111111 you could do something like this:
Then you would have the inverse view-projection matrix in c200-c203 and the forward view-projection matrix in c204-c207 (because DoubleInverseMatrix will inverse the inverse, which is almost the same as not inversing it, but means we can use just one of the two available matrix copy slots in Helix Mod to effectively copy two matrices).
If you just want to inverse a matrix that is already available in a shader you can do much the same thing, just put everything in a single section for the shader (and in that case you probably wouldn't bother with DoubleInverseMatrix since you already have the forwards matrix).
http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List
As for division - in SM3/DX9 there is no division operation (that's SM4/DX10 and above), but there is a reciprocal instruction you can use instead to multiply by 1/x, which is effectively the same thing as a division. e.g. to divide r31.x by r4.x you would do:
rcp r31.w, r4.x
mul r31.x, r31.x, r31.w
If you are wondering why, it's because a "division" is a *very* slow operation, many times slower than a multiplication, so it is best avoided. But, thanks to a really interesting properly of how floating point numbers are encoded for IEEE 754, the reciprocal can be approximated very quickly by using an integer subtraction (I'd guess that the hardware might do something a little more accurate than this unless the partial precision modifier is used, but still should be many times faster than a true division): https://en.wikipedia.org/wiki/Floating_point#Piecewise_linear_approximation_to_exponential_and_logarithm
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
i will add to my notes :)
MY WEB
Helix Mod - Making 3D Better
My 3D Screenshot Gallery
Like my fixes? you can donate to Paypal: dhr.donation@gmail.com
First I'll include my own attempt at code based on DSS's comments. As you'll note, I have multiple variations in the code all commented out now, but I had tried each one individually. As per DSS's excellent suggestion, params.y is a transitional constant from 0 to 1 that I use in the test code that REALLY helps in seeing exactly what is changing. All of the below was done without any correction done in the VS, only in the suggested area of the PS.
The results were nearly all identical: a slight shift, correcting some parts of the shadows on one axis while further separating other parts that were originally correct on another.
Before fix:
After fix:
Code:
I did not understand the 4th viewspace option to test that. Similarly, I could not determine what would have been different in the world space options vs what I had tried in the viewspace options, so didn't do any of those.
After a while of experimenting on all this, I then read the rest of DSS's post and realized he provided his very own coding for me to try, which I did, and unfortunately that REALLY broke things. It made the lights shift all over the place as the camera moved around. I tried with and without the correction in the VS. I'll include the code I used of his (with his comments removed, and a few of mine added) to have checked to make sure I didn't make any mistake in utilizing it.
I gotta say, this has been an excellent exercise. I've definitely learned a lot already... maybe not as much of "understanding how it works" but a fair bit of "learning how to do it" part (which, in my employment experience in IT support, that has always been the important part to come first and then the deeper understanding to follow), so I'm quite eager to keep at it.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
I'm finally delving deeper into this and am learning a hell of a lot and have one more tricky issue (to me anyway) to resolve before I can release my first contribution and update for the Guild wars 2 Expansion.
I have now made the fix 64x bit compatible, with the latest dll, removed the Sweet FX requirement and fixed the existing fixes presets to work with the later 64x dll, and improved the depth settings for various elements.
I am now currently trying to out right disable 3 UI textures that are part of the shader I am using texture filtering on which I have decided are just more of an annoyance and not particularly useful to the game. (part of characters life bars which are correct in stereo above their heads.)
A little confused how to go about this, since I am already using texture filtering on the offending shader to achieve crosshair to depth, and I don't see any particular mention to this scenario in the advanced features.
https://forums.geforce.com/default/topic/888367/3d-vision/guild-wars-2-expac-wip-action-cam-crosshair-fixed-64x-client-compatible-/2/?offset=17#4719667
as usual any help is much appreciated
i7-4790K CPU 4.8Ghz stable overclock.
16 GB RAM Corsair
ASUS Turbo 2080TI
Samsung SSD 840Pro
ASUS Z97-WS3D
Surround ASUS Rog Swift PG278Q(R), 2x PG278Q (yes it works)
Obutto R3volution.
Windows 10 pro 64x (Windows 7 Dual boot)
To assign different values to different textures in a shader:
Dx9Settings.ini-
Here, FAFAA202 is assigned an index of 2, C0FF5C55 is assigned an index of 3, and 6EDCD2FF is assigned to 4.
And in the shader file:
Let me know if this helps or not.
Dual boot Win 7 x64 & Win 10 (1809) | Geforce Drivers 417.35
I've not followed all this thread or what Darkstarsword posted, but there are a couple of errors in your different attempts.
- In the various Viewspace options 1 & 2 you need to be correcting with r1.z, not r1.w
- In Viewspace option 3 you need to make sure you set r1.w=1 before doing the matrix multiplication.
- In the other attempt at doing the tarnsformation via View and Projection (the one you said goes all over the place), this has to be done on the World Coord, which is (r1.yzw * r1.xxx + camera_pos.xyz)
Give each a go and see if you have any luck.
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278
Thanks Mike, I really appreciate you taking a look and providing your feedback, but unfortunately I tried all your suggestions and none of them worked.
I've tried experimenting more with the code on my own, without success, so at this point I'm back to researching bo3b's materials further to try to get a better understanding and then come back to it. I have, however, fixed another couple broken effects (broken water reflections), so I am still making progress on the fix, however these lights and shadows seem to be extremely stubborn.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
I'm downloading this game just for the kicks:))
Can you post me the location where I can find your fix so far? And can you also please tell me what are the shaders that you found related to the shadows?
I'll try to give a quick look;))
Cheers!
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)
No problem - it was worth a try. Another thing I forgot to mention is that sometimes you need to use "-r1.z". Perhaps give that a whirl. Without the game I can't try it myself. As someone else mentioned, at some point it's a lot of trial and error. Good luck with it though :-)
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278
https://steamcommunity.com/profiles/76561198014296177/
and this one for Diablo 3 ?
https://steamcommunity.com/profiles/76561198014296177/
The window lighting on the table is in the inn, which is the hub for the game, so the first place you start in. The 2nd set of photos with the lights on the bridge are the first set of broken lights you come across in the first level.
I can give you the shader CRC's or attach the files on here if you want. Not too hard to find them, though.
Edit: Oh, I just realized you asked where my existing fix is, so here's the link: http://www.mediafire.com/download/mp146z24ofkzao1/Warhammer_Vermintide_Fix_v0.2.zip
Doesn't contain any of the shaders that I haven't fixed yet, ie. the ones in these examples I've posted.
@Mike: I gave that other last suggestion a try as well, on all the different variations and still nothing. Indeed, back to experimenting more.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
i7-4790K CPU 4.8Ghz stable overclock.
16 GB RAM Corsair
ASUS Turbo 2080TI
Samsung SSD 840Pro
ASUS Z97-WS3D
Surround ASUS Rog Swift PG278Q(R), 2x PG278Q (yes it works)
Obutto R3volution.
Windows 10 pro 64x (Windows 7 Dual boot)
Big thanks for the WIP;)) It will have to wait a bit as I am having some hardware issues with my laptop currently. Once I'll fix it, I'll take a look;)
cheers!
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)
I've included the code from the PS that I've implemented up to this point.
Edit: Also, how do you divide in ASM shader code for Christ's sake? I managed to fix some lights rendered at depth/in 2D, but I did it by multiplying the correction by a fixed value of 0.25, which I'm assuming would be the same as dividing by the projection matrix m00 component, but for the life of me I can't find the correct operand for division, if one even exists. In one of my resources it says there is an operand DIV in ASM, but that doesn't seem to work, and the MSDN library for shader ASM doesn't provide any operands for division. Really starting to hate working with Dx9 games and wishing HLSL/3DMigoto was usable instead.
*Bangs face on keyboard*
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
If you are copying that matrix from another shader with Helix Mod, you can use Helix mod to inverse it for you (unless it's a 3x4 matrix like Unity 5 has started using). e.g. if you were copying the view-projection matrix from c4-c7 in vertex shader 11111111 you could do something like this:
Then you would have the inverse view-projection matrix in c200-c203 and the forward view-projection matrix in c204-c207 (because DoubleInverseMatrix will inverse the inverse, which is almost the same as not inversing it, but means we can use just one of the two available matrix copy slots in Helix Mod to effectively copy two matrices).
If you just want to inverse a matrix that is already available in a shader you can do much the same thing, just put everything in a single section for the shader (and in that case you probably wouldn't bother with DoubleInverseMatrix since you already have the forwards matrix).
http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List
As for division - in SM3/DX9 there is no division operation (that's SM4/DX10 and above), but there is a reciprocal instruction you can use instead to multiply by 1/x, which is effectively the same thing as a division. e.g. to divide r31.x by r4.x you would do:
If you are wondering why, it's because a "division" is a *very* slow operation, many times slower than a multiplication, so it is best avoided. But, thanks to a really interesting properly of how floating point numbers are encoded for IEEE 754, the reciprocal can be approximated very quickly by using an integer subtraction (I'd guess that the hardware might do something a little more accurate than this unless the partial precision modifier is used, but still should be many times faster than a true division):
https://en.wikipedia.org/wiki/Floating_point#Piecewise_linear_approximation_to_exponential_and_logarithm
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