[quote="masterotaku"]Basically, I could fix water reflections and refraction in Zelda Twilight Princess, but it had to be with the 3D Vision option disabled in Dolphin so I could use the separation and convergence variables in 3Dmigoto (they are 0 otherwise).[/quote]It might be possible to use the arbitrary resource copying feature I added to 3DMigoto to copy these from the geometry shaders where Dolphin adds them to whichever shader you need, but looking at the Dolphin source code I'm not sure if the vertex shader is called for both eyes when using their method - I'm pretty sure it's split into two views in the geometry shader instead.
[quote]I would be fine with that if that big geometry problem didn't happen (see the last screenshot of my post). It's something that depends on the camera position. The Zelda TP screenshots were carefully taken with the right position to not make the bug appear.[/quote]That's very strange - I've never seen anything like that. At a complete guess it might be something to do with the StereoCutoff or StereoCutoffDepthNear profile settings, or another heuristic?
[quote][code]
r2.x = dot(cproj[0].xyzw, r1.xyzw);
r2.x-=separation*(dot(cproj[3].xyzw, r1.xyzw)-convergence); <------ The line I added, after loading the separation and convergence variables at the start of the main method.
r2.y = dot(cproj[1].xyzw, r1.xyzw);
r0.y = dot(cproj[3].xyzw, r1.xyzw);
r0.z = dot(cproj[2].xyzw, r1.xyzw);
[/code][/quote]Can you post the complete vertex shader and geometry shader for that effect?
masterotaku said:Basically, I could fix water reflections and refraction in Zelda Twilight Princess, but it had to be with the 3D Vision option disabled in Dolphin so I could use the separation and convergence variables in 3Dmigoto (they are 0 otherwise).
It might be possible to use the arbitrary resource copying feature I added to 3DMigoto to copy these from the geometry shaders where Dolphin adds them to whichever shader you need, but looking at the Dolphin source code I'm not sure if the vertex shader is called for both eyes when using their method - I'm pretty sure it's split into two views in the geometry shader instead.
I would be fine with that if that big geometry problem didn't happen (see the last screenshot of my post). It's something that depends on the camera position. The Zelda TP screenshots were carefully taken with the right position to not make the bug appear.
That's very strange - I've never seen anything like that. At a complete guess it might be something to do with the StereoCutoff or StereoCutoffDepthNear profile settings, or another heuristic?
r2.x = dot(cproj[0].xyzw, r1.xyzw);
r2.x-=separation*(dot(cproj[3].xyzw, r1.xyzw)-convergence); <------ The line I added, after loading the separation and convergence variables at the start of the main method.
r2.y = dot(cproj[1].xyzw, r1.xyzw);
r0.y = dot(cproj[3].xyzw, r1.xyzw);
r0.z = dot(cproj[2].xyzw, r1.xyzw);
Can you post the complete vertex shader and geometry shader for that effect?
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
I'm not sure that it's simple to catch, but here is the vertex shader that shows the ground and many other elements (which isn't the code I posted before. That was the water reflections vertex shader):
I was actually interested in the water shader - since you already fixed it with 3D Vision Automatic I wanted to take a look and see if it might be possible to make the fix work with Dolphin's 3D instead.
BTW to hunt geometry shaders you will need to enable it in the d3dx.ini (we don't have it enabled by default because a) most games don't need it, b) it's getting harder and harder to pick keys that are still free in most games and c) I never quite got around to adding it to the template ;-). Find where the existing hunting keys are defined and add something like this (set the keys to whatever you prefer):
[code]
previous_geometryshader = <
next_geometryshader = >
mark_geometryshader = .
[/code]
I was actually interested in the water shader - since you already fixed it with 3D Vision Automatic I wanted to take a look and see if it might be possible to make the fix work with Dolphin's 3D instead.
BTW to hunt geometry shaders you will need to enable it in the d3dx.ini (we don't have it enabled by default because a) most games don't need it, b) it's getting harder and harder to pick keys that are still free in most games and c) I never quite got around to adding it to the template ;-). Find where the existing hunting keys are defined and add something like this (set the keys to whatever you prefer):
I must be missing something - from the Dolphin source code it looks like there should be geometry shaders for everything in 3D. Maybe they are only used when Dolphin 3D is enabled?
I must be missing something - from the Dolphin source code it looks like there should be geometry shaders for everything in 3D. Maybe they are only used when Dolphin 3D is enabled?
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
That's very strange - I've never seen anything like that. At a complete guess it might be something to do with the StereoCutoff or StereoCutoffDepthNear profile settings, or another heuristic?
Can you post the complete vertex shader and geometry shader for that effect?
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'm not sure that it's simple to catch, but here is the vertex shader that shows the ground and many other elements (which isn't the code I posted before. That was the water reflections vertex shader):
When skipping this shader, shadows are still wrong when rotating the camera, and there is still one more vertex shader:
CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: Gainward Phoenix 1080 GLH
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com
BTW to hunt geometry shaders you will need to enable it in the d3dx.ini (we don't have it enabled by default because a) most games don't need it, b) it's getting harder and harder to pick keys that are still free in most games and c) I never quite got around to adding it to the template ;-). Find where the existing hunting keys are defined and add something like this (set the keys to whatever you prefer):
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
CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: Gainward Phoenix 1080 GLH
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com
Here's the complete code of the water vertex shader (there are more similar to this one that can be fixed the same way):
CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: Gainward Phoenix 1080 GLH
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com
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