[quote="masterotaku"][quote="bo3b"]I don't understand the question.[/quote]It's probably something about how 3Dmigoto works that I don't understand. Like if the non dumped vertex shader is sending two texcoords with 4 dimensions, how can the incorrectly 3Dmigoto generated pixel shader that receives 4 texcoords of 2 dimensions work with just a tweak in the method? Probably a stupid question. I repeat, I'm a web developer so this isn't my field :p.[/quote]
As long as the inputs and outputs match, that's the key aspect. So the ones that are broken into two pieces, as long as they still use the proper output register it will work.
Like o2.xy and o2.zw for two pieces. As long as we still get the outputs into o2, we can break them into the two parts, and the HLSL compiler will recombine them.
Similarly for the pixel shader, as long as the input matches it will work. The bug is in the generation of the HLSL code itself, not in the interface/input parameters.
It's probably something about how 3Dmigoto works that I don't understand. Like if the non dumped vertex shader is sending two texcoords with 4 dimensions, how can the incorrectly 3Dmigoto generated pixel shader that receives 4 texcoords of 2 dimensions work with just a tweak in the method? Probably a stupid question. I repeat, I'm a web developer so this isn't my field :p.
As long as the inputs and outputs match, that's the key aspect. So the ones that are broken into two pieces, as long as they still use the proper output register it will work.
Like o2.xy and o2.zw for two pieces. As long as we still get the outputs into o2, we can break them into the two parts, and the HLSL compiler will recombine them.
Similarly for the pixel shader, as long as the input matches it will work. The bug is in the generation of the HLSL code itself, not in the interface/input parameters.
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="helifax"]Yes, that's exactly what I am trying to say;)
Because it moves in the same dirrection in both eyes that means the CS is not executed one time for each frame;)
So, most likely there is another Shader (CS probably) that is using the OUTPUT of this shader to render;)
Hope this makes sense;)
Now, how to find the other shader, based on what DSS told me and used in ROTTR is to use Frame analysis and see what other CS is using this shader;)[/quote]
Nah, there's only one CS used by the game (both when hunting and what's shown in a frame analysis output), and again, if I do just a regular stereo correction formula, the lighting will separate into stereo images, just not correctly, so I'm sure this is the correct shader to work in, I'm just working with a world coordinate and only have a VPM to work with, no iVPM. Its only if I try that alternate adjustment method that it moves in the same direction in both eyes, so either there's something wrong with my converted formula, or it simply doesn't work in this place.
Thanks for trying to help out, but I have a feeling I'll have to be patient and hope that DSS is able to take a look at this when he has time.
helifax said:Yes, that's exactly what I am trying to say;)
Because it moves in the same dirrection in both eyes that means the CS is not executed one time for each frame;)
So, most likely there is another Shader (CS probably) that is using the OUTPUT of this shader to render;)
Hope this makes sense;)
Now, how to find the other shader, based on what DSS told me and used in ROTTR is to use Frame analysis and see what other CS is using this shader;)
Nah, there's only one CS used by the game (both when hunting and what's shown in a frame analysis output), and again, if I do just a regular stereo correction formula, the lighting will separate into stereo images, just not correctly, so I'm sure this is the correct shader to work in, I'm just working with a world coordinate and only have a VPM to work with, no iVPM. Its only if I try that alternate adjustment method that it moves in the same direction in both eyes, so either there's something wrong with my converted formula, or it simply doesn't work in this place.
Thanks for trying to help out, but I have a feeling I'll have to be patient and hope that DSS is able to take a look at this when he has time.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
[quote="DJ-RK"]The good news is that there is a VPM in the shader, however the bad news is there is no iVPM... annnnd being as it's a compute shader, I'm having to work with the ASM code, and therefore I have no idea how to use DarkStarSwords matrix.hlsl shader to do the inverse, or whether it's even possible.[/quote]My plan for this situation was to inject a custom shader to do the inverse that would run before the compute shader, and store the result in an custom resource. I wrote a variation of matrix.hlsl to do this in parallel using a couple of threads, but I don't think I've used it in a fix yet - I'll see if I can dig it up when I get home.
BTW did you resolve the flickering issue with this game, or did you still need me to look at that?
DJ-RK said:The good news is that there is a VPM in the shader, however the bad news is there is no iVPM... annnnd being as it's a compute shader, I'm having to work with the ASM code, and therefore I have no idea how to use DarkStarSwords matrix.hlsl shader to do the inverse, or whether it's even possible.
My plan for this situation was to inject a custom shader to do the inverse that would run before the compute shader, and store the result in an custom resource. I wrote a variation of matrix.hlsl to do this in parallel using a couple of threads, but I don't think I've used it in a fix yet - I'll see if I can dig it up when I get home.
BTW did you resolve the flickering issue with this game, or did you still need me to look at that?
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
[quote="DarkStarSword"]My plan for this situation was to inject a custom shader to do the inverse that would run before the compute shader, and store the result in an custom resource. I wrote a variation of matrix.hlsl to do this in parallel using a couple of threads, but I don't think I've used it in a fix yet - I'll see if I can dig it up when I get home.
BTW did you resolve the flickering issue with this game, or did you still need me to look at that?[/quote]
Awesome. Glad to hear you've already thought ahead to the matter, and be appreciative to try out your new toy first! ;)
As for the flickering, that's a mixed bag. I solved some of it, but some issues still remain. One of them is there's a bit of a conflict between using the deny_cpu_read option with the standard Cryengine RT 3d7dd24e... it helps solve some distant geometry flickering in the first area, but introduced some culling of some lighting/shadows in the enclosed area in the 2nd half of the first stage. A shame there's not a way to toggle this. There's also a really bizarre issue with some lighting/shadows in the 2nd stage where the necessary fix to those shaders causes them to go into rave/seizure mode in that one particular area, but everywhere else is fine. Disabling the fix code/pressing F9 to see the original shaders reverts them back to not becoming strobe lights.
I'll progress through the game and clean up as much as I can, and hit you up on what's remaining if you're willing and happen to have the time to look, but even if that's not in your means, based on the progress thus far I think the fix I'll manage to put together should be sufficient, just not perfect (and I'm ok with that!).
DarkStarSword said:My plan for this situation was to inject a custom shader to do the inverse that would run before the compute shader, and store the result in an custom resource. I wrote a variation of matrix.hlsl to do this in parallel using a couple of threads, but I don't think I've used it in a fix yet - I'll see if I can dig it up when I get home.
BTW did you resolve the flickering issue with this game, or did you still need me to look at that?
Awesome. Glad to hear you've already thought ahead to the matter, and be appreciative to try out your new toy first! ;)
As for the flickering, that's a mixed bag. I solved some of it, but some issues still remain. One of them is there's a bit of a conflict between using the deny_cpu_read option with the standard Cryengine RT 3d7dd24e... it helps solve some distant geometry flickering in the first area, but introduced some culling of some lighting/shadows in the enclosed area in the 2nd half of the first stage. A shame there's not a way to toggle this. There's also a really bizarre issue with some lighting/shadows in the 2nd stage where the necessary fix to those shaders causes them to go into rave/seizure mode in that one particular area, but everywhere else is fine. Disabling the fix code/pressing F9 to see the original shaders reverts them back to not becoming strobe lights.
I'll progress through the game and clean up as much as I can, and hit you up on what's remaining if you're willing and happen to have the time to look, but even if that's not in your means, based on the progress thus far I think the fix I'll manage to put together should be sufficient, just not perfect (and I'm ok with that!).
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
I got the custom shader working to do the matrix inverse. You will need to grab 3DMigoto 1.2.40 - I fixed a crash when creating a custom (non-structured) buffer, and made it figure out what value to use for the buffer's stride so you don't need to care:
https://github.com/bo3b/3Dmigoto/releases/tag/1.2.40
d3dx.ini:
[code]
; Demonstration of using an injected shader to inverse a matrix
; Custom resource to hold the inversed matrix
[ResourceInverseMatrix]
type = Buffer
format = R32G32B32A32_FLOAT
array = 4
; Backups of resources bound to the pipeline. Depending on the game it may be
; safe to omit some of these, but always safer to use them:
[ResourceBackupCSCB0]
[ResourceBackupCSU0]
[ResourceBackupPSCB13]
; This runs a custom shader to calculate the inverse of a matrix found in a
; constant buffer currently bound to the pixel shader cb0. To change the offset
; of the matrix to be inversed within that constant buffer, the shader itself
; must be edited:
[CustomShaderInverseMatrix]
cs = ShaderFixes/inverse-cs.hlsl
ResourceBackupCSCB0 = ref cs-cb0
ResourceBackupCSU0 = ref cs-u0
; Input constant buffer - the matrix to inverse is here:
cs-cb0 = ps-cb0
; Output buffer - this will hold the result:
cs-u0 = ResourceInverseMatrix
Dispatch = 1, 1, 1
post cs-cb0 = ResourceBackupCSCB0
post cs-u0 = ResourceBackupCSU0
[ShaderOverrideFoo]
hash = ...
run = CustomShaderInverseMatrix
ResourceBackupPSCB13 = ref ps-cb13
; Inject the inversed matrix into this shader. Note that it is important to
; explicitly specify COPY here. The reason is that constant buffers are special
; in that they cannot be used for any other purpose, including using them as a
; UAV from the inverse compute shader as we have done above. Copying the buffer
; at this point avoids that limitation. Alternatively, the inversed matrix
; could be injected by reference into a texture slot to avoid the copy, though
; it is not clear that would be a performance win as texture slots are slower
; to access than constant buffers, and it's only copying 64 bytes.
ps-cb13 = copy ResourceInverseMatrix
post ps-cb13 = ResourceBackupPSCB13
[/code]
inverse-cs.hlsl (edit the inputs as necessary):
[code]
cbuffer InputConstantBuffer : register(b0)
{
float4x4 InputMatrix : packoffset(c0);
}
RWBuffer<float4> OutputMatrix : register(u0);
float4 inverse_transpose_parallel(matrix m, uint pos)
{
uint3 idx;
float4 tmp;
idx = pos < uint3(1, 2, 3) ? uint3(1, 2, 3) : uint3(0, 1, 2);
float add = pos % 2 == 0 ? 1.0 : -1.0;
tmp = m[idx.x].yxxx*(add*m[idx.y].zwyz*m[idx.z].wzwy - add*m[idx.y].wzwy*m[idx.z].zwyz)
+ m[idx.x].zzyy*(add*m[idx.y].wxwx*m[idx.z].ywxz - add*m[idx.y].ywxz*m[idx.z].wxwx)
+ m[idx.x].wwwz*(add*m[idx.y].yzxy*m[idx.z].zxyx - add*m[idx.y].zxyx*m[idx.z].yzxy);
return tmp / determinant(m);
}
[numthreads(4, 1, 1)]
void main(uint3 tid: SV_DispatchThreadID)
{
// We're using a transposing version of the matrix inverse function.
// This may seem wrong at first glance, but it works so long as the
// input matrix is declared in "column_major" order, because DX11
// stores "column_major" matrices with the entries across each *row* in
// each of the register components (this is the opposite of DX9), but
// when we write it to the output buffer we are writing the entries
// down each *column* to each of the components in a register. When
// this is read back in the destination shader, it will have been
// effectively transposed back to the correct order.
//
// If the input matrix is declared to be in "row_major" order, just lie
// and declare it "column_major" so the compiler will do the right
// thing, or add a transpose() around the input matrix (transposing the
// output would require a synchronisation between threads - better to
// avoid that and just transpose the input, which should be
// mathematically equivalent). Note that if you legitimately wanted a
// transposed output for some reason you could save some (13)
// instructions in this shader by doing the opposite of this advice.
InvViewMatrixOutputBuffer[tid.x] = inverse_transpose_parallel(ViewMatrix, tid.x);
}
[/code]
Full demo using one of the reflections in Far Cry Primal:
https://github.com/DarkStarSword/3d-fixes/commit/14f07cbf994f5d9335909d28a70c97ea8039621d
I got the custom shader working to do the matrix inverse. You will need to grab 3DMigoto 1.2.40 - I fixed a crash when creating a custom (non-structured) buffer, and made it figure out what value to use for the buffer's stride so you don't need to care:
https://github.com/bo3b/3Dmigoto/releases/tag/1.2.40
d3dx.ini:
; Demonstration of using an injected shader to inverse a matrix
; Custom resource to hold the inversed matrix
[ResourceInverseMatrix]
type = Buffer
format = R32G32B32A32_FLOAT
array = 4
; Backups of resources bound to the pipeline. Depending on the game it may be
; safe to omit some of these, but always safer to use them:
[ResourceBackupCSCB0]
[ResourceBackupCSU0]
[ResourceBackupPSCB13]
; This runs a custom shader to calculate the inverse of a matrix found in a
; constant buffer currently bound to the pixel shader cb0. To change the offset
; of the matrix to be inversed within that constant buffer, the shader itself
; must be edited:
[CustomShaderInverseMatrix]
cs = ShaderFixes/inverse-cs.hlsl
ResourceBackupCSCB0 = ref cs-cb0
ResourceBackupCSU0 = ref cs-u0
; Input constant buffer - the matrix to inverse is here:
cs-cb0 = ps-cb0
; Output buffer - this will hold the result:
cs-u0 = ResourceInverseMatrix
Dispatch = 1, 1, 1
post cs-cb0 = ResourceBackupCSCB0
post cs-u0 = ResourceBackupCSU0
[ShaderOverrideFoo]
hash = ...
run = CustomShaderInverseMatrix
ResourceBackupPSCB13 = ref ps-cb13
; Inject the inversed matrix into this shader. Note that it is important to
; explicitly specify COPY here. The reason is that constant buffers are special
; in that they cannot be used for any other purpose, including using them as a
; UAV from the inverse compute shader as we have done above. Copying the buffer
; at this point avoids that limitation. Alternatively, the inversed matrix
; could be injected by reference into a texture slot to avoid the copy, though
; it is not clear that would be a performance win as texture slots are slower
; to access than constant buffers, and it's only copying 64 bytes.
ps-cb13 = copy ResourceInverseMatrix
post ps-cb13 = ResourceBackupPSCB13
[numthreads(4, 1, 1)]
void main(uint3 tid: SV_DispatchThreadID)
{
// We're using a transposing version of the matrix inverse function.
// This may seem wrong at first glance, but it works so long as the
// input matrix is declared in "column_major" order, because DX11
// stores "column_major" matrices with the entries across each *row* in
// each of the register components (this is the opposite of DX9), but
// when we write it to the output buffer we are writing the entries
// down each *column* to each of the components in a register. When
// this is read back in the destination shader, it will have been
// effectively transposed back to the correct order.
//
// If the input matrix is declared to be in "row_major" order, just lie
// and declare it "column_major" so the compiler will do the right
// thing, or add a transpose() around the input matrix (transposing the
// output would require a synchronisation between threads - better to
// avoid that and just transpose the input, which should be
// mathematically equivalent). Note that if you legitimately wanted a
// transposed output for some reason you could save some (13)
// instructions in this shader by doing the opposite of this advice.
InvViewMatrixOutputBuffer[tid.x] = inverse_transpose_parallel(ViewMatrix, tid.x);
}
Edited the above post to add the divide by the determinant, which had gone missing (but somehow didn't seem to affect the reflection in FCPrimal).
I also noticed I had a couple of variations on the inverse shader for transposing / not transposing, but something didn't quite add up, as I had used the transposing version and it was working regardless. I've added an explanation for this - it's due to a quirk of how DX11 stores "column-major" matrices (opposite of DX9 and how we write the new matrix), and the compiler effectively adds a hidden transpose that balances everything out. If the input matrix is declared as row-major you would need to transpose the input matrix, or just edit the declaration lie that it's column-major.
Edited the above post to add the divide by the determinant, which had gone missing (but somehow didn't seem to affect the reflection in FCPrimal).
I also noticed I had a couple of variations on the inverse shader for transposing / not transposing, but something didn't quite add up, as I had used the transposing version and it was working regardless. I've added an explanation for this - it's due to a quirk of how DX11 stores "column-major" matrices (opposite of DX9 and how we write the new matrix), and the compiler effectively adds a hidden transpose that balances everything out. If the input matrix is declared as row-major you would need to transpose the input matrix, or just edit the declaration lie that it's column-major.
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
So I finally got around to using this last night, so first off allow me to say thanks for the update.
I think I managed to get it working, but certain parts I wasn't entirely certain on (mostly the parts in the d3dx.ini file), and unfortunately the end result didn't fix the broken shader (just moved it to another location, also in 2D), so I may have either not used it correctly or I may be using the wrong approach, so I'm hoping you can take a look at my code and see if you can provide any corrections or suggestions.
First off, the matrix that was already available in the CS was not in a CB, but rather is was in a structured buffer instead, and it may have only been a projection matrix rather than a VPM as well, so I decided to scrap the idea of using that. Instead I tried using resource copying to copy a CB from a VS that contains the VPM into the CS, and then use your inverse-cs.hlsl on that.
Another mention I'll make is at first when I tried using the inverse-cs stuff, it broke the shader all together (made the lighting disappear), and I ended up tweaking until I got it working, and part of that was to not bother with the resource backup stuff. I'm not sure how crucial that stuff was to it actually working, and assumed it was safe to leave commented out.
Anyway, I've made a zip of the 3 files: d3dx.ini, inverse-cs.hlsl, and the shader itself. Here's some details about the shader:
-the fix attempts all start at line 1113
-I've left all unsuccessful attempts commented out with some description as to what occurred with them
-I'm about 95% certain that this is the correct place to fix (well, either at line 1113 or 1175), because this is the only part where a set of coordinates are multiplied by the depth AND that performing a fix has any impact on the positioning of the lighting. Also, a SpecularRT texture is loaded just shortly prior.
Files: [url]https://www.mediafire.com/?se9f92s7wxnowqn[/url]
Thanks in advance for taking a look if/when you're able.
Edit: I just remembered you had a difficult time downloading a file I uploaded to mediafire before. Let me know if it's ok/necessary to send to you via email.
So I finally got around to using this last night, so first off allow me to say thanks for the update.
I think I managed to get it working, but certain parts I wasn't entirely certain on (mostly the parts in the d3dx.ini file), and unfortunately the end result didn't fix the broken shader (just moved it to another location, also in 2D), so I may have either not used it correctly or I may be using the wrong approach, so I'm hoping you can take a look at my code and see if you can provide any corrections or suggestions.
First off, the matrix that was already available in the CS was not in a CB, but rather is was in a structured buffer instead, and it may have only been a projection matrix rather than a VPM as well, so I decided to scrap the idea of using that. Instead I tried using resource copying to copy a CB from a VS that contains the VPM into the CS, and then use your inverse-cs.hlsl on that.
Another mention I'll make is at first when I tried using the inverse-cs stuff, it broke the shader all together (made the lighting disappear), and I ended up tweaking until I got it working, and part of that was to not bother with the resource backup stuff. I'm not sure how crucial that stuff was to it actually working, and assumed it was safe to leave commented out.
Anyway, I've made a zip of the 3 files: d3dx.ini, inverse-cs.hlsl, and the shader itself. Here's some details about the shader:
-the fix attempts all start at line 1113
-I've left all unsuccessful attempts commented out with some description as to what occurred with them
-I'm about 95% certain that this is the correct place to fix (well, either at line 1113 or 1175), because this is the only part where a set of coordinates are multiplied by the depth AND that performing a fix has any impact on the positioning of the lighting. Also, a SpecularRT texture is loaded just shortly prior.
Thanks in advance for taking a look if/when you're able.
Edit: I just remembered you had a difficult time downloading a file I uploaded to mediafire before. Let me know if it's ok/necessary to send to you via email.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Quick question - Will this wrapper work on DX11 games running in fullscreen windowed mode?
I'm running the Prepar3D flight sim (an updated FSX product) but it only offer fullscreen windowed mode.
I'm hopeful there is a way to make it work with this program.
Thanks!
[quote="Wazoo"]Quick question - Will this wrapper work on DX11 games running in fullscreen windowed mode?[/quote]
Yes, you can force fullscreen. In "d3dx.ini", search the ";full_screen=1" line and uncomment it. If "full_screen=1" doesn't work, try "full_screen=2".
[quote="masterotaku"][quote="Wazoo"]Quick question - Will this wrapper work on DX11 games running in fullscreen windowed mode?[/quote]
Yes, you can force fullscreen. In "d3dx.ini", search the ";full_screen=1" line and uncomment it. If "full_screen=1" doesn't work, try "full_screen=2".[/quote]
Unfortunately, this didn't work. :(
[quote="Wazoo"][quote="masterotaku"][quote="Wazoo"]Quick question - Will this wrapper work on DX11 games running in fullscreen windowed mode?[/quote]Yes, you can force fullscreen. In "d3dx.ini", search the ";full_screen=1" line and uncomment it. If "full_screen=1" doesn't work, try "full_screen=2".[/quote]Unfortunately, this didn't work. :([/quote]
If you are looking for a 3D fix, this will depend upon a lot of things that are not clear.
The FSX code included a 2D library that made it impossible to fix with our normal techniques. I'm not sure if Prepar3D still has that poor approach. It was used for effects like light bloom, smoke.
If forcing full_screen did not work, you can try adding the game to the GoogleEarth profile, which sometimes works for borderless games.
Lastly, if you just want to play, you should buy FlyInside instead. He made a version for Prepar3D that works to give you a VR version. For people serious about their flight sim, this is going to give you a better experience than 3D Vision.
(I've used FlyInside for FSX, and it works great, including fixing the 2D lights by some complicated geometry that he developed.)
Wazoo said:Quick question - Will this wrapper work on DX11 games running in fullscreen windowed mode?
Yes, you can force fullscreen. In "d3dx.ini", search the ";full_screen=1" line and uncomment it. If "full_screen=1" doesn't work, try "full_screen=2".
Unfortunately, this didn't work. :(
If you are looking for a 3D fix, this will depend upon a lot of things that are not clear.
The FSX code included a 2D library that made it impossible to fix with our normal techniques. I'm not sure if Prepar3D still has that poor approach. It was used for effects like light bloom, smoke.
If forcing full_screen did not work, you can try adding the game to the GoogleEarth profile, which sometimes works for borderless games.
Lastly, if you just want to play, you should buy FlyInside instead. He made a version for Prepar3D that works to give you a VR version. For people serious about their flight sim, this is going to give you a better experience than 3D Vision.
(I've used FlyInside for FSX, and it works great, including fixing the 2D lights by some complicated geometry that he developed.)
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"][quote="Wazoo"][quote="masterotaku"][quote="Wazoo"]Quick question - Will this wrapper work on DX11 games running in fullscreen windowed mode?[/quote]Yes, you can force fullscreen. In "d3dx.ini", search the ";full_screen=1" line and uncomment it. If "full_screen=1" doesn't work, try "full_screen=2".[/quote]Unfortunately, this didn't work. :([/quote]
If you are looking for a 3D fix, this will depend upon a lot of things that are not clear.
The FSX code included a 2D library that made it impossible to fix with our normal techniques. I'm not sure if Prepar3D still has that poor approach. It was used for effects like light bloom, smoke.
If forcing full_screen did not work, you can try adding the game to the GoogleEarth profile, which sometimes works for borderless games.
Lastly, if you just want to play, you should buy FlyInside instead. He made a version for Prepar3D that works to give you a VR version. For people serious about their flight sim, this is going to give you a better experience than 3D Vision.
(I've used FlyInside for FSX, and it works great, including fixing the 2D lights by some complicated geometry that he developed.)[/quote]
I'll give the GoogleEarth fix a try.
I'm aware of FlyInside, but I'm not ready to pull the trigger on first-gen VR rigs. Resolution is still too low for my tastes.
I'm hoping Gen 2 will make reading instruments and in-game text doable.
Wazoo said:Quick question - Will this wrapper work on DX11 games running in fullscreen windowed mode?
Yes, you can force fullscreen. In "d3dx.ini", search the ";full_screen=1" line and uncomment it. If "full_screen=1" doesn't work, try "full_screen=2".
Unfortunately, this didn't work. :(
If you are looking for a 3D fix, this will depend upon a lot of things that are not clear.
The FSX code included a 2D library that made it impossible to fix with our normal techniques. I'm not sure if Prepar3D still has that poor approach. It was used for effects like light bloom, smoke.
If forcing full_screen did not work, you can try adding the game to the GoogleEarth profile, which sometimes works for borderless games.
Lastly, if you just want to play, you should buy FlyInside instead. He made a version for Prepar3D that works to give you a VR version. For people serious about their flight sim, this is going to give you a better experience than 3D Vision.
(I've used FlyInside for FSX, and it works great, including fixing the 2D lights by some complicated geometry that he developed.)
I'll give the GoogleEarth fix a try.
I'm aware of FlyInside, but I'm not ready to pull the trigger on first-gen VR rigs. Resolution is still too low for my tastes.
I'm hoping Gen 2 will make reading instruments and in-game text doable.
Hello,
I'm starting to look to fix War Thunder in dx11 mode, at least for tank usage. The first thing I want to fix is the ground shadow : they are not in 3D. But I can not find neither a Pixel shader, nor a Vertex shader, that disabled shadow. I used the 1.2.41 version of 3Dmigoto. I tried to rotate geometry shader and domain shader, but with no success.
What can I tried ?
Hello,
I'm starting to look to fix War Thunder in dx11 mode, at least for tank usage. The first thing I want to fix is the ground shadow : they are not in 3D. But I can not find neither a Pixel shader, nor a Vertex shader, that disabled shadow. I used the 1.2.41 version of 3Dmigoto. I tried to rotate geometry shader and domain shader, but with no success.
What can I tried ?
Try compute shaders as well, and try marking_mode=pink as that sometimes helps reveal the correct shaders. If nothing else can find it you can try frame analysis.
Try compute shaders as well, and try marking_mode=pink as that sometimes helps reveal the correct shaders. If nothing else can find it you can try frame analysis.
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
Hello,
I made some testings regarding my fix for DCS and discovered that changing the lines
[code] stereo_params = 125
ini_params = 120[/code]
to
[code] stereo_params = 78
ini_params = 77
[/code]
make fps going from 34 to 30 ...
directory shaderfixes is empty, all texture and resource copying also The d3dx.ini is just containing variable definitons and key mapping.
Unfortunately I had to change the values because the register 125 and 120 are used for some effects in the game, but what could be the reason of such impact on fps ? It seems that others values are giving the same fps lost...
Resources copying and texture filtering seems to have nearly no impact of fps...
Hello,
I made some testings regarding my fix for DCS and discovered that changing the lines
stereo_params = 125
ini_params = 120
to
stereo_params = 78
ini_params = 77
make fps going from 34 to 30 ...
directory shaderfixes is empty, all texture and resource copying also The d3dx.ini is just containing variable definitons and key mapping.
Unfortunately I had to change the values because the register 125 and 120 are used for some effects in the game, but what could be the reason of such impact on fps ? It seems that others values are giving the same fps lost...
Resources copying and texture filtering seems to have nearly no impact of fps...
As long as the inputs and outputs match, that's the key aspect. So the ones that are broken into two pieces, as long as they still use the proper output register it will work.
Like o2.xy and o2.zw for two pieces. As long as we still get the outputs into o2, we can break them into the two parts, and the HLSL compiler will recombine them.
Similarly for the pixel shader, as long as the input matches it will work. The bug is in the generation of the HLSL code itself, not in the interface/input parameters.
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
Nah, there's only one CS used by the game (both when hunting and what's shown in a frame analysis output), and again, if I do just a regular stereo correction formula, the lighting will separate into stereo images, just not correctly, so I'm sure this is the correct shader to work in, I'm just working with a world coordinate and only have a VPM to work with, no iVPM. Its only if I try that alternate adjustment method that it moves in the same direction in both eyes, so either there's something wrong with my converted formula, or it simply doesn't work in this place.
Thanks for trying to help out, but I have a feeling I'll have to be patient and hope that DSS is able to take a look at this when he has time.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
BTW did you resolve the flickering issue with this game, or did you still need me to look at that?
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
Awesome. Glad to hear you've already thought ahead to the matter, and be appreciative to try out your new toy first! ;)
As for the flickering, that's a mixed bag. I solved some of it, but some issues still remain. One of them is there's a bit of a conflict between using the deny_cpu_read option with the standard Cryengine RT 3d7dd24e... it helps solve some distant geometry flickering in the first area, but introduced some culling of some lighting/shadows in the enclosed area in the 2nd half of the first stage. A shame there's not a way to toggle this. There's also a really bizarre issue with some lighting/shadows in the 2nd stage where the necessary fix to those shaders causes them to go into rave/seizure mode in that one particular area, but everywhere else is fine. Disabling the fix code/pressing F9 to see the original shaders reverts them back to not becoming strobe lights.
I'll progress through the game and clean up as much as I can, and hit you up on what's remaining if you're willing and happen to have the time to look, but even if that's not in your means, based on the progress thus far I think the fix I'll manage to put together should be sufficient, just not perfect (and I'm ok with that!).
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
https://github.com/bo3b/3Dmigoto/releases/tag/1.2.40
d3dx.ini:
inverse-cs.hlsl (edit the inputs as necessary):
Full demo using one of the reflections in Far Cry Primal:
https://github.com/DarkStarSword/3d-fixes/commit/14f07cbf994f5d9335909d28a70c97ea8039621d
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 also noticed I had a couple of variations on the inverse shader for transposing / not transposing, but something didn't quite add up, as I had used the transposing version and it was working regardless. I've added an explanation for this - it's due to a quirk of how DX11 stores "column-major" matrices (opposite of DX9 and how we write the new matrix), and the compiler effectively adds a hidden transpose that balances everything out. If the input matrix is declared as row-major you would need to transpose the input matrix, or just edit the declaration lie that it's column-major.
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 think I managed to get it working, but certain parts I wasn't entirely certain on (mostly the parts in the d3dx.ini file), and unfortunately the end result didn't fix the broken shader (just moved it to another location, also in 2D), so I may have either not used it correctly or I may be using the wrong approach, so I'm hoping you can take a look at my code and see if you can provide any corrections or suggestions.
First off, the matrix that was already available in the CS was not in a CB, but rather is was in a structured buffer instead, and it may have only been a projection matrix rather than a VPM as well, so I decided to scrap the idea of using that. Instead I tried using resource copying to copy a CB from a VS that contains the VPM into the CS, and then use your inverse-cs.hlsl on that.
Another mention I'll make is at first when I tried using the inverse-cs stuff, it broke the shader all together (made the lighting disappear), and I ended up tweaking until I got it working, and part of that was to not bother with the resource backup stuff. I'm not sure how crucial that stuff was to it actually working, and assumed it was safe to leave commented out.
Anyway, I've made a zip of the 3 files: d3dx.ini, inverse-cs.hlsl, and the shader itself. Here's some details about the shader:
-the fix attempts all start at line 1113
-I've left all unsuccessful attempts commented out with some description as to what occurred with them
-I'm about 95% certain that this is the correct place to fix (well, either at line 1113 or 1175), because this is the only part where a set of coordinates are multiplied by the depth AND that performing a fix has any impact on the positioning of the lighting. Also, a SpecularRT texture is loaded just shortly prior.
Files: https://www.mediafire.com/?se9f92s7wxnowqn
Thanks in advance for taking a look if/when you're able.
Edit: I just remembered you had a difficult time downloading a file I uploaded to mediafire before. Let me know if it's ok/necessary to send to you via email.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
I'm running the Prepar3D flight sim (an updated FSX product) but it only offer fullscreen windowed mode.
I'm hopeful there is a way to make it work with this program.
Thanks!
i7-7700k. 1080ti GTX. 32 gig RAM. Windows 10. Soundblaster Titanium Creative 7.1 Surround Sound.
Yes, you can force fullscreen. In "d3dx.ini", search the ";full_screen=1" line and uncomment it. If "full_screen=1" doesn't work, try "full_screen=2".
CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: MSI GeForce RTX 2080Ti Gaming X Trio
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com
Unfortunately, this didn't work. :(
i7-7700k. 1080ti GTX. 32 gig RAM. Windows 10. Soundblaster Titanium Creative 7.1 Surround Sound.
If you are looking for a 3D fix, this will depend upon a lot of things that are not clear.
The FSX code included a 2D library that made it impossible to fix with our normal techniques. I'm not sure if Prepar3D still has that poor approach. It was used for effects like light bloom, smoke.
If forcing full_screen did not work, you can try adding the game to the GoogleEarth profile, which sometimes works for borderless games.
Lastly, if you just want to play, you should buy FlyInside instead. He made a version for Prepar3D that works to give you a VR version. For people serious about their flight sim, this is going to give you a better experience than 3D Vision.
(I've used FlyInside for FSX, and it works great, including fixing the 2D lights by some complicated geometry that he developed.)
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'll give the GoogleEarth fix a try.
I'm aware of FlyInside, but I'm not ready to pull the trigger on first-gen VR rigs. Resolution is still too low for my tastes.
I'm hoping Gen 2 will make reading instruments and in-game text doable.
i7-7700k. 1080ti GTX. 32 gig RAM. Windows 10. Soundblaster Titanium Creative 7.1 Surround Sound.
I'm starting to look to fix War Thunder in dx11 mode, at least for tank usage. The first thing I want to fix is the ground shadow : they are not in 3D. But I can not find neither a Pixel shader, nor a Vertex shader, that disabled shadow. I used the 1.2.41 version of 3Dmigoto. I tried to rotate geometry shader and domain shader, but with no success.
What can I tried ?
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 made some testings regarding my fix for DCS and discovered that changing the lines
to
make fps going from 34 to 30 ...
directory shaderfixes is empty, all texture and resource copying also The d3dx.ini is just containing variable definitons and key mapping.
Unfortunately I had to change the values because the register 125 and 120 are used for some effects in the game, but what could be the reason of such impact on fps ? It seems that others values are giving the same fps lost...
Resources copying and texture filtering seems to have nearly no impact of fps...