Elite Dangerous Fix
  1 / 32    
I am very please to announce my fix for Elite Dangerous. :) [As soon as I know who I need to email the files too, job's a gooden.] Fixes include correction to star and Nebula maps depth - thanks to Bo3b and DSS for the help! :) I reckon the game works very well in 3D, with lots of near, mid and far distance detail to enjoy. I also think it's one of the most immersive games I have ever played! You need to disable Shadows See here for screenies :) [url]https://forums.geforce.com/default/topic/658572/3d-vision/elite-dangerous-alpha-just-tried-3dvision/post/4685265/#4685265[/url] All the best!
I am very please to announce my fix for Elite Dangerous. :)
[As soon as I know who I need to email the files too, job's a gooden.]

Fixes include correction to star and Nebula maps depth - thanks to Bo3b and DSS for the help! :)

I reckon the game works very well in 3D, with lots of near, mid and far distance detail to enjoy. I also think it's one of the most immersive games I have ever played!

You need to disable Shadows

See here for screenies :)

https://forums.geforce.com/default/topic/658572/3d-vision/elite-dangerous-alpha-just-tried-3dvision/post/4685265/#4685265

All the best!

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.-------------------Vitals: Windows 10 64bit, Ryzen 5 2600x, GTX 1070, 16GB, 3D Vision, CV1
Handy Driver DiscussionHelix Mod - community fixes Bo3b's Shaderhacker School - How to fix 3D in games3dsolutionsgaming.com - videos, reviews and 3D fixes

#1
Posted 10/04/2015 08:35 PM   
Can not wait!
Can not wait!

#2
Posted 10/06/2015 08:12 AM   
Its up! :) On the Helix mod site. Link in my sig
Its up! :)

On the Helix mod site. Link in my sig

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.-------------------Vitals: Windows 10 64bit, Ryzen 5 2600x, GTX 1070, 16GB, 3D Vision, CV1
Handy Driver DiscussionHelix Mod - community fixes Bo3b's Shaderhacker School - How to fix 3D in games3dsolutionsgaming.com - videos, reviews and 3D fixes

#3
Posted 10/06/2015 06:41 PM   
[quote="andysonofbob"]Its up! :) On the Helix mod site. Link in my sig[/quote] Congratulations on your fix man! Just as a FYI, the link to this in your sig is broken ;-) I'll eventually get around to buying this game, glad to hear how immersive it is!
andysonofbob said:Its up! :)
On the Helix mod site. Link in my sig


Congratulations on your fix man!

Just as a FYI, the link to this in your sig is broken ;-)

I'll eventually get around to buying this game, glad to hear how immersive it is!

#4
Posted 10/07/2015 12:48 AM   
[quote="Stryker_66"]I'll eventually get around to buying this game, glad to hear how immersive it is![/quote] Don't get it thru steam if you do, buy it from the frontier store, they are selling the next expansion + base game at the same price as steam has the base game. Thanks for the fix andy!
Stryker_66 said:I'll eventually get around to buying this game, glad to hear how immersive it is!


Don't get it thru steam if you do, buy it from the frontier store, they are selling the next expansion + base game at the same price as steam has the base game.

Thanks for the fix andy!

#5
Posted 10/07/2015 03:55 AM   
Congratulations! I just had one question about your starfield & nebula tweak guide. Normally when we adjust something to infinity we just use x += separation * convergence, because when combined with the nvidia formula and perspective divide the maths simplifies down to: [code] 10-> x' = x + (separation * (depth - convergence) + (separation*convergence)) / depth ((separation*(depth - convergence)) + (separation*convergence)) #11: x' = x + --------------------------------------------------------------- depth 11-> simplify #11: x' = x + separation [/code] Which is "infinity" as far as the 3D Vision driver is concerned. In your case by multiplying separation by some value I'm not entirely sure what the result will be: [code] 11-> x' = x + (separation * (depth - convergence) + (separation * multiplier * convergence)) / depth ((separation*(depth - convergence)) + (separation*multiplier*convergence)) #12: x' = x + -------------------------------------------------------------------------- depth 12-> simplify convergence*(multiplier - 1) #12: x' = x + (separation*(1 + ----------------------------)) depth [/code] So it looks like the adjustment there is still going to depend on convergence and the original starfield depth, and I'm guessing will place them beyond infinity, which doesn't seem right (a few extra pixels will be ok, but it depends on the viewers eye separation. e.g my eyes are 7cm apart and 100% separation in 3D Vision is 6.5cm, so I could go an extra 1/2cm beyond nvidia'a "infinity" before I hit real infinity, after that it will start becoming uncomfortable/impossible to view)... I'm sure you've already tweaked these and it looks ok, but what's the goal with this adjustment? Are you setting them to some fixed depth that is not infinity, a variable depth that is further back than they were originally, or are you purposely trying to exceed infinity? Anyway, if you need to use values like that you can store them in the d3dx.ini under the [Constants] section, and load them in a shader like: [code] float4 params = IniParams.Load(0); [/code] Then params.x will be x from [Constants], params.y will be y, etc. You can also set up key bindings to change these on the fly, or if you are using a newish version of 3DMigoto that supports reload_config you can even edit the d3dx.ini and reload it live, which even works while hunting is disabled.
Congratulations!

I just had one question about your starfield & nebula tweak guide. Normally when we adjust something to infinity we just use x += separation * convergence, because when combined with the nvidia formula and perspective divide the maths simplifies down to:
10-> x' = x + (separation * (depth - convergence) + (separation*convergence)) / depth

((separation*(depth - convergence)) + (separation*convergence))
#11: x' = x + ---------------------------------------------------------------
depth

11-> simplify

#11: x' = x + separation


Which is "infinity" as far as the 3D Vision driver is concerned.

In your case by multiplying separation by some value I'm not entirely sure what the result will be:
11-> x' = x + (separation * (depth - convergence) + (separation * multiplier * convergence)) / depth

((separation*(depth - convergence)) + (separation*multiplier*convergence))
#12: x' = x + --------------------------------------------------------------------------
depth

12-> simplify

convergence*(multiplier - 1)
#12: x' = x + (separation*(1 + ----------------------------))
depth


So it looks like the adjustment there is still going to depend on convergence and the original starfield depth, and I'm guessing will place them beyond infinity, which doesn't seem right (a few extra pixels will be ok, but it depends on the viewers eye separation. e.g my eyes are 7cm apart and 100% separation in 3D Vision is 6.5cm, so I could go an extra 1/2cm beyond nvidia'a "infinity" before I hit real infinity, after that it will start becoming uncomfortable/impossible to view)...

I'm sure you've already tweaked these and it looks ok, but what's the goal with this adjustment? Are you setting them to some fixed depth that is not infinity, a variable depth that is further back than they were originally, or are you purposely trying to exceed infinity?


Anyway, if you need to use values like that you can store them in the d3dx.ini under the [Constants] section, and load them in a shader like:
float4 params = IniParams.Load(0);

Then params.x will be x from [Constants], params.y will be y, etc. You can also set up key bindings to change these on the fly, or if you are using a newish version of 3DMigoto that supports reload_config you can even edit the d3dx.ini and reload it live, which even works while hunting is disabled.

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

#6
Posted 10/07/2015 06:18 AM   
Mate! Thanks! I am a bit of a numpty so is the above something I could just copy into the shaders and tweak the numbers? And do the same with the d3dx.ini? If not, would it be possible to upload an example of a shader and d3dx.ini to compare please? People are struggling with tweaking the starmap and nebula textures because of different convergences etc. It is fiddly. Would doing the above make it so they would always be at the same relative depth once set?
Mate! Thanks!
I am a bit of a numpty so is the above something I could just copy into the shaders and tweak the numbers? And do the same with the d3dx.ini?

If not, would it be possible to upload an example of a shader and d3dx.ini to compare please?

People are struggling with tweaking the starmap and nebula textures because of different convergences etc. It is fiddly.

Would doing the above make it so they would always be at the same relative depth once set?

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.-------------------Vitals: Windows 10 64bit, Ryzen 5 2600x, GTX 1070, 16GB, 3D Vision, CV1
Handy Driver DiscussionHelix Mod - community fixes Bo3b's Shaderhacker School - How to fix 3D in games3dsolutionsgaming.com - videos, reviews and 3D fixes

#7
Posted 10/07/2015 10:41 AM   
Unless I'm missing something, you shouldn't need to tweak the starfield or nebula. Is there an interaction or conflict? Both should simply be at infinity. Which would be the simple version of before with "o0.x += separation * convergence" That makes it not move with convergence or FOV or anything else. Does this not work properly? If not can you give us examples of failures? That will make it more clear what the optimal fix would be.
Unless I'm missing something, you shouldn't need to tweak the starfield or nebula. Is there an interaction or conflict? Both should simply be at infinity.

Which would be the simple version of before with "o0.x += separation * convergence"

That makes it not move with convergence or FOV or anything else. Does this not work properly? If not can you give us examples of failures? That will make it more clear what the optimal fix would be.

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

#8
Posted 10/07/2015 11:19 AM   
Really grateful for the help! Adjusting convergence throws the starfield and nebula shaders out of sync. I think people are finding the starfield out of sync with the neb and struggling to align them. Sadly the newer version of 3Dmigoto crashes for me with this game. :( I would love it if there was a way to simply push the shader back to infinity as far as 3D Vision was concerned! I had a go at the above code but it didn't work :( I get a dull beep. I tried 1.x = x + separation too. Soz for being a moron! [code]//Nebula 2D cbuffer cb0 : register(b0) { float4 cb0[4]; } Texture2D<float4> StereoParams : register(t125); Texture1D<float4> IniParams : register(t120); void main( float4 v0 : POSITION0, float4 v1 : TEXCOORD0, out float3 o0 : TEXCOORD0, out float4 o1 : SV_Position0) { float4 r0; uint4 bitmask, uiDest; float4 fDest; r0.xyzw = cb0[1].xyzw * v0.yyyy; r0.xyzw = v0.xxxx * cb0[0].xyzw + r0.xyzw; r0.xyzw = v0.zzzz * cb0[2].xyzw + r0.xyzw; r0.xyzw = v0.wwww * cb0[3].xyzw + r0.xyzw; o0.xyz = r0.xyz / r0.www; o1.xyzw = v0.xyww; // Move nebula to infinity. float4 st = StereoParams.Load(0); //float separation = st.x * 3.3; float convergence = st.y; //o1.x += separation * convergence; float separation = st.x; float convergence = st.y; o1.x' = x + separation return; } [/code]
Really grateful for the help!

Adjusting convergence throws the starfield and nebula shaders out of sync. I think people are finding the starfield out of sync with the neb and struggling to align them.

Sadly the newer version of 3Dmigoto crashes for me with this game. :(

I would love it if there was a way to simply push the shader back to infinity as far as 3D Vision was concerned!

I had a go at the above code but it didn't work :( I get a dull beep. I tried 1.x = x + separation too. Soz for being a moron!

//Nebula 2D

cbuffer cb0 : register(b0)
{
float4 cb0[4];
}


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
float4 v0 : POSITION0,
float4 v1 : TEXCOORD0,
out float3 o0 : TEXCOORD0,
out float4 o1 : SV_Position0)
{
float4 r0;
uint4 bitmask, uiDest;
float4 fDest;

r0.xyzw = cb0[1].xyzw * v0.yyyy;
r0.xyzw = v0.xxxx * cb0[0].xyzw + r0.xyzw;
r0.xyzw = v0.zzzz * cb0[2].xyzw + r0.xyzw;
r0.xyzw = v0.wwww * cb0[3].xyzw + r0.xyzw;
o0.xyz = r0.xyz / r0.www;
o1.xyzw = v0.xyww;


// Move nebula to infinity.
float4 st = StereoParams.Load(0);

//float separation = st.x * 3.3; float convergence = st.y;
//o1.x += separation * convergence;


float separation = st.x; float convergence = st.y;
o1.x' = x + separation




return;
}

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.-------------------Vitals: Windows 10 64bit, Ryzen 5 2600x, GTX 1070, 16GB, 3D Vision, CV1
Handy Driver DiscussionHelix Mod - community fixes Bo3b's Shaderhacker School - How to fix 3D in games3dsolutionsgaming.com - videos, reviews and 3D fixes

#9
Posted 10/07/2015 02:56 PM   
[quote="andysonofbob"][code] // Move nebula to infinity. float4 st = StereoParams.Load(0); //float separation = st.x * 3.3; float convergence = st.y; //o1.x += separation * convergence; [/code][/quote]I would expect this one to have worked if you remove the multiply by 3.3, unless there is something weird going on. What is the result you get here? [quote][code] float separation = st.x; float convergence = st.y; o1.x' = x + separation [/code][/quote]Ahh, I can see the maths I posted must have confused you a bit there - sorry :( The x' ("x prime") is a maths term, and we would never use it in programming. See, in programming we say "x = x + 1" to mean "add one to the variable x", however mathematicians would interpret that to mean "x is equal to x plus one", which is of course a contradiction if x is a real number. When a mathematician wants to say that something should be changed they instead invent a new name, typically "x prime" (denoted as x'), so they would say "x' = x + 1", or "x prime is equal to x plus 1" - therefore the old and the new states are two different things as far as a mathematician is concerned, but the same thing as far as a programmer or computer is concerned. The other thing to realise is that the output position will already be altered by the driver and DirectX, to apply the nvidia stereo correction formula and the perspective divide by w. So, without you doing anything this code will already have been invisibly inserted at the end of the shader and will be applied after any adjustment you make: [code] x = (x + separation * (w - convergence)) / w; [/code] Which will move the x coordinate by some number of pixels. Your goal however is to move it by separation pixels to place it at infinity: [code] x = x + separation; [/code] And since DirectX will divide any adjustment you make by W (to convert a four dimensional homogeneous coordiante into a three dimensional cartesian one), you will need to multiply that by w to counter it: [code] x = x + separation * w; [/code] And since the driver is going to apply the nvidia stereo correction, you need to subtract that to counter it: [code] x = x + separation * w - separation * (w - convergence); [/code] At that point you can now do your high school algebra to simplify the equation: [code] x = x + separation * w - separation * w - separation * convergence; x = x + separation * convergence; [/code] Which is how we arrive at x += separation * convergence; to move something to infinity. I hope that's a bit clearer - all you really need to know is that last line, but if that isn't working there might be something else going on in that game that we will need to work out.
andysonofbob said:
// Move nebula to infinity.
float4 st = StereoParams.Load(0);

//float separation = st.x * 3.3; float convergence = st.y;
//o1.x += separation * convergence;
I would expect this one to have worked if you remove the multiply by 3.3, unless there is something weird going on. What is the result you get here?


float separation = st.x; float convergence = st.y;
o1.x' = x + separation
Ahh, I can see the maths I posted must have confused you a bit there - sorry :(

The x' ("x prime") is a maths term, and we would never use it in programming. See, in programming we say "x = x + 1" to mean "add one to the variable x", however mathematicians would interpret that to mean "x is equal to x plus one", which is of course a contradiction if x is a real number. When a mathematician wants to say that something should be changed they instead invent a new name, typically "x prime" (denoted as x'), so they would say "x' = x + 1", or "x prime is equal to x plus 1" - therefore the old and the new states are two different things as far as a mathematician is concerned, but the same thing as far as a programmer or computer is concerned.

The other thing to realise is that the output position will already be altered by the driver and DirectX, to apply the nvidia stereo correction formula and the perspective divide by w. So, without you doing anything this code will already have been invisibly inserted at the end of the shader and will be applied after any adjustment you make:

x = (x + separation * (w - convergence)) / w;

Which will move the x coordinate by some number of pixels. Your goal however is to move it by separation pixels to place it at infinity:

x = x + separation;

And since DirectX will divide any adjustment you make by W (to convert a four dimensional homogeneous coordiante into a three dimensional cartesian one), you will need to multiply that by w to counter it:

x = x + separation * w;

And since the driver is going to apply the nvidia stereo correction, you need to subtract that to counter it:

x = x + separation * w - separation * (w - convergence);

At that point you can now do your high school algebra to simplify the equation:

x = x + separation * w - separation * w - separation * convergence;
x = x + separation * convergence;

Which is how we arrive at x += separation * convergence; to move something to infinity.


I hope that's a bit clearer - all you really need to know is that last line, but if that isn't working there might be something else going on in that game that we will need to work out.

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

#10
Posted 10/07/2015 05:26 PM   
Hi Thanks for that. I think I got it. Don't quiz me! This worked but is too shallow. Here is the code for your perusal. [code]//Nebula 2D cbuffer cb0 : register(b0) { float4 cb0[4]; } Texture2D<float4> StereoParams : register(t125); Texture1D<float4> IniParams : register(t120); void main( float4 v0 : POSITION0, float4 v1 : TEXCOORD0, out float3 o0 : TEXCOORD0, out float4 o1 : SV_Position0) { float4 r0; uint4 bitmask, uiDest; float4 fDest; r0.xyzw = cb0[1].xyzw * v0.yyyy; r0.xyzw = v0.xxxx * cb0[0].xyzw + r0.xyzw; r0.xyzw = v0.zzzz * cb0[2].xyzw + r0.xyzw; r0.xyzw = v0.wwww * cb0[3].xyzw + r0.xyzw; o0.xyz = r0.xyz / r0.www; o1.xyzw = v0.xyww; // Move nebula to infinity. float4 st = StereoParams.Load(0); float separation = st.x; float convergence = st.y; o1.x += separation; // * convergence return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) D3D Shader Disassembler // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // TEXCOORD 0 xyzw 1 NONE float // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // TEXCOORD 0 xyz 0 NONE float xyz // SV_Position 0 xyzw 1 POS float xyzw // vs_4_0 dcl_constantbuffer cb0[4], immediateIndexed dcl_input v0.xyzw dcl_output o0.xyz dcl_output_siv o1.xyzw, position dcl_temps 1 mul r0.xyzw, v0.yyyy, cb0[1].xyzw mad r0.xyzw, v0.xxxx, cb0[0].xyzw, r0.xyzw mad r0.xyzw, v0.zzzz, cb0[2].xyzw, r0.xyzw mad r0.xyzw, v0.wwww, cb0[3].xyzw, r0.xyzw div o0.xyz, r0.xyzx, r0.wwww mov o1.xyzw, v0.xyww ret // Approximately 0 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] I also applied it to the starfield and this now looks great! [code]//StarField - wrong depth too shallow cbuffer cb0 : register(b0) { float4 cb0[15]; } cbuffer cb1 : register(b1) { float4 cb1[2]; } Texture2D<float4> StereoParams : register(t125); Texture1D<float4> IniParams : register(t120); void main( float4 v0 : POSITION0, float4 v1 : POSITION1, float4 v2 : TEXCOORD0, float4 v3 : TEXCOORD1, float4 v4 : TEXCOORD2, float4 v5 : TEXCOORD3, out float4 o0 : TEXCOORD0, out float4 o1 : TEXCOORD1, out float3 o2 : TEXCOORD2, out float3 o3 : TEXCOORD3, out float3 o4 : TEXCOORD4, out float2 o5 : TEXCOORD5, out float4 o6 : SV_Position0) { float4 r0,r1,r2,r3; uint4 bitmask, uiDest; float4 fDest; r0.x = 1.000000000e+000 + -cb0[9].w; r0.x = cb0[10].w * r0.x; r0.y = -1.000000000e+000 + cb0[9].w; r0.xy = cb0[10].zx * r0.xy; r0.z = cb0[9].w >= 1.000000000e+000; r0.x = r0.z ? -r0.y : r0.x; r0.x = v0.w + r0.x; r0.y = -cb0[10].w + r0.x; r0.z = cb0[10].y + -cb0[10].w; r0.y = saturate(r0.y / r0.z); r0.y = log2(r0.y); r0.y = cb0[13].z * r0.y; r0.y = exp2(r0.y); r0.y = min(r0.y, 1.000000000e+000); o0.w = r0.y; o0.xyz = v1.xyz; o1.xyzw = v5.xyzw; r0.z = r0.x >= cb0[10].w; r0.x = -cb0[14].x + r0.x; r0.z = r0.z ? 1.000000 : 0; r1.xyz = float3(1.000000e+001,1.000000e+001,1.000000e+001) * cb0[6].xyz; r2.xyz = v0.xyz * cb1[0].xyz + cb1[1].xyz; r0.w = dot(r2.xyz, r2.xyz); r0.w = rsqrt(r0.w); r2.xyz = r2.xyz * r0.www; r3.x = dot(cb0[7].xyz, r2.xyz); r3.y = dot(cb0[8].xyz, r2.xyz); r3.z = dot(cb0[9].xyz, r2.xyz); r1.xyz = -r3.xyz * float3(1.000000e+001,1.000000e+001,1.000000e+001) + -r1.xyz; r2.xyz = float3(1.000000e+001,1.000000e+001,1.000000e+001) * r3.xyz; r1.xyz = r0.zzz * r1.xyz + r2.xyz; r2.xyz = -cb0[6].xyz * float3(1.000000e+001,1.000000e+001,1.000000e+001) + -r1.xyz; r0.z = v4.x >= 9.999999776e-003; r0.z = r0.z ? 1.000000 : 0; r1.xyz = r0.zzz * r2.xyz + r1.xyz; o2.xyz = r1.xyz; r0.z = -cb0[14].x + cb0[10].y; r0.z = 1.000000e+000 / r0.z; r0.x = saturate(r0.x * r0.z); r0.z = r0.x * -2.000000000e+000 + 3.000000000e+000; r0.x = r0.x * r0.x; r0.x = -r0.z * r0.x + 1.000000000e+000; r0.x = log2(r0.x); r0.x = cb0[14].y * r0.x; r0.x = exp2(r0.x); r0.z = saturate(-cb0[13].x + r0.x); r0.w = 1.000000000e+000 + -cb0[13].x; r0.w = 1.000000e+000 / r0.w; r0.z = r0.z * r0.w; r2.y = cb0[13].y * r0.z; r0.zw = saturate(-cb0[11].yw + r0.xx); r3.xy = float2(1.000000e+000,1.000000e+000) + -cb0[11].yw; r3.xy = float2(1.000000e+000,1.000000e+000) / r3.xy; r0.zw = r3.xy * r0.zw; r2.x = cb0[11].z * r0.z; r2.z = cb0[12].x * r0.w; o3.xyz = cb0[11].xxx * r2.xyz; r0.zw = cb0[12].wy + -cb0[12].yz; r0.y = r0.y * r0.w + cb0[12].z; r0.z = saturate(r0.z); r0.x = r0.x * r0.z + r0.y; r0.x = log2(r0.x); r0.x = cb0[13].w * r0.x; r0.x = exp2(r0.x); r0.y = 1.000000000e+000 + v5.x; r0.x = r0.x * r0.y; r0.xy = v2.zw * r0.xx; r0.xzw = cb0[4].xyz * r0.xxx + r1.xyz; r0.xyz = cb0[5].xyz * r0.yyy + r0.xzw; o4.xyz = r0.xyz; o5.xy = v2.xy; r1.xyzw = cb0[1].xyzw * r0.yyyy; r1.xyzw = r0.xxxx * cb0[0].xyzw + r1.xyzw; r0.xyzw = r0.zzzz * cb0[2].xyzw + r1.xyzw; o6.xyzw = cb0[3].xyzw + r0.xyzw; // Move StarField to infinity. float4 st = StereoParams.Load(0); float separation = st.x; float convergence = st.y; o6.x += separation; //*8 return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) D3D Shader Disassembler // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // POSITION 1 xyzw 1 NONE float xyz // TEXCOORD 0 xyzw 2 NONE float xyzw // TEXCOORD 1 xyzw 3 NONE float // TEXCOORD 2 xyzw 4 NONE float x // TEXCOORD 3 xyzw 5 NONE float xyzw // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // TEXCOORD 0 xyzw 0 NONE float xyzw // TEXCOORD 1 xyzw 1 NONE float xyzw // TEXCOORD 2 xyz 2 NONE float xyz // TEXCOORD 3 xyz 3 NONE float xyz // TEXCOORD 4 xyz 4 NONE float xyz // TEXCOORD 5 xy 5 NONE float xy // SV_Position 0 xyzw 6 POS float xyzw // vs_4_0 dcl_constantbuffer cb1[2], immediateIndexed dcl_constantbuffer cb0[15], immediateIndexed dcl_input v0.xyzw dcl_input v1.xyz dcl_input v2.xyzw dcl_input v4.x dcl_input v5.xyzw dcl_output o0.xyzw dcl_output o1.xyzw dcl_output o2.xyz dcl_output o3.xyz dcl_output o4.xyz dcl_output o5.xy dcl_output_siv o6.xyzw, position dcl_temps 4 add r0.x, -cb0[9].w, l(1.000000) mul r0.x, r0.x, cb0[10].w add r0.y, cb0[9].w, l(-1.000000) mul r0.xy, r0.xyxx, cb0[10].zxzz ge r0.z, cb0[9].w, l(1.000000) movc r0.x, r0.z, -r0.y, r0.x add r0.x, r0.x, v0.w add r0.y, r0.x, -cb0[10].w add r0.z, -cb0[10].w, cb0[10].y div_sat r0.y, r0.y, r0.z log r0.y, r0.y mul r0.y, r0.y, cb0[13].z exp r0.y, r0.y min r0.y, r0.y, l(1.000000) mov o0.w, r0.y mov o0.xyz, v1.xyzx mov o1.xyzw, v5.xyzw ge r0.z, r0.x, cb0[10].w add r0.x, r0.x, -cb0[14].x and r0.z, r0.z, l(0x3f800000) mul r1.xyz, cb0[6].xyzx, l(10.000000, 10.000000, 10.000000, 0.000000) mad r2.xyz, v0.xyzx, cb1[0].xyzx, cb1[1].xyzx dp3 r0.w, r2.xyzx, r2.xyzx rsq r0.w, r0.w mul r2.xyz, r0.wwww, r2.xyzx dp3 r3.x, cb0[7].xyzx, r2.xyzx dp3 r3.y, cb0[8].xyzx, r2.xyzx dp3 r3.z, cb0[9].xyzx, r2.xyzx mad r1.xyz, -r3.xyzx, l(10.000000, 10.000000, 10.000000, 0.000000), -r1.xyzx mul r2.xyz, r3.xyzx, l(10.000000, 10.000000, 10.000000, 0.000000) mad r1.xyz, r0.zzzz, r1.xyzx, r2.xyzx mad r2.xyz, -cb0[6].xyzx, l(10.000000, 10.000000, 10.000000, 0.000000), -r1.xyzx ge r0.z, v4.x, l(0.010000) and r0.z, r0.z, l(0x3f800000) mad r1.xyz, r0.zzzz, r2.xyzx, r1.xyzx mov o2.xyz, r1.xyzx add r0.z, cb0[10].y, -cb0[14].x div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z mul_sat r0.x, r0.z, r0.x mad r0.z, r0.x, l(-2.000000), l(3.000000) mul r0.x, r0.x, r0.x mad r0.x, -r0.z, r0.x, l(1.000000) log r0.x, r0.x mul r0.x, r0.x, cb0[14].y exp r0.x, r0.x add_sat r0.z, r0.x, -cb0[13].x add r0.w, -cb0[13].x, l(1.000000) div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w mul r0.z, r0.w, r0.z mul r2.y, r0.z, cb0[13].y add_sat r0.zw, r0.xxxx, -cb0[11].yyyw add r3.xy, -cb0[11].ywyy, l(1.000000, 1.000000, 0.000000, 0.000000) div r3.xy, l(1.000000, 1.000000, 1.000000, 1.000000), r3.xyxx mul r0.zw, r0.zzzw, r3.xxxy mul r2.x, r0.z, cb0[11].z mul r2.z, r0.w, cb0[12].x mul o3.xyz, r2.xyzx, cb0[11].xxxx add r0.zw, -cb0[12].yyyz, cb0[12].wwwy mad r0.y, r0.y, r0.w, cb0[12].z mov_sat r0.z, r0.z mad r0.x, r0.x, r0.z, r0.y log r0.x, r0.x mul r0.x, r0.x, cb0[13].w exp r0.x, r0.x add r0.y, v5.x, l(1.000000) mul r0.x, r0.y, r0.x mul r0.xy, r0.xxxx, v2.zwzz mad r0.xzw, cb0[4].xxyz, r0.xxxx, r1.xxyz mad r0.xyz, cb0[5].xyzx, r0.yyyy, r0.xzwx mov o4.xyz, r0.xyzx mov o5.xy, v2.xyxx mul r1.xyzw, r0.yyyy, cb0[1].xyzw mad r1.xyzw, r0.xxxx, cb0[0].xyzw, r1.xyzw mad r0.xyzw, r0.zzzz, cb0[2].xyzw, r1.xyzw add o6.xyzw, r0.xyzw, cb0[3].xyzw ret // Approximately 0 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/[/code] Some thing is going on with the nebula. At least this make it easier for others to fix! Can I give you my updated shaders at some point please? edit This does now look better now for some reason. Consistent depth all around. Before it look like a bit of a V shape... So for the starfield [code]// Move StarField to infinity. float4 st = StereoParams.Load(0); float separation = st.x; float convergence = st.y; o6.x += separation; return; } [/code] I have had to do this for the neb though: [code]// Move nebula to infinity. float4 st = StereoParams.Load(0); float separation = st.x; float convergence = st.y; o1.x += separation * 1.065; return; }[/code] But it looks great! Can I give you my updated shaders at some point please?
Hi

Thanks for that. I think I got it. Don't quiz me!


This worked but is too shallow. Here is the code for your perusal.

//Nebula 2D

cbuffer cb0 : register(b0)
{
float4 cb0[4];
}


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
float4 v0 : POSITION0,
float4 v1 : TEXCOORD0,
out float3 o0 : TEXCOORD0,
out float4 o1 : SV_Position0)
{
float4 r0;
uint4 bitmask, uiDest;
float4 fDest;

r0.xyzw = cb0[1].xyzw * v0.yyyy;
r0.xyzw = v0.xxxx * cb0[0].xyzw + r0.xyzw;
r0.xyzw = v0.zzzz * cb0[2].xyzw + r0.xyzw;
r0.xyzw = v0.wwww * cb0[3].xyzw + r0.xyzw;
o0.xyz = r0.xyz / r0.www;
o1.xyzw = v0.xyww;


// Move nebula to infinity.
float4 st = StereoParams.Load(0);

float separation = st.x; float convergence = st.y;
o1.x += separation;
// * convergence
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
// TEXCOORD 0 xyzw 1 NONE float
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD 0 xyz 0 NONE float xyz
// SV_Position 0 xyzw 1 POS float xyzw
//
vs_4_0
dcl_constantbuffer cb0[4], immediateIndexed
dcl_input v0.xyzw
dcl_output o0.xyz
dcl_output_siv o1.xyzw, position
dcl_temps 1
mul r0.xyzw, v0.yyyy, cb0[1].xyzw
mad r0.xyzw, v0.xxxx, cb0[0].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[2].xyzw, r0.xyzw
mad r0.xyzw, v0.wwww, cb0[3].xyzw, r0.xyzw
div o0.xyz, r0.xyzx, r0.wwww
mov o1.xyzw, v0.xyww
ret
// Approximately 0 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/




I also applied it to the starfield and this now looks great!

//StarField - wrong depth too shallow

cbuffer cb0 : register(b0)
{
float4 cb0[15];
}

cbuffer cb1 : register(b1)
{
float4 cb1[2];
}


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
float4 v0 : POSITION0,
float4 v1 : POSITION1,
float4 v2 : TEXCOORD0,
float4 v3 : TEXCOORD1,
float4 v4 : TEXCOORD2,
float4 v5 : TEXCOORD3,
out float4 o0 : TEXCOORD0,
out float4 o1 : TEXCOORD1,
out float3 o2 : TEXCOORD2,
out float3 o3 : TEXCOORD3,
out float3 o4 : TEXCOORD4,
out float2 o5 : TEXCOORD5,
out float4 o6 : SV_Position0)
{
float4 r0,r1,r2,r3;
uint4 bitmask, uiDest;
float4 fDest;

r0.x = 1.000000000e+000 + -cb0[9].w;
r0.x = cb0[10].w * r0.x;
r0.y = -1.000000000e+000 + cb0[9].w;
r0.xy = cb0[10].zx * r0.xy;
r0.z = cb0[9].w >= 1.000000000e+000;
r0.x = r0.z ? -r0.y : r0.x;
r0.x = v0.w + r0.x;
r0.y = -cb0[10].w + r0.x;
r0.z = cb0[10].y + -cb0[10].w;
r0.y = saturate(r0.y / r0.z);
r0.y = log2(r0.y);
r0.y = cb0[13].z * r0.y;
r0.y = exp2(r0.y);
r0.y = min(r0.y, 1.000000000e+000);
o0.w = r0.y;
o0.xyz = v1.xyz;
o1.xyzw = v5.xyzw;
r0.z = r0.x >= cb0[10].w;
r0.x = -cb0[14].x + r0.x;
r0.z = r0.z ? 1.000000 : 0;
r1.xyz = float3(1.000000e+001,1.000000e+001,1.000000e+001) * cb0[6].xyz;
r2.xyz = v0.xyz * cb1[0].xyz + cb1[1].xyz;
r0.w = dot(r2.xyz, r2.xyz);
r0.w = rsqrt(r0.w);
r2.xyz = r2.xyz * r0.www;
r3.x = dot(cb0[7].xyz, r2.xyz);
r3.y = dot(cb0[8].xyz, r2.xyz);
r3.z = dot(cb0[9].xyz, r2.xyz);
r1.xyz = -r3.xyz * float3(1.000000e+001,1.000000e+001,1.000000e+001) + -r1.xyz;
r2.xyz = float3(1.000000e+001,1.000000e+001,1.000000e+001) * r3.xyz;
r1.xyz = r0.zzz * r1.xyz + r2.xyz;
r2.xyz = -cb0[6].xyz * float3(1.000000e+001,1.000000e+001,1.000000e+001) + -r1.xyz;
r0.z = v4.x >= 9.999999776e-003;
r0.z = r0.z ? 1.000000 : 0;
r1.xyz = r0.zzz * r2.xyz + r1.xyz;
o2.xyz = r1.xyz;
r0.z = -cb0[14].x + cb0[10].y;
r0.z = 1.000000e+000 / r0.z;
r0.x = saturate(r0.x * r0.z);
r0.z = r0.x * -2.000000000e+000 + 3.000000000e+000;
r0.x = r0.x * r0.x;
r0.x = -r0.z * r0.x + 1.000000000e+000;
r0.x = log2(r0.x);
r0.x = cb0[14].y * r0.x;
r0.x = exp2(r0.x);
r0.z = saturate(-cb0[13].x + r0.x);
r0.w = 1.000000000e+000 + -cb0[13].x;
r0.w = 1.000000e+000 / r0.w;
r0.z = r0.z * r0.w;
r2.y = cb0[13].y * r0.z;
r0.zw = saturate(-cb0[11].yw + r0.xx);
r3.xy = float2(1.000000e+000,1.000000e+000) + -cb0[11].yw;
r3.xy = float2(1.000000e+000,1.000000e+000) / r3.xy;
r0.zw = r3.xy * r0.zw;
r2.x = cb0[11].z * r0.z;
r2.z = cb0[12].x * r0.w;
o3.xyz = cb0[11].xxx * r2.xyz;
r0.zw = cb0[12].wy + -cb0[12].yz;
r0.y = r0.y * r0.w + cb0[12].z;
r0.z = saturate(r0.z);
r0.x = r0.x * r0.z + r0.y;
r0.x = log2(r0.x);
r0.x = cb0[13].w * r0.x;
r0.x = exp2(r0.x);
r0.y = 1.000000000e+000 + v5.x;
r0.x = r0.x * r0.y;
r0.xy = v2.zw * r0.xx;
r0.xzw = cb0[4].xyz * r0.xxx + r1.xyz;
r0.xyz = cb0[5].xyz * r0.yyy + r0.xzw;
o4.xyz = r0.xyz;
o5.xy = v2.xy;
r1.xyzw = cb0[1].xyzw * r0.yyyy;
r1.xyzw = r0.xxxx * cb0[0].xyzw + r1.xyzw;
r0.xyzw = r0.zzzz * cb0[2].xyzw + r1.xyzw;
o6.xyzw = cb0[3].xyzw + r0.xyzw;



// Move StarField to infinity.
float4 st = StereoParams.Load(0);

float separation = st.x; float convergence = st.y;
o6.x += separation;
//*8
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
// POSITION 1 xyzw 1 NONE float xyz
// TEXCOORD 0 xyzw 2 NONE float xyzw
// TEXCOORD 1 xyzw 3 NONE float
// TEXCOORD 2 xyzw 4 NONE float x
// TEXCOORD 3 xyzw 5 NONE float xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD 0 xyzw 0 NONE float xyzw
// TEXCOORD 1 xyzw 1 NONE float xyzw
// TEXCOORD 2 xyz 2 NONE float xyz
// TEXCOORD 3 xyz 3 NONE float xyz
// TEXCOORD 4 xyz 4 NONE float xyz
// TEXCOORD 5 xy 5 NONE float xy
// SV_Position 0 xyzw 6 POS float xyzw
//
vs_4_0
dcl_constantbuffer cb1[2], immediateIndexed
dcl_constantbuffer cb0[15], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xyzw
dcl_input v4.x
dcl_input v5.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyz
dcl_output o3.xyz
dcl_output o4.xyz
dcl_output o5.xy
dcl_output_siv o6.xyzw, position
dcl_temps 4
add r0.x, -cb0[9].w, l(1.000000)
mul r0.x, r0.x, cb0[10].w
add r0.y, cb0[9].w, l(-1.000000)
mul r0.xy, r0.xyxx, cb0[10].zxzz
ge r0.z, cb0[9].w, l(1.000000)
movc r0.x, r0.z, -r0.y, r0.x
add r0.x, r0.x, v0.w
add r0.y, r0.x, -cb0[10].w
add r0.z, -cb0[10].w, cb0[10].y
div_sat r0.y, r0.y, r0.z
log r0.y, r0.y
mul r0.y, r0.y, cb0[13].z
exp r0.y, r0.y
min r0.y, r0.y, l(1.000000)
mov o0.w, r0.y
mov o0.xyz, v1.xyzx
mov o1.xyzw, v5.xyzw
ge r0.z, r0.x, cb0[10].w
add r0.x, r0.x, -cb0[14].x
and r0.z, r0.z, l(0x3f800000)
mul r1.xyz, cb0[6].xyzx, l(10.000000, 10.000000, 10.000000, 0.000000)
mad r2.xyz, v0.xyzx, cb1[0].xyzx, cb1[1].xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
dp3 r3.x, cb0[7].xyzx, r2.xyzx
dp3 r3.y, cb0[8].xyzx, r2.xyzx
dp3 r3.z, cb0[9].xyzx, r2.xyzx
mad r1.xyz, -r3.xyzx, l(10.000000, 10.000000, 10.000000, 0.000000), -r1.xyzx
mul r2.xyz, r3.xyzx, l(10.000000, 10.000000, 10.000000, 0.000000)
mad r1.xyz, r0.zzzz, r1.xyzx, r2.xyzx
mad r2.xyz, -cb0[6].xyzx, l(10.000000, 10.000000, 10.000000, 0.000000), -r1.xyzx
ge r0.z, v4.x, l(0.010000)
and r0.z, r0.z, l(0x3f800000)
mad r1.xyz, r0.zzzz, r2.xyzx, r1.xyzx
mov o2.xyz, r1.xyzx
add r0.z, cb0[10].y, -cb0[14].x
div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
mul_sat r0.x, r0.z, r0.x
mad r0.z, r0.x, l(-2.000000), l(3.000000)
mul r0.x, r0.x, r0.x
mad r0.x, -r0.z, r0.x, l(1.000000)
log r0.x, r0.x
mul r0.x, r0.x, cb0[14].y
exp r0.x, r0.x
add_sat r0.z, r0.x, -cb0[13].x
add r0.w, -cb0[13].x, l(1.000000)
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
mul r0.z, r0.w, r0.z
mul r2.y, r0.z, cb0[13].y
add_sat r0.zw, r0.xxxx, -cb0[11].yyyw
add r3.xy, -cb0[11].ywyy, l(1.000000, 1.000000, 0.000000, 0.000000)
div r3.xy, l(1.000000, 1.000000, 1.000000, 1.000000), r3.xyxx
mul r0.zw, r0.zzzw, r3.xxxy
mul r2.x, r0.z, cb0[11].z
mul r2.z, r0.w, cb0[12].x
mul o3.xyz, r2.xyzx, cb0[11].xxxx
add r0.zw, -cb0[12].yyyz, cb0[12].wwwy
mad r0.y, r0.y, r0.w, cb0[12].z
mov_sat r0.z, r0.z
mad r0.x, r0.x, r0.z, r0.y
log r0.x, r0.x
mul r0.x, r0.x, cb0[13].w
exp r0.x, r0.x
add r0.y, v5.x, l(1.000000)
mul r0.x, r0.y, r0.x
mul r0.xy, r0.xxxx, v2.zwzz
mad r0.xzw, cb0[4].xxyz, r0.xxxx, r1.xxyz
mad r0.xyz, cb0[5].xyzx, r0.yyyy, r0.xzwx
mov o4.xyz, r0.xyzx
mov o5.xy, v2.xyxx
mul r1.xyzw, r0.yyyy, cb0[1].xyzw
mad r1.xyzw, r0.xxxx, cb0[0].xyzw, r1.xyzw
mad r0.xyzw, r0.zzzz, cb0[2].xyzw, r1.xyzw
add o6.xyzw, r0.xyzw, cb0[3].xyzw
ret
// Approximately 0 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


Some thing is going on with the nebula. At least this make it easier for others to fix!

Can I give you my updated shaders at some point please?


edit
This does now look better now for some reason. Consistent depth all around. Before it look like a bit of a V shape...
So for the starfield

// Move StarField to infinity.
float4 st = StereoParams.Load(0);
float separation = st.x; float convergence = st.y;
o6.x += separation;
return;
}


I have had to do this for the neb though:

// Move nebula to infinity.
float4 st = StereoParams.Load(0);
float separation = st.x; float convergence = st.y;
o1.x += separation * 1.065;

return;
}


But it looks great!
Can I give you my updated shaders at some point please?

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.-------------------Vitals: Windows 10 64bit, Ryzen 5 2600x, GTX 1070, 16GB, 3D Vision, CV1
Handy Driver DiscussionHelix Mod - community fixes Bo3b's Shaderhacker School - How to fix 3D in games3dsolutionsgaming.com - videos, reviews and 3D fixes

#11
Posted 10/07/2015 06:42 PM   
[quote]This worked but is too shallow. Here is the code for your perusal.[/quote]It looks like you still aren't multiplying it by convergence which might be why it's too shallow. I would expect the following code to work unless something strange is going on - what result do you get from the following: [code]// Move nebula to infinity. float4 st = StereoParams.Load(0); float separation = st.x; float convergence = st.y; o1.x += separation * convergence; return; }[/code] and for the starfield: [code]// Move StarField to infinity. float4 st = StereoParams.Load(0); float separation = st.x; float convergence = st.y; o6.x += separation * convergence; return; } [/code] [quote]Can I give you my updated shaders at some point please?[/quote]Sure :)
This worked but is too shallow. Here is the code for your perusal.
It looks like you still aren't multiplying it by convergence which might be why it's too shallow. I would expect the following code to work unless something strange is going on - what result do you get from the following:

// Move nebula to infinity.
float4 st = StereoParams.Load(0);
float separation = st.x; float convergence = st.y;
o1.x += separation * convergence;

return;
}

and for the starfield:

// Move StarField to infinity.
float4 st = StereoParams.Load(0);
float separation = st.x; float convergence = st.y;
o6.x += separation * convergence;
return;
}


Can I give you my updated shaders at some point please?
Sure :)

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

#12
Posted 10/08/2015 01:23 AM   
Cheers mate. and soz, I must be doing your head in. You're very patient! :D That code was the very first one I tried a while back which prompted me to experiment with adding the multipliers. The Neb is now 3D but too shallow. +ve convergence moves it deeper and vice-versa. The star map 'looks' as if it stays the same depth (might now be slightly shallower?) as when using the code I posted above. Convergence doesn't seem to effect depth - held it down for a good 5 full seconds either direction using normal convergence as a 0 point. [img]https://forums.geforce.com/cmd/default/download-comment-attachment/66369/[/img] Any ideas? However, unless it's a mystery that will do your head in, I know the code must look barbaric but it is better than before and because you now need only tweak the nebula shader, far simpler for first timers too. :) I might just include the notepad++ installer and the fixing .ini file with the others if that's OK?... As always, really appreciate the help!!!!
Cheers mate.

and soz, I must be doing your head in. You're very patient! :D That code was the very first one I tried a while back which prompted me to experiment with adding the multipliers.

The Neb is now 3D but too shallow. +ve convergence moves it deeper and vice-versa.

The star map 'looks' as if it stays the same depth (might now be slightly shallower?) as when using the code I posted above. Convergence doesn't seem to effect depth - held it down for a good 5 full seconds either direction using normal convergence as a 0 point.

Image


Any ideas? However, unless it's a mystery that will do your head in, I know the code must look barbaric but it is better than before and because you now need only tweak the nebula shader, far simpler for first timers too. :)

I might just include the notepad++ installer and the fixing .ini file with the others if that's OK?...

As always, really appreciate the help!!!!

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.-------------------Vitals: Windows 10 64bit, Ryzen 5 2600x, GTX 1070, 16GB, 3D Vision, CV1
Handy Driver DiscussionHelix Mod - community fixes Bo3b's Shaderhacker School - How to fix 3D in games3dsolutionsgaming.com - videos, reviews and 3D fixes

#13
Posted 10/08/2015 03:14 PM   
No need to include the notepad++, it's just a text file, so any will do, including built in notepad or wordpad. I'd recommend not including it because it would add confusion about it being necessary. If you think that it needs a personal tweak for approximating the depth, put that in the IniParams instead, and then just use that in the shader. That way you can have people just edit the d3dx.ini file to move it where they like, or you can attach assorted numbers to it with keyboard mappings. It's best to make it all driven out of the d3dx.ini and make the shader code just use those IniParams. Should not be necessary to do that though, there should be some combo that works for everyone. Try some of the other variants Mike talks about: http://wiki.bo3b.net/index.php?title=Skybox_notes Game devs almost always do something insane, this might be one of them so that the normal formula doesn't work. Another variant I used in Psychonatus, which is not on that page, is to multiply the entire output by a constant. So for example "o1 *= 0.3;" That would be like o1.x = o1.x * 0.3; o1.y = o1.y * 0.3; and so on. This 'puffs up' the entire skybox, stretching it further out. This might work here, because it looks like maybe the nebula's skybox is different than the starfield skybox, and stupidly small.
No need to include the notepad++, it's just a text file, so any will do, including built in notepad or wordpad. I'd recommend not including it because it would add confusion about it being necessary.

If you think that it needs a personal tweak for approximating the depth, put that in the IniParams instead, and then just use that in the shader. That way you can have people just edit the d3dx.ini file to move it where they like, or you can attach assorted numbers to it with keyboard mappings. It's best to make it all driven out of the d3dx.ini and make the shader code just use those IniParams.


Should not be necessary to do that though, there should be some combo that works for everyone.

Try some of the other variants Mike talks about: http://wiki.bo3b.net/index.php?title=Skybox_notes


Game devs almost always do something insane, this might be one of them so that the normal formula doesn't work.

Another variant I used in Psychonatus, which is not on that page, is to multiply the entire output by a constant. So for example "o1 *= 0.3;" That would be like o1.x = o1.x * 0.3; o1.y = o1.y * 0.3; and so on.

This 'puffs up' the entire skybox, stretching it further out. This might work here, because it looks like maybe the nebula's skybox is different than the starfield skybox, and stupidly small.

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

#14
Posted 10/09/2015 11:00 AM   
OK, thanks I will give it/them a shot. I will also try that IniParams thing - would it be possible to post any example you might have handy of a d3dx.ini file, with the associated shader, so I can copy what it is doing please?
OK, thanks I will give it/them a shot.

I will also try that IniParams thing - would it be possible to post any example you might have handy of a d3dx.ini file, with the associated shader, so I can copy what it is doing please?

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.-------------------Vitals: Windows 10 64bit, Ryzen 5 2600x, GTX 1070, 16GB, 3D Vision, CV1
Handy Driver DiscussionHelix Mod - community fixes Bo3b's Shaderhacker School - How to fix 3D in games3dsolutionsgaming.com - videos, reviews and 3D fixes

#15
Posted 10/09/2015 01:59 PM   
  1 / 32    
Scroll To Top