[quote="DarkStarSword"][quote]Pressing F10 only fixes the problem.[/quote]Hmmm, that's an interesting data point. Pressing F10 will destroy all temporary and cached resources/views that 3DMigoto has created and recreate them... I wonder if the cached view is causing issues... Looks like I have Dirt 3 in my library, so I can take a look at this later.
[/quote]
This is fixed in 3DMigoto 1.2.12 - it was indeed due to 3DMigoto using a stale cached view:
https://github.com/bo3b/3Dmigoto/releases/tag/1.2.12
Hmmm, that's an interesting data point. Pressing F10 will destroy all temporary and cached resources/views that 3DMigoto has created and recreate them... I wonder if the cached view is causing issues... Looks like I have Dirt 3 in my library, so I can take a look at this later.
This is fixed in 3DMigoto 1.2.12 - it was indeed due to 3DMigoto using a stale cached view:
Wow, you are quick in fixing bugs. You said you are gonna try Dirt 3, so maybe it's the time to fix the missing decompiler scenario when the float4x4 type has an initialised value as a matrix, but getting only the first row of data as an array, and then the rest of cbuffers after that are missing. That occurs in around 10-20% of Dirt's pixel shaders.
[code]// float4x4 colorXForm; // Offset: 1040 Size: 64 [unused]
// = 0x3f800000 0x00000000 0x00000000 0x00000000
// 0x00000000 0x3f800000 0x00000000 0x00000000
// 0x00000000 0x00000000 0x3f800000 0x00000000
// 0x00000000 0x00000000 0x00000000 0x3f800000 [/code]
Hmmm... Yeah, that's a known problem, and this is the second game that is suffering from this problem that I know of, so I'll push this up higher on my list.
Hmmm... Yeah, that's a known problem, and this is the second game that is suffering from this problem that I know of, so I'll push this up higher on my list.
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
I think I may have found a bug in the decompiler. Please kindly take a look at the below shader code. After saving the water shader all the masking is gone.
@Oomek: Yup, that looks like a bug alright. :->
This one looks to be a missing "centroid" specifier on the input parameters. We aren't presently parsing those, and it's on my list.
Change the input header info by adding the "centroid" keyword as shown here:
[code]void main(
float4 v0 : SV_Position0,
float4 v1 : COLOR1,
float4 v2 : TEXCOORD0,
float4 v3 : TEXCOORD1,
centroid float4 v4 : TEXCOORD2, // Decompiler bug, missing 'centroid' keyword.
centroid float4 v5 : TEXCOORD3,
centroid float4 v6 : TEXCOORD4,
centroid float4 v7 : TEXCOORD5,
float4 v8 : TEXCOORD6,
centroid float4 v9 : TEXCOORD7,
out float4 o0 : SV_Target0)
[/code]
After making that change, here is the diff that I use to see problems in the Decompile/Compile process. This one is pretty clean, so I'd expect this to work properly with that manual fix.
[url]https://www.diffchecker.com/pa0rbs9e[/url]
After making that change, here is the diff that I use to see problems in the Decompile/Compile process. This one is pretty clean, so I'd expect this to work properly with that manual fix.
Hi guys, Would it be possible to add the ability to store shaders in subfolders? It would tremendously help in managing my growing collection of shaders.
Hi guys, Would it be possible to add the ability to store shaders in subfolders? It would tremendously help in managing my growing collection of shaders.
[quote="Oomek"]Hi guys, Would it be possible to add the ability to store shaders in subfolders? It would tremendously help in managing my growing collection of shaders.[/quote]
Not easily. Volnaiskra had the same request, but in thinking about it at that time, it would greatly increase the complexity of loading the shaders and having to manage conflicts.
There are other external tools that can manage the grouping for you, in whatever way you like. I use these all the time.
The best thing to do is to use [i]comments [/i]in your shader code. In general, I strongly press people to add comments, because of a long history of software development. Comments are not optional, you can never understand the "why" question from code alone.
In our case here, if you add a comment tag at the header of your file, like "Shadows", "Gravel", anything you'd like to group by, then you can find these afterwards by using the search option in Explorer. Open ShaderFixes, top right corner, search for "Gravel". All shaders with that keyword shown.
This also allows you the flexibility of having multiple categories for a single shader. "Gravel" AND "Shadows", which folders would not allow.
If you use external version control software like Git, you can organize them however you want, with implicit or explicit categories. This is worth doing for version control alone.
I still think comments are slightly better than external buckets, but using both is a very powerful setup.
If that doesn't seem good enough, make a stronger case for folders and we will consider it. (or if you you really just gotta have it- open source, make a pull request. We won't deny anything people build.)
Oomek said:Hi guys, Would it be possible to add the ability to store shaders in subfolders? It would tremendously help in managing my growing collection of shaders.
Not easily. Volnaiskra had the same request, but in thinking about it at that time, it would greatly increase the complexity of loading the shaders and having to manage conflicts.
There are other external tools that can manage the grouping for you, in whatever way you like. I use these all the time.
The best thing to do is to use comments in your shader code. In general, I strongly press people to add comments, because of a long history of software development. Comments are not optional, you can never understand the "why" question from code alone.
In our case here, if you add a comment tag at the header of your file, like "Shadows", "Gravel", anything you'd like to group by, then you can find these afterwards by using the search option in Explorer. Open ShaderFixes, top right corner, search for "Gravel". All shaders with that keyword shown.
This also allows you the flexibility of having multiple categories for a single shader. "Gravel" AND "Shadows", which folders would not allow.
If you use external version control software like Git, you can organize them however you want, with implicit or explicit categories. This is worth doing for version control alone.
I still think comments are slightly better than external buckets, but using both is a very powerful setup.
If that doesn't seem good enough, make a stronger case for folders and we will consider it. (or if you you really just gotta have it- open source, make a pull request. We won't deny anything people build.)
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
I would never have thought it could be that hard to do.
My code is well comented so it's not a problem for me to know what the specific shader does, it's rather the annoyance of opening each time every shader one by one (so far around 50) to find the one I want to edit.
WOW, I've just realized renaming the shader files IS actually allowed :)
I renamed one shader to: 1f4a8b792a97b0f3-ps_replace-STREAKS-MOD.txt and it's still loading,
BUT...
there is a catch, renamed shaders are not loading when the game starts, only when I press reload_fixes.
If adding folder support is troublesome for you, maybe you could allow to load also renamed shaders when the game starts. What do you think? How much hastle would that be?
I would never have thought it could be that hard to do.
My code is well comented so it's not a problem for me to know what the specific shader does, it's rather the annoyance of opening each time every shader one by one (so far around 50) to find the one I want to edit.
WOW, I've just realized renaming the shader files IS actually allowed :)
I renamed one shader to: 1f4a8b792a97b0f3-ps_replace-STREAKS-MOD.txt and it's still loading,
BUT...
there is a catch, renamed shaders are not loading when the game starts, only when I press reload_fixes.
If adding folder support is troublesome for you, maybe you could allow to load also renamed shaders when the game starts. What do you think? How much hastle would that be?
[quote="Oomek"]I would never have thought it could be that hard to do.
My code is well comented so it's not a problem for me to know what the specific shader does, it's rather the annoyance of opening each time every shader one by one (so far around 50) to find the one I want to edit.
WOW, I've just realized renaming the shader files IS actually allowed :)
I renamed one shader to: 1f4a8b792a97b0f3-ps_replace-STREAKS-MOD.txt and it's still loading,
BUT...
there is a catch, renamed shaders are not loading when the game starts, only when I press reload_fixes.
If adding folder support is troublesome for you, maybe you could allow to load also renamed shaders when the game starts. What do you think? How much hastle would that be?[/quote]
That conflicts with other shaderhacker's workflow. A lot of people will rename a shader to get it out of the way, specifically make it not load.
The reason appending works there is probably an introduced bug when we added ASM support. The file name matching used to be really strict to avoid confusing accidents. Strict and clear is better than lax, because when it's all super flexible, and you run into a problem, it's really hard and time consuming to figure out what went wrong.
I didn't say it was hard coding-wise, it's hard to make a system that works for everyone that isn't insanely complex. As a general rule I try to encourage not adding changes that make the code flow even harder than it already is- especially if there are offline workarounds that are probably superior.
There was an earlier mode for example that would load out of ShaderCache as well. Then we had a whole series of questions and problems because people had files in both places, and which took precedence, and which was invisible. Think through the edge cases, and I think you will not be as sure.
It's a balance though, we want to support people as much as possible.
If they are already commented, why don't you use the text search in the Explorer window?
[img]https://forums.geforce.com/cmd/default/download-comment-attachment/63774/[/img]
Oomek said:I would never have thought it could be that hard to do.
My code is well comented so it's not a problem for me to know what the specific shader does, it's rather the annoyance of opening each time every shader one by one (so far around 50) to find the one I want to edit.
WOW, I've just realized renaming the shader files IS actually allowed :)
I renamed one shader to: 1f4a8b792a97b0f3-ps_replace-STREAKS-MOD.txt and it's still loading,
BUT...
there is a catch, renamed shaders are not loading when the game starts, only when I press reload_fixes.
If adding folder support is troublesome for you, maybe you could allow to load also renamed shaders when the game starts. What do you think? How much hastle would that be?
That conflicts with other shaderhacker's workflow. A lot of people will rename a shader to get it out of the way, specifically make it not load.
The reason appending works there is probably an introduced bug when we added ASM support. The file name matching used to be really strict to avoid confusing accidents. Strict and clear is better than lax, because when it's all super flexible, and you run into a problem, it's really hard and time consuming to figure out what went wrong.
I didn't say it was hard coding-wise, it's hard to make a system that works for everyone that isn't insanely complex. As a general rule I try to encourage not adding changes that make the code flow even harder than it already is- especially if there are offline workarounds that are probably superior.
There was an earlier mode for example that would load out of ShaderCache as well. Then we had a whole series of questions and problems because people had files in both places, and which took precedence, and which was invisible. Think through the edge cases, and I think you will not be as sure.
It's a balance though, we want to support people as much as possible.
If they are already commented, why don't you use the text search in the Explorer window?
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="Oomek"]Hi guys, Would it be possible to add the ability to store shaders in subfolders? It would tremendously help in managing my growing collection of shaders.[/quote]NAK!
We want to avoid doing anything that needs to walk the directory heirachy when a shader is loaded (that includes subdirectories and it includes wildcards*) - the ShaderFixes folder can easily have thousands or more shaders, which can make searching it take multiple seconds *every time a new shader is used by he game*. On the other hand, if we know the exact path and filename we are looking for, we can completely avoid this overhead and load a shader in a matter of milliseconds (plus compile time).
[quote="Oomek"]WOW, I've just realized renaming the shader files IS actually allowed :)
I renamed one shader to: 1f4a8b792a97b0f3-ps_replace-STREAKS-MOD.txt and it's still loading,
BUT...
there is a catch, renamed shaders are not loading when the game starts, only when I press reload_fixes.
If adding folder support is troublesome for you, maybe you could allow to load also renamed shaders when the game starts. What do you think? How much hastle would that be?[/quote]* The only reason your renamed version worked on F10 reload is that reload has to walk the directory anyway and uses a wildcard to do so. The fact that it picked up your renamed file is a bug - do not rely on this behaviour, as it is quite likely it will be fixed in the next version now that we know about it.
The only way we could make this work, is if we preloaded every shader present when the game was launched, so we only have to pay the cost of the directory walk once. This would however cost us having to compile and load all shaders up front, including those the game will never end up using, and that would significantly increase the load time of the game (ever updated the timestamps on every shader and pressed F10? Takes a while right? And that's only reloading the ones the game has used *so far*). You could maybe get tricky here and cache the file listing but not load the shaders, but there's already a piece of software on the system that does exactly that, and it's called an operating system.
Oomek said:Hi guys, Would it be possible to add the ability to store shaders in subfolders? It would tremendously help in managing my growing collection of shaders.
NAK!
We want to avoid doing anything that needs to walk the directory heirachy when a shader is loaded (that includes subdirectories and it includes wildcards*) - the ShaderFixes folder can easily have thousands or more shaders, which can make searching it take multiple seconds *every time a new shader is used by he game*. On the other hand, if we know the exact path and filename we are looking for, we can completely avoid this overhead and load a shader in a matter of milliseconds (plus compile time).
Oomek said:WOW, I've just realized renaming the shader files IS actually allowed :)
I renamed one shader to: 1f4a8b792a97b0f3-ps_replace-STREAKS-MOD.txt and it's still loading,
BUT...
there is a catch, renamed shaders are not loading when the game starts, only when I press reload_fixes.
If adding folder support is troublesome for you, maybe you could allow to load also renamed shaders when the game starts. What do you think? How much hastle would that be?
* The only reason your renamed version worked on F10 reload is that reload has to walk the directory anyway and uses a wildcard to do so. The fact that it picked up your renamed file is a bug - do not rely on this behaviour, as it is quite likely it will be fixed in the next version now that we know about it.
The only way we could make this work, is if we preloaded every shader present when the game was launched, so we only have to pay the cost of the directory walk once. This would however cost us having to compile and load all shaders up front, including those the game will never end up using, and that would significantly increase the load time of the game (ever updated the timestamps on every shader and pressed F10? Takes a while right? And that's only reloading the ones the game has used *so far*). You could maybe get tricky here and cache the file listing but not load the shaders, but there's already a piece of software on the system that does exactly that, and it's called an operating system.
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
Here's another suggestion that occurred to me for sorting and organizing shaders. Use Shortcuts.
We don't walk into subdirectories, or any folders, so you can make a set of folders how you like. Then, copy shortcuts into that folder for the shaders you want organized into a given folder. You can do them en-masse using the alt-key drag.
Would that do the job for you?
Here's another suggestion that occurred to me for sorting and organizing shaders. Use Shortcuts.
We don't walk into subdirectories, or any folders, so you can make a set of folders how you like. Then, copy shortcuts into that folder for the shaders you want organized into a given folder. You can do them en-masse using the alt-key drag.
Would that do the job for you?
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"]@Oomek: Yup, that looks like a bug alright. :->
This one looks to be a missing "centroid" specifier on the input parameters. We aren't presently parsing those, and it's on my list.
Change the input header info by adding the "centroid" keyword as shown here:
[code]void main(
float4 v0 : SV_Position0,
float4 v1 : COLOR1,
float4 v2 : TEXCOORD0,
float4 v3 : TEXCOORD1,
centroid float4 v4 : TEXCOORD2, // Decompiler bug, missing 'centroid' keyword.
centroid float4 v5 : TEXCOORD3,
centroid float4 v6 : TEXCOORD4,
centroid float4 v7 : TEXCOORD5,
float4 v8 : TEXCOORD6,
centroid float4 v9 : TEXCOORD7,
out float4 o0 : SV_Target0)
[/code]
After making that change, here is the diff that I use to see problems in the Decompile/Compile process. This one is pretty clean, so I'd expect this to work properly with that manual fix.
[url]https://www.diffchecker.com/pa0rbs9e[/url]
[/quote]
Fixed in version 1.1.13.
All interpolation modifiers are passed back to the HLSL. Not certain this works in all scenarios, only tested one game. Worked correctly for 'linear centroid' variant.
Let us know if you see problems, especially things that don't compile because of this.
After making that change, here is the diff that I use to see problems in the Decompile/Compile process. This one is pretty clean, so I'd expect this to work properly with that manual fix.
All interpolation modifiers are passed back to the HLSL. Not certain this works in all scenarios, only tested one game. Worked correctly for 'linear centroid' variant.
Let us know if you see problems, especially things that don't compile because of this.
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
Yep, we could probably make shortcuts work. We'd have to be a little careful as we would have to check the target of the shortcut when reloading shaders, not the shortcut itself*.
* Insert my usual rant here about the broken design of windows shortcuts compared to the way every other OS of note does the equivalent thing**. The fact that we have to add more code to make them work is testament to the broken design.
I would suggest that it should be easy to write a batch file to update all the shortcuts, but it appears that there is no command line tool to do that in Windows. +1 fodder added to my usual rant for the future ;-p
** to be fair, it appears that Windows now does support symbolic links if using NTFS, however unlike other OSs that have supported them since the 1970s, their existence is still relatively new to Windows, so a lot of software that actually does need to be aware of them cannot cope with them (e.g. the .zip file format doesn't support them, so unless we want to distribute the fixes as .tar.gz and confuse all the users...), and they won't work for anyone using FAT.
Yep, we could probably make shortcuts work. We'd have to be a little careful as we would have to check the target of the shortcut when reloading shaders, not the shortcut itself*.
* Insert my usual rant here about the broken design of windows shortcuts compared to the way every other OS of note does the equivalent thing**. The fact that we have to add more code to make them work is testament to the broken design.
I would suggest that it should be easy to write a batch file to update all the shortcuts, but it appears that there is no command line tool to do that in Windows. +1 fodder added to my usual rant for the future ;-p
** to be fair, it appears that Windows now does support symbolic links if using NTFS, however unlike other OSs that have supported them since the 1970s, their existence is still relatively new to Windows, so a lot of software that actually does need to be aware of them cannot cope with them (e.g. the .zip file format doesn't support them, so unless we want to distribute the fixes as .tar.gz and confuse all the users...), and they won't work for anyone using FAT.
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
This is fixed in 3DMigoto 1.2.12 - it was indeed due to 3DMigoto using a stale cached view:
https://github.com/bo3b/3Dmigoto/releases/tag/1.2.12
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
If it's going to take longer time to implement than I spend on fixing them manually don't bother please :)
Edit:
Here is the MS compiler output of that part
EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64
Hmmm... Yeah, that's a known problem, and this is the second game that is suffering from this problem that I know of, so I'll push this up higher on my list.
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
EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64
Here are the screenshots before and after pressing 3 on the numpad.
what is even funnier the artiffacts are random, sometimes the masking is gone, sometimes the color of reflections gets darker.
EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64
This one looks to be a missing "centroid" specifier on the input parameters. We aren't presently parsing those, and it's on my list.
Change the input header info by adding the "centroid" keyword as shown here:
After making that change, here is the diff that I use to see problems in the Decompile/Compile process. This one is pretty clean, so I'd expect this to work properly with that manual fix.
https://www.diffchecker.com/pa0rbs9e
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
EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64
EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64
Not easily. Volnaiskra had the same request, but in thinking about it at that time, it would greatly increase the complexity of loading the shaders and having to manage conflicts.
There are other external tools that can manage the grouping for you, in whatever way you like. I use these all the time.
The best thing to do is to use comments in your shader code. In general, I strongly press people to add comments, because of a long history of software development. Comments are not optional, you can never understand the "why" question from code alone.
In our case here, if you add a comment tag at the header of your file, like "Shadows", "Gravel", anything you'd like to group by, then you can find these afterwards by using the search option in Explorer. Open ShaderFixes, top right corner, search for "Gravel". All shaders with that keyword shown.
This also allows you the flexibility of having multiple categories for a single shader. "Gravel" AND "Shadows", which folders would not allow.
If you use external version control software like Git, you can organize them however you want, with implicit or explicit categories. This is worth doing for version control alone.
I still think comments are slightly better than external buckets, but using both is a very powerful setup.
If that doesn't seem good enough, make a stronger case for folders and we will consider it. (or if you you really just gotta have it- open source, make a pull request. We won't deny anything people build.)
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
My code is well comented so it's not a problem for me to know what the specific shader does, it's rather the annoyance of opening each time every shader one by one (so far around 50) to find the one I want to edit.
WOW, I've just realized renaming the shader files IS actually allowed :)
I renamed one shader to: 1f4a8b792a97b0f3-ps_replace-STREAKS-MOD.txt and it's still loading,
BUT...
there is a catch, renamed shaders are not loading when the game starts, only when I press reload_fixes.
If adding folder support is troublesome for you, maybe you could allow to load also renamed shaders when the game starts. What do you think? How much hastle would that be?
EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64
That conflicts with other shaderhacker's workflow. A lot of people will rename a shader to get it out of the way, specifically make it not load.
The reason appending works there is probably an introduced bug when we added ASM support. The file name matching used to be really strict to avoid confusing accidents. Strict and clear is better than lax, because when it's all super flexible, and you run into a problem, it's really hard and time consuming to figure out what went wrong.
I didn't say it was hard coding-wise, it's hard to make a system that works for everyone that isn't insanely complex. As a general rule I try to encourage not adding changes that make the code flow even harder than it already is- especially if there are offline workarounds that are probably superior.
There was an earlier mode for example that would load out of ShaderCache as well. Then we had a whole series of questions and problems because people had files in both places, and which took precedence, and which was invisible. Think through the edge cases, and I think you will not be as sure.
It's a balance though, we want to support people as much as possible.
If they are already commented, why don't you use the text search in the Explorer window?
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 want to avoid doing anything that needs to walk the directory heirachy when a shader is loaded (that includes subdirectories and it includes wildcards*) - the ShaderFixes folder can easily have thousands or more shaders, which can make searching it take multiple seconds *every time a new shader is used by he game*. On the other hand, if we know the exact path and filename we are looking for, we can completely avoid this overhead and load a shader in a matter of milliseconds (plus compile time).
* The only reason your renamed version worked on F10 reload is that reload has to walk the directory anyway and uses a wildcard to do so. The fact that it picked up your renamed file is a bug - do not rely on this behaviour, as it is quite likely it will be fixed in the next version now that we know about it.
The only way we could make this work, is if we preloaded every shader present when the game was launched, so we only have to pay the cost of the directory walk once. This would however cost us having to compile and load all shaders up front, including those the game will never end up using, and that would significantly increase the load time of the game (ever updated the timestamps on every shader and pressed F10? Takes a while right? And that's only reloading the ones the game has used *so far*). You could maybe get tricky here and cache the file listing but not load the shaders, but there's already a piece of software on the system that does exactly that, and it's called an operating system.
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
We don't walk into subdirectories, or any folders, so you can make a set of folders how you like. Then, copy shortcuts into that folder for the shaders you want organized into a given folder. You can do them en-masse using the alt-key drag.
Would that do the job for you?
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
Fixed in version 1.1.13.
All interpolation modifiers are passed back to the HLSL. Not certain this works in all scenarios, only tested one game. Worked correctly for 'linear centroid' variant.
Let us know if you see problems, especially things that don't compile because of this.
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
* Insert my usual rant here about the broken design of windows shortcuts compared to the way every other OS of note does the equivalent thing**. The fact that we have to add more code to make them work is testament to the broken design.
I would suggest that it should be easy to write a batch file to update all the shortcuts, but it appears that there is no command line tool to do that in Windows. +1 fodder added to my usual rant for the future ;-p
** to be fair, it appears that Windows now does support symbolic links if using NTFS, however unlike other OSs that have supported them since the 1970s, their existence is still relatively new to Windows, so a lot of software that actually does need to be aware of them cannot cope with them (e.g. the .zip file format doesn't support them, so unless we want to distribute the fixes as .tar.gz and confuse all the users...), and they won't work for anyone using FAT.
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