How to fix/disable shaders in games(DLL,guide and fixes).
126 / 167
So this whole time I've been clicking the thread's name(s) and then clicking the last page button ... when all I had to do was click the 'X time ago' link under the last comment column ... [img]http://www.cheapassgamer.com/forums/images/smilies/eusa_doh.gif[/img]
So this whole time I've been clicking the thread's name(s) and then clicking the last page button ... when all I had to do was click the 'X time ago' link under the last comment column ...
[quote="nehuge"]I wanna say rather than disabling a shader for Borderlands 2 for example, Helix was able to actually fix the PhysX effects from hurting your eyes. Any ideas anyone? If I could just enable shadows and not have them look weird and hurt my eyes the game would be perfect![/quote]
Let's give some credit to [i]eqzitara [/i]for this impressive fix. Helix made the tools, but eqzitara made this fix. :->
nehuge said:I wanna say rather than disabling a shader for Borderlands 2 for example, Helix was able to actually fix the PhysX effects from hurting your eyes. Any ideas anyone? If I could just enable shadows and not have them look weird and hurt my eyes the game would be perfect!
Let's give some credit to eqzitara for this impressive fix. Helix made the tools, but eqzitara made this fix. :->
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="eqzitara"]Are you forwarding everything but what changes? C4-> C8? Im guessing modelviewproj is reflection of objects while other one doesnt do reflections or just like "world reflections[Sky maybe]" but not objects.
TBH, im just worried its gonna turn into a jig saw puzzle. Like which pixel shader connects to which vertexshader, etc. Like are you getting actual results or is it just texcoords being disabled.
Like if you turn off reflections/refractions the hl2 autoexec[May work in other source. I honestly forget]. Water has no issues. Not sure if anyone else knows this. It may be one of those things that didnt get written down over the years.
r_WaterDrawReflection 0
r_WaterDrawRefraction 0[/quote]Yes, I'm making a fairly big assumption that c8 will still be there as well. This is based on prior experience with how software is developed. Even though that's not an explicit parameter, it's pretty likely the global didn't move and is still there. That would allow the fixed shader code to still function properly.
If that doesn't work, a next experiment would be to try to create the c8 ViewProj matrix from what we have, which is the c4 MVP matrix, and c58 model matrix. This is where my current knowledge gets skimpy. I know I can make an MVP from M*VP, but I've never seen anyone talk about VP from MVP/M.
@mike_ar69
Thanks for those suggestions. Yes, this is a pretty wild idea, but pirateguy had reasonable success when he just plugged in a [i]random[/i] shader, let alone one that actually is water. We aren't trying for perfection in this case, just trying to take it from 100% broken to playable.
You are right, to get closer to perfection it would take a lot more work. More than it's worth likely, but that's a personal decision for someone capable of doing the fix like Helix or mana. I'm not there yet, maybe someday. Lest there be any confusion, shadows and water are absolutely the most complicated shaders we currently run into. Refraction, reflection.
The pixel shaders in question that pirateguy posted do in fact have inverse transforms, and are thus probably too complicated to make work. But, the pixel shaders for the candidate Portal 2 shaders do not, making them simpler water to possibly use without having to solve the reflection. Dear Esther shaders include inverse transforms, and are fully functional, so they may be a better 'drop-in' choice. There is a missing cLightScale global that would need something.
Not at all clear. It's just an interesting idea to try to drop in a known good shader, instead of trying to fix an older busted one. I've thought several times about pulling the shaders out of something like the fixed Valve Source SDK and trying to plug them into a broken game.
You know, just hacking around. Probably not going to work, but worth a try.
eqzitara said:Are you forwarding everything but what changes? C4-> C8? Im guessing modelviewproj is reflection of objects while other one doesnt do reflections or just like "world reflections[Sky maybe]" but not objects.
TBH, im just worried its gonna turn into a jig saw puzzle. Like which pixel shader connects to which vertexshader, etc. Like are you getting actual results or is it just texcoords being disabled.
Like if you turn off reflections/refractions the hl2 autoexec[May work in other source. I honestly forget]. Water has no issues. Not sure if anyone else knows this. It may be one of those things that didnt get written down over the years.
r_WaterDrawReflection 0
r_WaterDrawRefraction 0
Yes, I'm making a fairly big assumption that c8 will still be there as well. This is based on prior experience with how software is developed. Even though that's not an explicit parameter, it's pretty likely the global didn't move and is still there. That would allow the fixed shader code to still function properly.
If that doesn't work, a next experiment would be to try to create the c8 ViewProj matrix from what we have, which is the c4 MVP matrix, and c58 model matrix. This is where my current knowledge gets skimpy. I know I can make an MVP from M*VP, but I've never seen anyone talk about VP from MVP/M.
@mike_ar69
Thanks for those suggestions. Yes, this is a pretty wild idea, but pirateguy had reasonable success when he just plugged in a random shader, let alone one that actually is water. We aren't trying for perfection in this case, just trying to take it from 100% broken to playable.
You are right, to get closer to perfection it would take a lot more work. More than it's worth likely, but that's a personal decision for someone capable of doing the fix like Helix or mana. I'm not there yet, maybe someday. Lest there be any confusion, shadows and water are absolutely the most complicated shaders we currently run into. Refraction, reflection.
The pixel shaders in question that pirateguy posted do in fact have inverse transforms, and are thus probably too complicated to make work. But, the pixel shaders for the candidate Portal 2 shaders do not, making them simpler water to possibly use without having to solve the reflection. Dear Esther shaders include inverse transforms, and are fully functional, so they may be a better 'drop-in' choice. There is a missing cLightScale global that would need something.
Not at all clear. It's just an interesting idea to try to drop in a known good shader, instead of trying to fix an older busted one. I've thought several times about pulling the shaders out of something like the fixed Valve Source SDK and trying to plug them into a broken game.
You know, just hacking around. Probably not going to work, but worth a try.
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
Computer just went boom. Something was wrong with a usb device and it somehow caused mobo to spark[Nice failsafe]. I am down for at least a week maybe longer much longer depending on the damage, I am hoping its just mobo since oddly all my usb devices are still good [minus the obvious one]. So I am not sure if I am gonna be able to do support on helixmod site[depends] . Not sure how long this laptop will last.
Computer just went boom. Something was wrong with a usb device and it somehow caused mobo to spark[Nice failsafe]. I am down for at least a week maybe longer much longer depending on the damage, I am hoping its just mobo since oddly all my usb devices are still good [minus the obvious one]. So I am not sure if I am gonna be able to do support on helixmod site[depends] . Not sure how long this laptop will last.
All hail 3d modders DHR, MasterOtaku, Losti, Necropants, Helifax, bo3b, mike_ar69, Flugan, DarkStarSword, 4everAwake, 3d4dd and so many more helping to keep the 3d dream alive, find their 3d fixes at http://helixmod.blogspot.com/ Also check my site for spanish VR and mobile gaming news: www.gamermovil.com
Laptop is so bad loading any site takes forever. Probably last day ill use it.
If anyone wants to help out answer people in chiri's thread [metro last light]. Not sure if there are gonna be much more people needing help but a lot of people were having issues. Its a bit more technical to get working for some and it seems alot of people have figured out solutions on there own.
Laptop is so bad loading any site takes forever. Probably last day ill use it.
If anyone wants to help out answer people in chiri's thread [metro last light]. Not sure if there are gonna be much more people needing help but a lot of people were having issues. Its a bit more technical to get working for some and it seems alot of people have figured out solutions on there own.
Errr nm. Someone lent me a comp good enough for browsing. Just not gaming.
---------------------------------------------------------------
Anywho, if any of the more experienced coders have any idea what I am talking about here Id appreciate help. I plan to stop doing old games soon and I really want to try out my ideas, I just want to know if they are/arent a waste of time.
Two things.One Has anyone ever found the shader in control of Camera[any game]? I know each shader with an object has cameraposition. But I figure there has to be one in charge of the global camera. Ive never have and perhaps its cause ive only tried in UE3. I am asking because I want to try correcting first person weapon depths. I know that one camera controls "world/fov" and one controls first person and they are technically not wrong but Id like to try to compensate of games where its off by ALOT like from FOV/ or weapons have all different lengths.
Second. This one may be unrealistic. Is there a shader in charge of viewprojectionmatrix. Like where its being floated from/starting point. Someone once asked can you do seperate convergence settings in a game depending on situation[like rpg/cinematics]. I said no because we cant talk to dx9settings through shaders just other way around.
Ussually something happens in these situations. Like hud elements dissapear/ or a black bar shows up.Couldnt we pass the information to that shader if that "situation" happens as long as the hud shader loads before that shader[s]? I guess the other option is as long as its before all the shaders with a viewprojection matrix but thats probably a crap ton of shaders in many cases and they'd have to load after hud. [not to mention work]
Like couldnt we use the same property that helix uses to passes matrix information through samplers for "on/off switches" by moving the registers to samplers if the textures are active? So we change viewprojectionmatrix's position based of if active?
Like if texture is active
make r3 = 2
in dx9settings
get r3 place in s1
move s1 to other shader
do texdl r10, r10, s1
if r10 not equal 0
move position.
Errr nm. Someone lent me a comp good enough for browsing. Just not gaming.
---------------------------------------------------------------
Anywho, if any of the more experienced coders have any idea what I am talking about here Id appreciate help. I plan to stop doing old games soon and I really want to try out my ideas, I just want to know if they are/arent a waste of time.
Two things.One Has anyone ever found the shader in control of Camera[any game]? I know each shader with an object has cameraposition. But I figure there has to be one in charge of the global camera. Ive never have and perhaps its cause ive only tried in UE3. I am asking because I want to try correcting first person weapon depths. I know that one camera controls "world/fov" and one controls first person and they are technically not wrong but Id like to try to compensate of games where its off by ALOT like from FOV/ or weapons have all different lengths.
Second. This one may be unrealistic. Is there a shader in charge of viewprojectionmatrix. Like where its being floated from/starting point. Someone once asked can you do seperate convergence settings in a game depending on situation[like rpg/cinematics]. I said no because we cant talk to dx9settings through shaders just other way around.
Ussually something happens in these situations. Like hud elements dissapear/ or a black bar shows up.Couldnt we pass the information to that shader if that "situation" happens as long as the hud shader loads before that shader[s]? I guess the other option is as long as its before all the shaders with a viewprojection matrix but thats probably a crap ton of shaders in many cases and they'd have to load after hud. [not to mention work]
Like couldnt we use the same property that helix uses to passes matrix information through samplers for "on/off switches" by moving the registers to samplers if the textures are active? So we change viewprojectionmatrix's position based of if active?
Like if texture is active
make r3 = 2
in dx9settings
get r3 place in s1
move s1 to other shader
do texdl r10, r10, s1
if r10 not equal 0
move position.
In short, that idea didn't work. I did check HL2 though, and the water looks fine in 3d. Copying the shaders to L4D2 produces a flat rippled white/purple surface with reflections even more broken than the regular water shader though. Here's the HL2 shaders if you're interested.
https://dl.dropboxusercontent.com/u/17425913/hl2.rar
In short, that idea didn't work. I did check HL2 though, and the water looks fine in 3d. Copying the shaders to L4D2 produces a flat rippled white/purple surface with reflections even more broken than the regular water shader though. Here's the HL2 shaders if you're interested.
[quote="bo3b"]
@mike_ar69
Thanks for those suggestions. Yes, this is a pretty wild idea, but pirateguy had reasonable success when he just plugged in a [i]random[/i] shader, let alone one that actually is water. We aren't trying for perfection in this case, just trying to take it from 100% broken to playable.
You are right, to get closer to perfection it would take a lot more work. More than it's worth likely, but that's a personal decision for someone capable of doing the fix like Helix or mana. I'm not there yet, maybe someday. Lest there be any confusion, shadows and water are absolutely the most complicated shaders we currently run into. Refraction, reflection.
The pixel shaders in question that pirateguy posted do in fact have inverse transforms, and are thus probably too complicated to make work. But, the pixel shaders for the candidate Portal 2 shaders do not, making them simpler water to possibly use without having to solve the reflection. Dear Esther shaders include inverse transforms, and are fully functional, so they may be a better 'drop-in' choice. There is a missing cLightScale global that would need something.
Not at all clear. It's just an interesting idea to try to drop in a known good shader, instead of trying to fix an older busted one. I've thought several times about pulling the shaders out of something like the fixed Valve Source SDK and trying to plug them into a broken game.
You know, just hacking around. Probably not going to work, but worth a try.[/quote]
Hi bo3b, some of the best advances come from wild ideas, so keep it going. It's not that much of a wild idea though, and worth a try. It's also interesting to see how different games do implement things differently with the same engine, to get clues about what might be wrong. If I get time I want to look at this as well, because I liked Dear Esther and was thinking about seeing if I could do anything with its few minor issues (the main one being water - but btw did you know that if, when the water looks wrong, you alt tab out of game and back in again its fixes the water?). I looked briefly at the L4D2 water thing, trying the different profiles, but did not really give it a decent shot. I did think it would be easier to fix the water halos with the standard profile, rather than the reflections with the prototype profile, but that was just an initial assessment. I was looking at the 'Swamp' level, loads of water and good test case. I think I did find a shader to disable reflections, which half solves the problem if using the prototype profile, I would have to check again though.
bo3b said:
@mike_ar69
Thanks for those suggestions. Yes, this is a pretty wild idea, but pirateguy had reasonable success when he just plugged in a random shader, let alone one that actually is water. We aren't trying for perfection in this case, just trying to take it from 100% broken to playable.
You are right, to get closer to perfection it would take a lot more work. More than it's worth likely, but that's a personal decision for someone capable of doing the fix like Helix or mana. I'm not there yet, maybe someday. Lest there be any confusion, shadows and water are absolutely the most complicated shaders we currently run into. Refraction, reflection.
The pixel shaders in question that pirateguy posted do in fact have inverse transforms, and are thus probably too complicated to make work. But, the pixel shaders for the candidate Portal 2 shaders do not, making them simpler water to possibly use without having to solve the reflection. Dear Esther shaders include inverse transforms, and are fully functional, so they may be a better 'drop-in' choice. There is a missing cLightScale global that would need something.
Not at all clear. It's just an interesting idea to try to drop in a known good shader, instead of trying to fix an older busted one. I've thought several times about pulling the shaders out of something like the fixed Valve Source SDK and trying to plug them into a broken game.
You know, just hacking around. Probably not going to work, but worth a try.
Hi bo3b, some of the best advances come from wild ideas, so keep it going. It's not that much of a wild idea though, and worth a try. It's also interesting to see how different games do implement things differently with the same engine, to get clues about what might be wrong. If I get time I want to look at this as well, because I liked Dear Esther and was thinking about seeing if I could do anything with its few minor issues (the main one being water - but btw did you know that if, when the water looks wrong, you alt tab out of game and back in again its fixes the water?). I looked briefly at the L4D2 water thing, trying the different profiles, but did not really give it a decent shot. I did think it would be easier to fix the water halos with the standard profile, rather than the reflections with the prototype profile, but that was just an initial assessment. I was looking at the 'Swamp' level, loads of water and good test case. I think I did find a shader to disable reflections, which half solves the problem if using the prototype profile, I would have to check again though.
O! I completely forgot. Mana84 fixed water in source engine/hl2. But problem is it breaks underwater. Though that doesnt matter in L4D2.
HL2 all games share CRC's [everyone as far as I know. Water definetly does. You can drop this in any HL2 game]. Its very likely you can just drop this in L4D2.
[url]https://forums.geforce.com/default/topic/513190/3d-vision/how-to-fix-disable-shaders-in-games-dll-guide-and-fixes-/post/3740070/#3740070[/url]
Alt tabbing will fix water when in Fable 3 as well. I think this has to do with 3d vision heuristics. It seems like mana84 said going underwater does something but I havent looked at what it does to know. I thought HL2 looked fine underwater but just not above but I dunno.
Like im pretty in both cases[Fable 3/Dear esther] water is at screen depth but when you alt tab. It sort of skips this step and will sterolize it proper. Like its backwards from Dead Island where if you alt tab it breaks shadows[or breaks it more then it was]
I think you need to do what helix explained in Mars War Log to fix. I really need to read more but it all sounds like the same thing. Mana84 suggested to read this to me. [url]http://developer.download.nvidia.com/whitepapers/2010/3D_Vision_Best_Practices_Guide.pdf[/url]
Defeating the 3D vision heuristics section is where the juice of it is.
@mikear69
The main issue we had in mars wars log before checking profiles and switching to prototype/aion was post processing. If you look at helix's code and explanation in guide posted above it shows how helix fixes it though I dont know why he has that "else".
Alt tabbing will fix water when in Fable 3 as well. I think this has to do with 3d vision heuristics. It seems like mana84 said going underwater does something but I havent looked at what it does to know. I thought HL2 looked fine underwater but just not above but I dunno.
Like im pretty in both cases[Fable 3/Dear esther] water is at screen depth but when you alt tab. It sort of skips this step and will sterolize it proper. Like its backwards from Dead Island where if you alt tab it breaks shadows[or breaks it more then it was]
I think you need to do what helix explained in Mars War Log to fix. I really need to read more but it all sounds like the same thing. Mana84 suggested to read this to me. http://developer.download.nvidia.com/whitepapers/2010/3D_Vision_Best_Practices_Guide.pdf
Defeating the 3D vision heuristics section is where the juice of it is.
@mikear69
The main issue we had in mars wars log before checking profiles and switching to prototype/aion was post processing. If you look at helix's code and explanation in guide posted above it shows how helix fixes it though I dont know why he has that "else".
@Eqzitara - Thanks for the heads up. Do you mean the "best practices guide"? I have a copy of that. If I get time (and I don't have much right now) I'll have another look at Helix fix for Mars War Logs. I *think* I did try the mono-stereo surface/map thing with L4D2 as well (because its just a couple of lines in DX9settings), but I definitely did not try to isolate render targets (using the [SF0] etc entries in DX9Settings). I wish I had more time for this...
I'll also have another look at Mana84's HL2 code as well.
@Eqzitara - Thanks for the heads up. Do you mean the "best practices guide"? I have a copy of that. If I get time (and I don't have much right now) I'll have another look at Helix fix for Mars War Logs. I *think* I did try the mono-stereo surface/map thing with L4D2 as well (because its just a couple of lines in DX9settings), but I definitely did not try to isolate render targets (using the [SF0] etc entries in DX9Settings). I wish I had more time for this...
I'll also have another look at Mana84's HL2 code as well.
I was waiting to see if someone more authoritative would respond. I'll go ahead and throw in what I think I know. Please take this from the perspective that I could be completely mistaken, because I'm certainly no expert.
[quote="eqzitara"].One Has anyone ever found the shader in control of Camera[any game]? I know each shader with an object has cameraposition. But I figure there has to be one in charge of the global camera. Ive never have and perhaps its cause ive only tried in UE3. I am asking because I want to try correcting first person weapon depths. I know that one camera controls "world/fov" and one controls first person and they are technically not wrong but Id like to try to compensate of games where its off by ALOT like from FOV/ or weapons have all different lengths.[/quote]I don't believe that there is a single shader in control of Camera, not ever. It seems to me that there is a camera position, but it is more implicit, rather than explicit. The camera location is a function of where the current Projection matrix puts it. Possibly there is an interim eye-space matrix, but the idea is the same- the camera is moved by transforming the matrix, not a shader.
I think you can still get the function you want, of being able to move the FOV or the world view, but I think that you would need to do this by altering the Projection matrix, which effectively would move the camera position.
[quote="eqzitara"]Second. This one may be unrealistic. Is there a shader in charge of viewprojectionmatrix. Like where its being floated from/starting point. Someone once asked can you do seperate convergence settings in a game depending on situation[like rpg/cinematics]. I said no because we cant talk to dx9settings through shaders just other way around.
Ussually something happens in these situations. Like hud elements dissapear/ or a black bar shows up.Couldnt we pass the information to that shader if that "situation" happens as long as the hud shader loads before that shader[s]? I guess the other option is as long as its before all the shaders with a viewprojection matrix but thats probably a crap ton of shaders in many cases and they'd have to load after hud. [not to mention work]
Like couldnt we use the same property that helix uses to passes matrix information through samplers for "on/off switches" by moving the registers to samplers if the textures are active? So we change viewprojectionmatrix's position based of if active?[/quote]Not sure I follow your idea here. In general I would say no, there is no shader in charge of MVP matrix, that's thinking about it backwards. The MVP matrix is the master, and the shaders are the slaves. They can only operate upon the pieces given to them. Some will be given the entire screen, so that they can apply fully screen shakes, or fog, or blur or so on. But only one fragment/pixel at a time. I don't think they have access to anything outside of the v0 passed in.
Also, the MVP matrix that is provided at the shader runtime is always a ReadOnly constant that I've seen. So the shaders cannot actively modify the matrix for anyone else. The runtime environment for shaders is extremely limited, and doesn't allow for modifying global state, nor sharing constants or variables with other shaders. This is something the HLSL could do, as it has access to the globals, but not at the ASM level.
I can't see how we can get any value back from a shader, even back to the Helix dll level. At least at present. It seems theoretically possible that Helix might be able to add a function to look for a specific returned texture or sampler and hand off to another shader. But, as you note, order would matter.
Not completely sure here, but hope that helps.
I was waiting to see if someone more authoritative would respond. I'll go ahead and throw in what I think I know. Please take this from the perspective that I could be completely mistaken, because I'm certainly no expert.
eqzitara said:.One Has anyone ever found the shader in control of Camera[any game]? I know each shader with an object has cameraposition. But I figure there has to be one in charge of the global camera. Ive never have and perhaps its cause ive only tried in UE3. I am asking because I want to try correcting first person weapon depths. I know that one camera controls "world/fov" and one controls first person and they are technically not wrong but Id like to try to compensate of games where its off by ALOT like from FOV/ or weapons have all different lengths.
I don't believe that there is a single shader in control of Camera, not ever. It seems to me that there is a camera position, but it is more implicit, rather than explicit. The camera location is a function of where the current Projection matrix puts it. Possibly there is an interim eye-space matrix, but the idea is the same- the camera is moved by transforming the matrix, not a shader.
I think you can still get the function you want, of being able to move the FOV or the world view, but I think that you would need to do this by altering the Projection matrix, which effectively would move the camera position.
eqzitara said:Second. This one may be unrealistic. Is there a shader in charge of viewprojectionmatrix. Like where its being floated from/starting point. Someone once asked can you do seperate convergence settings in a game depending on situation[like rpg/cinematics]. I said no because we cant talk to dx9settings through shaders just other way around.
Ussually something happens in these situations. Like hud elements dissapear/ or a black bar shows up.Couldnt we pass the information to that shader if that "situation" happens as long as the hud shader loads before that shader[s]? I guess the other option is as long as its before all the shaders with a viewprojection matrix but thats probably a crap ton of shaders in many cases and they'd have to load after hud. [not to mention work]
Like couldnt we use the same property that helix uses to passes matrix information through samplers for "on/off switches" by moving the registers to samplers if the textures are active? So we change viewprojectionmatrix's position based of if active?
Not sure I follow your idea here. In general I would say no, there is no shader in charge of MVP matrix, that's thinking about it backwards. The MVP matrix is the master, and the shaders are the slaves. They can only operate upon the pieces given to them. Some will be given the entire screen, so that they can apply fully screen shakes, or fog, or blur or so on. But only one fragment/pixel at a time. I don't think they have access to anything outside of the v0 passed in.
Also, the MVP matrix that is provided at the shader runtime is always a ReadOnly constant that I've seen. So the shaders cannot actively modify the matrix for anyone else. The runtime environment for shaders is extremely limited, and doesn't allow for modifying global state, nor sharing constants or variables with other shaders. This is something the HLSL could do, as it has access to the globals, but not at the ASM level.
I can't see how we can get any value back from a shader, even back to the Helix dll level. At least at present. It seems theoretically possible that Helix might be able to add a function to look for a specific returned texture or sampler and hand off to another shader. But, as you note, order would matter.
Not completely sure here, but hope that helps.
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
[MonitorSizeOverride][Global/Base Profile Tweaks][Depth=IPD]
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278
Let's give some credit to eqzitara for this impressive fix. Helix made the tools, but eqzitara made this fix. :->
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
If that doesn't work, a next experiment would be to try to create the c8 ViewProj matrix from what we have, which is the c4 MVP matrix, and c58 model matrix. This is where my current knowledge gets skimpy. I know I can make an MVP from M*VP, but I've never seen anyone talk about VP from MVP/M.
@mike_ar69
Thanks for those suggestions. Yes, this is a pretty wild idea, but pirateguy had reasonable success when he just plugged in a random shader, let alone one that actually is water. We aren't trying for perfection in this case, just trying to take it from 100% broken to playable.
You are right, to get closer to perfection it would take a lot more work. More than it's worth likely, but that's a personal decision for someone capable of doing the fix like Helix or mana. I'm not there yet, maybe someday. Lest there be any confusion, shadows and water are absolutely the most complicated shaders we currently run into. Refraction, reflection.
The pixel shaders in question that pirateguy posted do in fact have inverse transforms, and are thus probably too complicated to make work. But, the pixel shaders for the candidate Portal 2 shaders do not, making them simpler water to possibly use without having to solve the reflection. Dear Esther shaders include inverse transforms, and are fully functional, so they may be a better 'drop-in' choice. There is a missing cLightScale global that would need something.
Not at all clear. It's just an interesting idea to try to drop in a known good shader, instead of trying to fix an older busted one. I've thought several times about pulling the shaders out of something like the fixed Valve Source SDK and trying to plug them into a broken game.
You know, just hacking around. Probably not going to work, but worth a try.
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
Co-founder/Web host of helixmod.blog.com
Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918
Asus Rampage Extreme II | Quad core intel I7 2.6 | 6gig ram | Geforce GTX 680 | Samsung 22" 2233RZ | Acer 5360 | win8
3D website dedicated soley for nvidia 3D Vision
Visit 3dSolutionGaming.com for an A-Z listing of 3D streaming video's, automated slideshows, download packs and common fixes for 3dvision gamers.
Facebook Page: https://www.facebook.com/3dsolutiongaming
Twitter page: https://twitter.com/solutiongaming
Youtube Channel: www.youtube.com/user/SolutionGaming
Keenly supporting the Helixwrapper
http://helixmod.blogspot.com/
All hail 3d modders DHR, MasterOtaku, Losti, Necropants, Helifax, bo3b, mike_ar69, Flugan, DarkStarSword, 4everAwake, 3d4dd and so many more helping to keep the 3d dream alive, find their 3d fixes at http://helixmod.blogspot.com/ Also check my site for spanish VR and mobile gaming news: www.gamermovil.com
If anyone wants to help out answer people in chiri's thread [metro last light]. Not sure if there are gonna be much more people needing help but a lot of people were having issues. Its a bit more technical to get working for some and it seems alot of people have figured out solutions on there own.
Co-founder/Web host of helixmod.blog.com
Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918
---------------------------------------------------------------
Anywho, if any of the more experienced coders have any idea what I am talking about here Id appreciate help. I plan to stop doing old games soon and I really want to try out my ideas, I just want to know if they are/arent a waste of time.
Two things.One Has anyone ever found the shader in control of Camera[any game]? I know each shader with an object has cameraposition. But I figure there has to be one in charge of the global camera. Ive never have and perhaps its cause ive only tried in UE3. I am asking because I want to try correcting first person weapon depths. I know that one camera controls "world/fov" and one controls first person and they are technically not wrong but Id like to try to compensate of games where its off by ALOT like from FOV/ or weapons have all different lengths.
Second. This one may be unrealistic. Is there a shader in charge of viewprojectionmatrix. Like where its being floated from/starting point. Someone once asked can you do seperate convergence settings in a game depending on situation[like rpg/cinematics]. I said no because we cant talk to dx9settings through shaders just other way around.
Ussually something happens in these situations. Like hud elements dissapear/ or a black bar shows up.Couldnt we pass the information to that shader if that "situation" happens as long as the hud shader loads before that shader[s]? I guess the other option is as long as its before all the shaders with a viewprojection matrix but thats probably a crap ton of shaders in many cases and they'd have to load after hud. [not to mention work]
Like couldnt we use the same property that helix uses to passes matrix information through samplers for "on/off switches" by moving the registers to samplers if the textures are active? So we change viewprojectionmatrix's position based of if active?
Like if texture is active
make r3 = 2
in dx9settings
get r3 place in s1
move s1 to other shader
do texdl r10, r10, s1
if r10 not equal 0
move position.
Co-founder/Web host of helixmod.blog.com
Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918
https://dl.dropboxusercontent.com/u/17425913/hl2.rar
Hi bo3b, some of the best advances come from wild ideas, so keep it going. It's not that much of a wild idea though, and worth a try. It's also interesting to see how different games do implement things differently with the same engine, to get clues about what might be wrong. If I get time I want to look at this as well, because I liked Dear Esther and was thinking about seeing if I could do anything with its few minor issues (the main one being water - but btw did you know that if, when the water looks wrong, you alt tab out of game and back in again its fixes the water?). I looked briefly at the L4D2 water thing, trying the different profiles, but did not really give it a decent shot. I did think it would be easier to fix the water halos with the standard profile, rather than the reflections with the prototype profile, but that was just an initial assessment. I was looking at the 'Swamp' level, loads of water and good test case. I think I did find a shader to disable reflections, which half solves the problem if using the prototype profile, I would have to check again though.
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278
HL2 all games share CRC's [everyone as far as I know. Water definetly does. You can drop this in any HL2 game]. Its very likely you can just drop this in L4D2.
https://forums.geforce.com/default/topic/513190/3d-vision/how-to-fix-disable-shaders-in-games-dll-guide-and-fixes-/post/3740070/#3740070
Alt tabbing will fix water when in Fable 3 as well. I think this has to do with 3d vision heuristics. It seems like mana84 said going underwater does something but I havent looked at what it does to know. I thought HL2 looked fine underwater but just not above but I dunno.
Like im pretty in both cases[Fable 3/Dear esther] water is at screen depth but when you alt tab. It sort of skips this step and will sterolize it proper. Like its backwards from Dead Island where if you alt tab it breaks shadows[or breaks it more then it was]
I think you need to do what helix explained in Mars War Log to fix. I really need to read more but it all sounds like the same thing. Mana84 suggested to read this to me. http://developer.download.nvidia.com/whitepapers/2010/3D_Vision_Best_Practices_Guide.pdf
Defeating the 3D vision heuristics section is where the juice of it is.
@mikear69
The main issue we had in mars wars log before checking profiles and switching to prototype/aion was post processing. If you look at helix's code and explanation in guide posted above it shows how helix fixes it though I dont know why he has that "else".
Co-founder/Web host of helixmod.blog.com
Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918
I'll also have another look at Mana84's HL2 code as well.
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278
I don't believe that there is a single shader in control of Camera, not ever. It seems to me that there is a camera position, but it is more implicit, rather than explicit. The camera location is a function of where the current Projection matrix puts it. Possibly there is an interim eye-space matrix, but the idea is the same- the camera is moved by transforming the matrix, not a shader.
I think you can still get the function you want, of being able to move the FOV or the world view, but I think that you would need to do this by altering the Projection matrix, which effectively would move the camera position.
Not sure I follow your idea here. In general I would say no, there is no shader in charge of MVP matrix, that's thinking about it backwards. The MVP matrix is the master, and the shaders are the slaves. They can only operate upon the pieces given to them. Some will be given the entire screen, so that they can apply fully screen shakes, or fog, or blur or so on. But only one fragment/pixel at a time. I don't think they have access to anything outside of the v0 passed in.
Also, the MVP matrix that is provided at the shader runtime is always a ReadOnly constant that I've seen. So the shaders cannot actively modify the matrix for anyone else. The runtime environment for shaders is extremely limited, and doesn't allow for modifying global state, nor sharing constants or variables with other shaders. This is something the HLSL could do, as it has access to the globals, but not at the ASM level.
I can't see how we can get any value back from a shader, even back to the Helix dll level. At least at present. It seems theoretically possible that Helix might be able to add a function to look for a specific returned texture or sampler and hand off to another shader. But, as you note, order would matter.
Not completely sure here, but hope that helps.
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