[quote="tonka"]Could you give me an actual example of code for pushing the HUD into depth. I would expect to change the z value but you say in the formula x and why is it added ?[/quote]I'm pretty sure bo3b covered why we adjust x in his lessons (hint - it's to do with the fact that this is stereo rendering, which is just 2x 2D images from slightly different perspectives, and not a holographic display).
We would never adjust z (unless we were actually adjusting w) because that only changes the value written to the Z-buffer. Technically we could adjust w to change the depth (along with x, y and z since they are all divided by w in the rasterizer), but that's not a good idea as it messes with the driver's heuristics to detect UI elements and bring them to screen depth, so the adjustment would either not work as you expect, or the maths will get more complicated to work correctly in tandem with the driver's adjustment under all possible circumstances.
[quote]I have now found an example in Legend of Grimrock 2.[/quote]This looks to be a fairly complicated example since it is performing three different adjustments depending on a value passed from Helix Mod (probably for texture filtering).
Here's an example from one of the first games I looked at before I scripted UI adjustments - this adjusts the UI depth to the Const1 value from DX9Settings.ini (it also adds two presets with an aiming convergence override):
https://github.com/DarkStarSword/3d-fixes/commit/ac6470011aa2e3876a380b52abe6833f121dd4d6
You may notice that I tried to use "DefPreset" in that commit, which was deprecated and removed from the latest Helix Mod - I should have used UseByDef = true inside the [PRES1] section instead.
Here's a later example from after I scripted the process in shadertool.py - this script simultaneously upgraded the shader to vs_3_0 as it applied the depth adjustment. Again, the depth comes from a value in the DX9Settings.ini, this time Const3 (the changes to the ini to set this are not shown here):
https://github.com/DarkStarSword/3d-fixes/commit/f27dfcc6907ab880f3c808f19b0b06beb690d80b
[quote]Why is he multiplying with a negative number and then adding with the same value negative ?[/quote]I suspect there is no reason - most likely he was experimenting with a few things and once he got it working he just left the code as is. I believe you are correct that code should have the same effect if both negations were removed.
[quote]I made a change in the vertex shader and now I see the ground shadows in the right place but they are all flickering like mad and there are weird shadows on the rocks - what causes that ?[/quote]If you are getting flickering it most likely means you are using an uninitialised value.
It could also mean that an error in the shader (the one that always gets me is reading from a masked component of an input register) has messed up the GPU state which in some cases might need the game to be restarted to clear out (if you notice that things keep breaking in weird and exciting ways while repeatedly pressing F10 without changing anything else, this has happened).
[quote]These are the shadow shaders, I think.[/quote]Looks complex, and doesn't appear to follow any of the shadow patterns I'm familiar with - unless someone has already worked out how to fix shadows in this engine you should just disable these, as IMO out of all the effects that are possible to fix, shadows are probably the 2nd hardest (the hardest being screen space reflections - fortunately most games don't use those). They would require a pretty deep understanding of the maths as well as a whole lot of study and experimentation to even guess how to fix them. Plus, without headers in the shaders you are flying completely blind.
tonka said:Could you give me an actual example of code for pushing the HUD into depth. I would expect to change the z value but you say in the formula x and why is it added ?
I'm pretty sure bo3b covered why we adjust x in his lessons (hint - it's to do with the fact that this is stereo rendering, which is just 2x 2D images from slightly different perspectives, and not a holographic display).
We would never adjust z (unless we were actually adjusting w) because that only changes the value written to the Z-buffer. Technically we could adjust w to change the depth (along with x, y and z since they are all divided by w in the rasterizer), but that's not a good idea as it messes with the driver's heuristics to detect UI elements and bring them to screen depth, so the adjustment would either not work as you expect, or the maths will get more complicated to work correctly in tandem with the driver's adjustment under all possible circumstances.
I have now found an example in Legend of Grimrock 2.
This looks to be a fairly complicated example since it is performing three different adjustments depending on a value passed from Helix Mod (probably for texture filtering).
You may notice that I tried to use "DefPreset" in that commit, which was deprecated and removed from the latest Helix Mod - I should have used UseByDef = true inside the [PRES1] section instead.
Here's a later example from after I scripted the process in shadertool.py - this script simultaneously upgraded the shader to vs_3_0 as it applied the depth adjustment. Again, the depth comes from a value in the DX9Settings.ini, this time Const3 (the changes to the ini to set this are not shown here):
https://github.com/DarkStarSword/3d-fixes/commit/f27dfcc6907ab880f3c808f19b0b06beb690d80b
Why is he multiplying with a negative number and then adding with the same value negative ?
I suspect there is no reason - most likely he was experimenting with a few things and once he got it working he just left the code as is. I believe you are correct that code should have the same effect if both negations were removed.
I made a change in the vertex shader and now I see the ground shadows in the right place but they are all flickering like mad and there are weird shadows on the rocks - what causes that ?
If you are getting flickering it most likely means you are using an uninitialised value.
It could also mean that an error in the shader (the one that always gets me is reading from a masked component of an input register) has messed up the GPU state which in some cases might need the game to be restarted to clear out (if you notice that things keep breaking in weird and exciting ways while repeatedly pressing F10 without changing anything else, this has happened).
These are the shadow shaders, I think.
Looks complex, and doesn't appear to follow any of the shadow patterns I'm familiar with - unless someone has already worked out how to fix shadows in this engine you should just disable these, as IMO out of all the effects that are possible to fix, shadows are probably the 2nd hardest (the hardest being screen space reflections - fortunately most games don't use those). They would require a pretty deep understanding of the maths as well as a whole lot of study and experimentation to even guess how to fix them. Plus, without headers in the shaders you are flying completely blind.
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
@bo3b, Ok I haven't done the exercises but instead I fixed an unknown game (Vapour - DX11 so 3Dmitogo) with DarkStarSword's help. I am no newcomer to programming, I have been doing it for 43 years and I have programmed data communication, videotext and a lot of commercial programming but 3D is completely new to me. Also I did look at the lessons quite comprehensively but I didn't see anything about pushing the HUD into depth so sorry if you think that I am occupying someone's time needlessly. I am very grateful for the work that you put in to doing the school in any case. BTW I have made an account by the wiki but I am not receiving my confirmation email.
I didn't finish Vapour but as far as I can see almost all broken effects are fixed, only the intro is on rails so I couldn't fix it. I could put it on the blog but I have no idea how to do that.
I now want to fix Empyrion - Galactic Survival which seems pretty good in 3D and Into the Stars which although being Unreal engine is pretty broken.
Does helixmod see no difference between NUM 1 and CTRL+NUM 1. I want to have all my stereoscopic keyboard shortcuts on CTRL+NUM keys but if I change convergence with CTRL+NUM 1 it also cycles the pixel shader which is not the intention.
@DarkStarSword, big thanks again for all the help that you have given me. That example from Legend of Grimrock 2 was so you could have 3 cycling HUD depths via a key. Shame about the shadows because you lose a lot of the atmosphere with them disabled but I am not sure that it is such a good game anyway - I played the original top-down version and received that one almost for free.
@bo3b, Ok I haven't done the exercises but instead I fixed an unknown game (Vapour - DX11 so 3Dmitogo) with DarkStarSword's help. I am no newcomer to programming, I have been doing it for 43 years and I have programmed data communication, videotext and a lot of commercial programming but 3D is completely new to me. Also I did look at the lessons quite comprehensively but I didn't see anything about pushing the HUD into depth so sorry if you think that I am occupying someone's time needlessly. I am very grateful for the work that you put in to doing the school in any case. BTW I have made an account by the wiki but I am not receiving my confirmation email.
I didn't finish Vapour but as far as I can see almost all broken effects are fixed, only the intro is on rails so I couldn't fix it. I could put it on the blog but I have no idea how to do that.
I now want to fix Empyrion - Galactic Survival which seems pretty good in 3D and Into the Stars which although being Unreal engine is pretty broken.
Does helixmod see no difference between NUM 1 and CTRL+NUM 1. I want to have all my stereoscopic keyboard shortcuts on CTRL+NUM keys but if I change convergence with CTRL+NUM 1 it also cycles the pixel shader which is not the intention.
@DarkStarSword, big thanks again for all the help that you have given me. That example from Legend of Grimrock 2 was so you could have 3 cycling HUD depths via a key. Shame about the shadows because you lose a lot of the atmosphere with them disabled but I am not sure that it is such a good game anyway - I played the original top-down version and received that one almost for free.
There is a folder called Shaders with 226 files of which more than 20 are shadow files including some test files. They seem to come from Nvidia. Here is an example.
This is called Shadow. There is a ShadowShader but it won't let me post it here.
@bo3b, Do you think you could give me a reply to my previous post.
Also having thought about it I don't think that you are being completely fair. As I said I have fixed Vapour, nothing is disabled and because it is Unity Alt-Tab was not possible and I had to use Discover mode a lot but that caused abnormal halos which I couldn't understand. For that I needed DarkStarSword's invaluable help. I think that this is a reasonable accomplishment.
I want to put it on the blog but I have no idea how do it. You want fixes shared so perhaps you can tell me how I can do that.
@bo3b, Do you think you could give me a reply to my previous post.
Also having thought about it I don't think that you are being completely fair. As I said I have fixed Vapour, nothing is disabled and because it is Unity Alt-Tab was not possible and I had to use Discover mode a lot but that caused abnormal halos which I couldn't understand. For that I needed DarkStarSword's invaluable help. I think that this is a reasonable accomplishment.
I want to put it on the blog but I have no idea how do it. You want fixes shared so perhaps you can tell me how I can do that.
For a Unity game you probably do need to finish it to make sure there aren't any more game breaking halos/shadows before publishing it on the blog, but feel free to publish it here on the forums if it's not up to that point yet (if there's someone else playing a game sometimes they can test the fix to look for issues further into the game if you don't have time to do so yourself - I did this with The Last Tinker (which I still haven't finished playing), and we often do it with large open world games that are not possible for one person to go everywhere).
When you think it is ready to go on the blog bo3b can grant you access to post, and eqzitara can give you access to the Amazon AWS where we host the fixes.
btw, was there a question on the shader in post #678?
For a Unity game you probably do need to finish it to make sure there aren't any more game breaking halos/shadows before publishing it on the blog, but feel free to publish it here on the forums if it's not up to that point yet (if there's someone else playing a game sometimes they can test the fix to look for issues further into the game if you don't have time to do so yourself - I did this with The Last Tinker (which I still haven't finished playing), and we often do it with large open world games that are not possible for one person to go everywhere).
When you think it is ready to go on the blog bo3b can grant you access to post, and eqzitara can give you access to the Amazon AWS where we host the fixes.
btw, was there a question on the shader in post #678?
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
No, I don't have any real question about that shader, I just thought that might give information to help fix the shadows in How to Survive.
I do have one question. In the last couple of days I have studied a lot about how 3D works and the different transformations. During that I learnt that lighting shaders use dot product to calculate the angle that light reflects off a surface. I have also read through this thread completely and during that I saw that you said that dot product was also used to convert coordinates from one space to another. I don't know much about matrix multiplications but I thought they were used to convert coordinates, why dot product.
The reason that I didn't finish Vapour was not that I didn't have the time but that I played it on normal and it gets very difficult later on and also it is not really my type of game. They made a patch for easy difficulty so I could try it again on that level. I assume that I should just make a zip file for the fix, can I just upload it as zip file or do I have to give it a particular extension and where should I put the post, in the Vapour thread maybe?
I want to fix Into the Stars which is a right mess but I realize now that it is Unreal Engine 4 for which till now no fixes have been made, that is so isn't it? You might be interested in this reply from one of the devs when I asked them if they would support 3D Vision.
Hey tonka, I remember 3dvision. The reason it worked in unreal 3 is that it was primarily a forward renderer so splitting up the frame buffer into a stereoscopic view was possible and somewhat less expensive, performance wise. Most new engines today heavily use deffered rendering so there are different frame buffers for reflections, lighting, z-depth...etc. This is why you perceive it to be broken. Currently it is not supported by UE4. Unfortunately rendering tech in general is moving away from it. I'll keep an eye out for any engine updates from Epic and if its something that is as easy as a check box, we can definitely look into doing a patch for it.
btw why are you replying to the post and not bo3b who I see applauds and congratulates everyone who makes a fix in this thread but can only criticize me for taking up too much of your time?
No, I don't have any real question about that shader, I just thought that might give information to help fix the shadows in How to Survive.
I do have one question. In the last couple of days I have studied a lot about how 3D works and the different transformations. During that I learnt that lighting shaders use dot product to calculate the angle that light reflects off a surface. I have also read through this thread completely and during that I saw that you said that dot product was also used to convert coordinates from one space to another. I don't know much about matrix multiplications but I thought they were used to convert coordinates, why dot product.
The reason that I didn't finish Vapour was not that I didn't have the time but that I played it on normal and it gets very difficult later on and also it is not really my type of game. They made a patch for easy difficulty so I could try it again on that level. I assume that I should just make a zip file for the fix, can I just upload it as zip file or do I have to give it a particular extension and where should I put the post, in the Vapour thread maybe?
I want to fix Into the Stars which is a right mess but I realize now that it is Unreal Engine 4 for which till now no fixes have been made, that is so isn't it? You might be interested in this reply from one of the devs when I asked them if they would support 3D Vision.
Hey tonka, I remember 3dvision. The reason it worked in unreal 3 is that it was primarily a forward renderer so splitting up the frame buffer into a stereoscopic view was possible and somewhat less expensive, performance wise. Most new engines today heavily use deffered rendering so there are different frame buffers for reflections, lighting, z-depth...etc. This is why you perceive it to be broken. Currently it is not supported by UE4. Unfortunately rendering tech in general is moving away from it. I'll keep an eye out for any engine updates from Epic and if its something that is as easy as a check box, we can definitely look into doing a patch for it.
btw why are you replying to the post and not bo3b who I see applauds and congratulates everyone who makes a fix in this thread but can only criticize me for taking up too much of your time?
[quote="tonka"]@bo3b, Do you think you could give me a reply to my previous post.
Also having thought about it I don't think that you are being completely fair. As I said I have fixed Vapour, nothing is disabled and because it is Unity Alt-Tab was not possible and I had to use Discover mode a lot but that caused abnormal halos which I couldn't understand. For that I needed DarkStarSword's invaluable help. I think that this is a reasonable accomplishment.
I want to put it on the blog but I have no idea how do it. You want fixes shared so perhaps you can tell me how I can do that.[/quote]
Sorry for the delay, too much work at the moment.
We trust the judgment of the ShaderHacker, so if you think it's ready to post on HelixMod, send me a PM with the email address you'd like to use, and I'll send you an invite from the blog. BTW, these forums don't have any email notification, only the PM system notifies.
For the developer of Stars, you might point them to DarkStarSword's experimental UE4 render plugin.
[url]https://forums.geforce.com/default/topic/819180/3d-vision/darkstarswords-todo-list/post/4675115/#4675115[/url]
tonka said:@bo3b, Do you think you could give me a reply to my previous post.
Also having thought about it I don't think that you are being completely fair. As I said I have fixed Vapour, nothing is disabled and because it is Unity Alt-Tab was not possible and I had to use Discover mode a lot but that caused abnormal halos which I couldn't understand. For that I needed DarkStarSword's invaluable help. I think that this is a reasonable accomplishment.
I want to put it on the blog but I have no idea how do it. You want fixes shared so perhaps you can tell me how I can do that.
Sorry for the delay, too much work at the moment.
We trust the judgment of the ShaderHacker, so if you think it's ready to post on HelixMod, send me a PM with the email address you'd like to use, and I'll send you an invite from the blog. BTW, these forums don't have any email notification, only the PM system notifies.
For the developer of Stars, you might point them to DarkStarSword's experimental UE4 render plugin.
Thanks for the reply but could you say something about whether it was fair to criticize me. the main reason that I didn't do the exercises was that I have the full game and then it is impossible to play the demo. I must admit that the question about z in the prime directive was a bit stupid as you had covered it thoroughly in lesson 6 but the rest of my questions to DarkStarSword were not covered in the school.
How do I send a PM - I have never done it?
Thanks for the reply but could you say something about whether it was fair to criticize me. the main reason that I didn't do the exercises was that I have the full game and then it is impossible to play the demo. I must admit that the question about z in the prime directive was a bit stupid as you had covered it thoroughly in lesson 6 but the rest of my questions to DarkStarSword were not covered in the school.
Just be aware that the UE4 plugin isn't finished yet (so many projects, so little time... not to mention my day job...) - at the moment it is a proof of concept and will make the game render correctly in 3D, but it still needs more work before I'd recommend a dev pick it up if all they want is something "as easy as a check box".
However, if they were interested in helping out finishing up development on the plugin I'd be very grateful for the extra manpower.
Functionality wise the main thing it's missing is changing it so both eyes render from the same frame - at the moment it's alternating. There's some minor stuff as well (FOV), and I still think it's super important to make sure it can work with 3DMigoto so we can use both, and not one or the other. And of course there's all the general spit and polish - like making sure it doesn't break AMD users, etc.
Just be aware that the UE4 plugin isn't finished yet (so many projects, so little time... not to mention my day job...) - at the moment it is a proof of concept and will make the game render correctly in 3D, but it still needs more work before I'd recommend a dev pick it up if all they want is something "as easy as a check box".
However, if they were interested in helping out finishing up development on the plugin I'd be very grateful for the extra manpower.
Functionality wise the main thing it's missing is changing it so both eyes render from the same frame - at the moment it's alternating. There's some minor stuff as well (FOV), and I still think it's super important to make sure it can work with 3DMigoto so we can use both, and not one or the other. And of course there's all the general spit and polish - like making sure it doesn't break AMD users, etc.
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 have posted a link to your UE4 Engine post and also the text in your previous post in the Steam forum for Into the Stars.
The problem that I have with the keys in helixmod (Post #677 Ctrl+NUM1 is the same as NUM1) is also in 3Dmitogo - can there be done anything about that?
I have now posted in the Vapour thread info about the game and my fix so we will see what problems come up.
I have posted a link to your UE4 Engine post and also the text in your previous post in the Steam forum for Into the Stars.
The problem that I have with the keys in helixmod (Post #677 Ctrl+NUM1 is the same as NUM1) is also in 3Dmitogo - can there be done anything about that?
I have now posted in the Vapour thread info about the game and my fix so we will see what problems come up.
Neither Helix Mod or 3DMigoto support modifiers at this time. This is something that is feasible to add to 3DMigoto (patches welcome), but without source code we can't add it to Helix Mod unless Helix himself returns.
You can however rebind the keys to different buttons with both tools (with one exception - numpad minus is hardcoded in Helix Mod). This is documented in the d3dx.ini for 3DMigoto and on the HelixMod Feature List page for Helix Mod:
[url]http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#PSPREVKEY[/url]
Neither Helix Mod or 3DMigoto support modifiers at this time. This is something that is feasible to add to 3DMigoto (patches welcome), but without source code we can't add it to Helix Mod unless Helix himself returns.
You can however rebind the keys to different buttons with both tools (with one exception - numpad minus is hardcoded in Helix Mod). This is documented in the d3dx.ini for 3DMigoto and on the HelixMod Feature List page for Helix Mod: http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#PSPREVKEY
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 don't think that you understand what I mean. I don't want to use a modifier in helixmod or 3Dmitogo, I just want that if a modifier is used that the key is no longer recognized and acted upon in both. This is not possible in helixmod I understand but is possible in 3Dmitogo. I would do it myself but I have no experience in this sort of windows applications.
Could you please answer this question from a previous post.
In the last couple of days I have studied a lot about how 3D works and the different transformations. During that I learnt that lighting shaders use dot product to calculate the angle that light reflects off a surface. I have also read through this thread completely and during that I saw that you said that dot product was also used to convert coordinates from one space to another. I don't know much about matrix multiplications but I thought they were used to convert coordinates, why dot product.
I don't think that you understand what I mean. I don't want to use a modifier in helixmod or 3Dmitogo, I just want that if a modifier is used that the key is no longer recognized and acted upon in both. This is not possible in helixmod I understand but is possible in 3Dmitogo. I would do it myself but I have no experience in this sort of windows applications.
Could you please answer this question from a previous post.
In the last couple of days I have studied a lot about how 3D works and the different transformations. During that I learnt that lighting shaders use dot product to calculate the angle that light reflects off a surface. I have also read through this thread completely and during that I saw that you said that dot product was also used to convert coordinates from one space to another. I don't know much about matrix multiplications but I thought they were used to convert coordinates, why dot product.
[quote="tonka"]Thanks for the reply but could you say something about whether it was fair to criticize me. the main reason that I didn't do the exercises was that I have the full game and then it is impossible to play the demo. I must admit that the question about z in the prime directive was a bit stupid as you had covered it thoroughly in lesson 6 but the rest of my questions to DarkStarSword were not covered in the school.
How do I send a PM - I have never done it?[/quote]
A good teacher will always criticize the student that doesn't do their homework, right? A bad teacher will let you skate, and then later you find out it would have made things faster if you finished the fundamentals. I understand the desire to shortcut these things, especially as you are an experienced programmer, but DX11 graphics program is weird and unique.
One piece you clearly didn't study carefully was the PDF document from NVidia on how 3D Vision itself works, that I reference in the class. Without those fundamentals, a lot of the other stuff is hard to learn and understand.
It's totally OK if you want to try to skip the fundamentals and just jump right in, maybe that's a good way to learn for you. The part I object to is asking questions that are easily answerable by google or by my classes. We all only have so much time, so anytime spent duplicating answers is opportunity cost that I'm loathe to spend.
It is awesome that you have fixed Vapour, and to be clear the majority of your questions there were worth asking. We are always very happy to have more ShaderHackers.
To send a PM, again, this is easy to google, right? Click on the little envelope underneath my name on any post.
tonka said:Thanks for the reply but could you say something about whether it was fair to criticize me. the main reason that I didn't do the exercises was that I have the full game and then it is impossible to play the demo. I must admit that the question about z in the prime directive was a bit stupid as you had covered it thoroughly in lesson 6 but the rest of my questions to DarkStarSword were not covered in the school.
How do I send a PM - I have never done it?
A good teacher will always criticize the student that doesn't do their homework, right? A bad teacher will let you skate, and then later you find out it would have made things faster if you finished the fundamentals. I understand the desire to shortcut these things, especially as you are an experienced programmer, but DX11 graphics program is weird and unique.
One piece you clearly didn't study carefully was the PDF document from NVidia on how 3D Vision itself works, that I reference in the class. Without those fundamentals, a lot of the other stuff is hard to learn and understand.
It's totally OK if you want to try to skip the fundamentals and just jump right in, maybe that's a good way to learn for you. The part I object to is asking questions that are easily answerable by google or by my classes. We all only have so much time, so anytime spent duplicating answers is opportunity cost that I'm loathe to spend.
It is awesome that you have fixed Vapour, and to be clear the majority of your questions there were worth asking. We are always very happy to have more ShaderHackers.
To send a PM, again, this is easy to google, right? Click on the little envelope underneath my name on any post.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
[quote="bo3b"]I understand the desire to shortcut these things....[/quote]
Patience, young padawan as this leads to the Dark Side of the Force and only suffering you will find there... >:
bo3b said:I understand the desire to shortcut these things....
Patience, young padawan as this leads to the Dark Side of the Force and only suffering you will find there... >:
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="tonka"]I don't think that you understand what I mean. I don't want to use a modifier in helixmod or 3Dmitogo, I just want that if a modifier is used that the key is no longer recognized and acted upon in both. This is not possible in helixmod I understand but is possible in 3Dmitogo. I would do it myself but I have no experience in this sort of windows applications.
Could you please answer this question from a previous post.
In the last couple of days I have studied a lot about how 3D works and the different transformations. During that I learnt that lighting shaders use dot product to calculate the angle that light reflects off a surface. I have also read through this thread completely and during that I saw that you said that dot product was also used to convert coordinates from one space to another. I don't know much about matrix multiplications but I thought they were used to convert coordinates, why dot product.[/quote]
That's a good idea to support modifiers, I'll add that as a feature request on GitHub. That would open up some more possibilities for things like aim overrides, and help us avoid interaction with other stuff like alt-f1 for snapshots. Not a slam dunk on the coding though, it's going to take some thought. If you get super motivated, please do jump in and make the mods yourself. This is fairly tight functionality to add, so lack of windows knowledge will not be a detriment I think.
With regard to dot product, I'm not sure if I understand the question exactly, but the short answer is that it's for performance.
Since we are using mostly 3D matrices for our 3D graphics, it's a direct match for doing transformations of any form.. The dot product are accelerated in the hardware, so that it is a single instruction. We could for example manually calculate every matrix/vector multiply add, but matrix math makes that all work using the dot product, and the single instruction makes it fast.
tonka said:I don't think that you understand what I mean. I don't want to use a modifier in helixmod or 3Dmitogo, I just want that if a modifier is used that the key is no longer recognized and acted upon in both. This is not possible in helixmod I understand but is possible in 3Dmitogo. I would do it myself but I have no experience in this sort of windows applications.
Could you please answer this question from a previous post.
In the last couple of days I have studied a lot about how 3D works and the different transformations. During that I learnt that lighting shaders use dot product to calculate the angle that light reflects off a surface. I have also read through this thread completely and during that I saw that you said that dot product was also used to convert coordinates from one space to another. I don't know much about matrix multiplications but I thought they were used to convert coordinates, why dot product.
That's a good idea to support modifiers, I'll add that as a feature request on GitHub. That would open up some more possibilities for things like aim overrides, and help us avoid interaction with other stuff like alt-f1 for snapshots. Not a slam dunk on the coding though, it's going to take some thought. If you get super motivated, please do jump in and make the mods yourself. This is fairly tight functionality to add, so lack of windows knowledge will not be a detriment I think.
With regard to dot product, I'm not sure if I understand the question exactly, but the short answer is that it's for performance.
Since we are using mostly 3D matrices for our 3D graphics, it's a direct match for doing transformations of any form.. The dot product are accelerated in the hardware, so that it is a single instruction. We could for example manually calculate every matrix/vector multiply add, but matrix math makes that all work using the dot product, and the single instruction makes it fast.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
We would never adjust z (unless we were actually adjusting w) because that only changes the value written to the Z-buffer. Technically we could adjust w to change the depth (along with x, y and z since they are all divided by w in the rasterizer), but that's not a good idea as it messes with the driver's heuristics to detect UI elements and bring them to screen depth, so the adjustment would either not work as you expect, or the maths will get more complicated to work correctly in tandem with the driver's adjustment under all possible circumstances.
This looks to be a fairly complicated example since it is performing three different adjustments depending on a value passed from Helix Mod (probably for texture filtering).
Here's an example from one of the first games I looked at before I scripted UI adjustments - this adjusts the UI depth to the Const1 value from DX9Settings.ini (it also adds two presets with an aiming convergence override):
https://github.com/DarkStarSword/3d-fixes/commit/ac6470011aa2e3876a380b52abe6833f121dd4d6
You may notice that I tried to use "DefPreset" in that commit, which was deprecated and removed from the latest Helix Mod - I should have used UseByDef = true inside the [PRES1] section instead.
Here's a later example from after I scripted the process in shadertool.py - this script simultaneously upgraded the shader to vs_3_0 as it applied the depth adjustment. Again, the depth comes from a value in the DX9Settings.ini, this time Const3 (the changes to the ini to set this are not shown here):
https://github.com/DarkStarSword/3d-fixes/commit/f27dfcc6907ab880f3c808f19b0b06beb690d80b
I suspect there is no reason - most likely he was experimenting with a few things and once he got it working he just left the code as is. I believe you are correct that code should have the same effect if both negations were removed.
If you are getting flickering it most likely means you are using an uninitialised value.
It could also mean that an error in the shader (the one that always gets me is reading from a masked component of an input register) has messed up the GPU state which in some cases might need the game to be restarted to clear out (if you notice that things keep breaking in weird and exciting ways while repeatedly pressing F10 without changing anything else, this has happened).
Looks complex, and doesn't appear to follow any of the shadow patterns I'm familiar with - unless someone has already worked out how to fix shadows in this engine you should just disable these, as IMO out of all the effects that are possible to fix, shadows are probably the 2nd hardest (the hardest being screen space reflections - fortunately most games don't use those). They would require a pretty deep understanding of the maths as well as a whole lot of study and experimentation to even guess how to fix them. Plus, without headers in the shaders you are flying completely blind.
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
I didn't finish Vapour but as far as I can see almost all broken effects are fixed, only the intro is on rails so I couldn't fix it. I could put it on the blog but I have no idea how to do that.
I now want to fix Empyrion - Galactic Survival which seems pretty good in 3D and Into the Stars which although being Unreal engine is pretty broken.
Does helixmod see no difference between NUM 1 and CTRL+NUM 1. I want to have all my stereoscopic keyboard shortcuts on CTRL+NUM keys but if I change convergence with CTRL+NUM 1 it also cycles the pixel shader which is not the intention.
@DarkStarSword, big thanks again for all the help that you have given me. That example from Legend of Grimrock 2 was so you could have 3 cycling HUD depths via a key. Shame about the shadows because you lose a lot of the atmosphere with them disabled but I am not sure that it is such a good game anyway - I played the original top-down version and received that one almost for free.
This is called Shadow. There is a ShadowShader but it won't let me post it here.
Also having thought about it I don't think that you are being completely fair. As I said I have fixed Vapour, nothing is disabled and because it is Unity Alt-Tab was not possible and I had to use Discover mode a lot but that caused abnormal halos which I couldn't understand. For that I needed DarkStarSword's invaluable help. I think that this is a reasonable accomplishment.
I want to put it on the blog but I have no idea how do it. You want fixes shared so perhaps you can tell me how I can do that.
When you think it is ready to go on the blog bo3b can grant you access to post, and eqzitara can give you access to the Amazon AWS where we host the fixes.
btw, was there a question on the shader in post #678?
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
I do have one question. In the last couple of days I have studied a lot about how 3D works and the different transformations. During that I learnt that lighting shaders use dot product to calculate the angle that light reflects off a surface. I have also read through this thread completely and during that I saw that you said that dot product was also used to convert coordinates from one space to another. I don't know much about matrix multiplications but I thought they were used to convert coordinates, why dot product.
The reason that I didn't finish Vapour was not that I didn't have the time but that I played it on normal and it gets very difficult later on and also it is not really my type of game. They made a patch for easy difficulty so I could try it again on that level. I assume that I should just make a zip file for the fix, can I just upload it as zip file or do I have to give it a particular extension and where should I put the post, in the Vapour thread maybe?
I want to fix Into the Stars which is a right mess but I realize now that it is Unreal Engine 4 for which till now no fixes have been made, that is so isn't it? You might be interested in this reply from one of the devs when I asked them if they would support 3D Vision.
Hey tonka, I remember 3dvision. The reason it worked in unreal 3 is that it was primarily a forward renderer so splitting up the frame buffer into a stereoscopic view was possible and somewhat less expensive, performance wise. Most new engines today heavily use deffered rendering so there are different frame buffers for reflections, lighting, z-depth...etc. This is why you perceive it to be broken. Currently it is not supported by UE4. Unfortunately rendering tech in general is moving away from it. I'll keep an eye out for any engine updates from Epic and if its something that is as easy as a check box, we can definitely look into doing a patch for it.
btw why are you replying to the post and not bo3b who I see applauds and congratulates everyone who makes a fix in this thread but can only criticize me for taking up too much of your time?
Sorry for the delay, too much work at the moment.
We trust the judgment of the ShaderHacker, so if you think it's ready to post on HelixMod, send me a PM with the email address you'd like to use, and I'll send you an invite from the blog. BTW, these forums don't have any email notification, only the PM system notifies.
For the developer of Stars, you might point them to DarkStarSword's experimental UE4 render plugin.
https://forums.geforce.com/default/topic/819180/3d-vision/darkstarswords-todo-list/post/4675115/#4675115
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
How do I send a PM - I have never done it?
However, if they were interested in helping out finishing up development on the plugin I'd be very grateful for the extra manpower.
Functionality wise the main thing it's missing is changing it so both eyes render from the same frame - at the moment it's alternating. There's some minor stuff as well (FOV), and I still think it's super important to make sure it can work with 3DMigoto so we can use both, and not one or the other. And of course there's all the general spit and polish - like making sure it doesn't break AMD users, etc.
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
The problem that I have with the keys in helixmod (Post #677 Ctrl+NUM1 is the same as NUM1) is also in 3Dmitogo - can there be done anything about that?
I have now posted in the Vapour thread info about the game and my fix so we will see what problems come up.
You can however rebind the keys to different buttons with both tools (with one exception - numpad minus is hardcoded in Helix Mod). This is documented in the d3dx.ini for 3DMigoto and on the HelixMod Feature List page for Helix Mod:
http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#PSPREVKEY
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
Could you please answer this question from a previous post.
In the last couple of days I have studied a lot about how 3D works and the different transformations. During that I learnt that lighting shaders use dot product to calculate the angle that light reflects off a surface. I have also read through this thread completely and during that I saw that you said that dot product was also used to convert coordinates from one space to another. I don't know much about matrix multiplications but I thought they were used to convert coordinates, why dot product.
A good teacher will always criticize the student that doesn't do their homework, right? A bad teacher will let you skate, and then later you find out it would have made things faster if you finished the fundamentals. I understand the desire to shortcut these things, especially as you are an experienced programmer, but DX11 graphics program is weird and unique.
One piece you clearly didn't study carefully was the PDF document from NVidia on how 3D Vision itself works, that I reference in the class. Without those fundamentals, a lot of the other stuff is hard to learn and understand.
It's totally OK if you want to try to skip the fundamentals and just jump right in, maybe that's a good way to learn for you. The part I object to is asking questions that are easily answerable by google or by my classes. We all only have so much time, so anytime spent duplicating answers is opportunity cost that I'm loathe to spend.
It is awesome that you have fixed Vapour, and to be clear the majority of your questions there were worth asking. We are always very happy to have more ShaderHackers.
To send a PM, again, this is easy to google, right? Click on the little envelope underneath my name on any post.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
Patience, young padawan as this leads to the Dark Side of the Force and only suffering you will find there... >:
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)
That's a good idea to support modifiers, I'll add that as a feature request on GitHub. That would open up some more possibilities for things like aim overrides, and help us avoid interaction with other stuff like alt-f1 for snapshots. Not a slam dunk on the coding though, it's going to take some thought. If you get super motivated, please do jump in and make the mods yourself. This is fairly tight functionality to add, so lack of windows knowledge will not be a detriment I think.
With regard to dot product, I'm not sure if I understand the question exactly, but the short answer is that it's for performance.
Since we are using mostly 3D matrices for our 3D graphics, it's a direct match for doing transformations of any form.. The dot product are accelerated in the hardware, so that it is a single instruction. We could for example manually calculate every matrix/vector multiply add, but matrix math makes that all work using the dot product, and the single instruction makes it fast.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers