[quote="The_Nephilim"]Well I had tried something that was in the INI file but it did not work..I figured to try a few things but so far no success. here is what I tried :
[TextureOverride1]
;Hash=c3e55ebd
; NVidia stores surface creation mode heuristics in the game profile. setting
; this option overrides the creation mode for a given texture / buffer.
; 0 = NVAPI_STEREO_SURFACECREATEMODE_AUTO - use driver registry profile settings.
; 1 = NVAPI_STEREO_SURFACECREATEMODE_FORCESTEREO - create stereo surface.
; 2 = NVAPI_STEREO_SURFACECREATEMODE_FORCEMONO - create mono surface.
;StereoMode=0
[textureoverride1]
hash=7731b1f1d02a75aa-vs
stereomode=0
[textureoverride2]
hash=89956a3b22e3e115-vs
stereomode=0
I tried Zero and One neither did anything to the clouds. I did have the extra lines of code you asked me to use just incase. so no good yet the clouds are still mono for some weird reason..[/quote]
Dude... Focus! :-> Don't branch off to some other complicated approach until we are sure we need to. It dilutes your effort and adds confusion.
For the two cloud types, I'm not clear what happens when you add the depth*convergence code to each of those?
Disable one with o0=0; to make it clear what is happening, then add the fix code to the other. Does it work? Your code above does not include the fix code.
The_Nephilim said:Well I had tried something that was in the INI file but it did not work..I figured to try a few things but so far no success. here is what I tried :
[TextureOverride1]
;Hash=c3e55ebd
; NVidia stores surface creation mode heuristics in the game profile. setting
; this option overrides the creation mode for a given texture / buffer.
; 0 = NVAPI_STEREO_SURFACECREATEMODE_AUTO - use driver registry profile settings.
; 1 = NVAPI_STEREO_SURFACECREATEMODE_FORCESTEREO - create stereo surface.
; 2 = NVAPI_STEREO_SURFACECREATEMODE_FORCEMONO - create mono surface.
;StereoMode=0
I tried Zero and One neither did anything to the clouds. I did have the extra lines of code you asked me to use just incase. so no good yet the clouds are still mono for some weird reason..
Dude... Focus! :-> Don't branch off to some other complicated approach until we are sure we need to. It dilutes your effort and adds confusion.
For the two cloud types, I'm not clear what happens when you add the depth*convergence code to each of those?
Disable one with o0=0; to make it clear what is happening, then add the fix code to the other. Does it work? Your code above does not include the fix code.
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
OH I am sorry I thought it would be good to experiment a bit guess not sorry dude ;)
for the 2 cloud types I pout in the dsiable code and input the 3D code in the other and other then the 1 cloud type not showing the other cloud type did not go into 3D.. I checked to see and the 1 was disabled and the opther with the 3D code did nothing..
I tried a few combos of the code even going back the the code I used for the nameplates..
After I did that and nothing happened that is when I was branching out as I did not know what else to try with the code front.. So I figured do something vs nothing was a good idea..
OH I am sorry I thought it would be good to experiment a bit guess not sorry dude ;)
for the 2 cloud types I pout in the dsiable code and input the 3D code in the other and other then the 1 cloud type not showing the other cloud type did not go into 3D.. I checked to see and the 1 was disabled and the opther with the 3D code did nothing..
I tried a few combos of the code even going back the the code I used for the nameplates..
After I did that and nothing happened that is when I was branching out as I did not know what else to try with the code front.. So I figured do something vs nothing was a good idea..
[quote="The_Nephilim"]OH I am sorry I thought it would be good to experiment a bit guess not sorry dude ;)
for the 2 cloud types I pout in the dsiable code and input the 3D code in the other and other then the 1 cloud type not showing the other cloud type did not go into 3D.. I checked to see and the 1 was disabled and the opther with the 3D code did nothing..
I tried a few combos of the code even going back the the code I used for the nameplates..
After I did that and nothing happened that is when I was branching out as I did not know what else to try with the code front.. So I figured do something vs nothing was a good idea..[/quote]
Ja, no worries. But you didn't tell me here that you had already tried it and it didn't work. Always fine to experiment if you have nothing else to try. I mostly meant that to keep this conversation sensible, we need to keep it in order. These threads are hard to follow as it is.
So for the fixing code in say the Cumulus clouds. Are absolutely certain it's set up correctly? i.e. no errors in the Log, high beep sound on load, you know it's the right one from o0=0 at the end. Direct, back-to-back experiment of code there, F10, high beep, clouds disappear. Comment out the line with ; hit F10, high beep, clouds come back.
It makes no sense that o0 has an effect, but that fixing code of depth*convergence doesn't alter it. I also see a change in depth on the wispy clouds about two pages back. The wisps are not at screen depth in that picture.
Post your code for just the Cumulus cloud with the fixing code in it.
Try some experiments there to see if you can alter it's location at all. Like multiply o0.x*1000, or o0.x*10, o0.x*-5. It might be that this is not the right parameter, but that wispy example implies it is correct.
The_Nephilim said:OH I am sorry I thought it would be good to experiment a bit guess not sorry dude ;)
for the 2 cloud types I pout in the dsiable code and input the 3D code in the other and other then the 1 cloud type not showing the other cloud type did not go into 3D.. I checked to see and the 1 was disabled and the opther with the 3D code did nothing..
I tried a few combos of the code even going back the the code I used for the nameplates..
After I did that and nothing happened that is when I was branching out as I did not know what else to try with the code front.. So I figured do something vs nothing was a good idea..
Ja, no worries. But you didn't tell me here that you had already tried it and it didn't work. Always fine to experiment if you have nothing else to try. I mostly meant that to keep this conversation sensible, we need to keep it in order. These threads are hard to follow as it is.
So for the fixing code in say the Cumulus clouds. Are absolutely certain it's set up correctly? i.e. no errors in the Log, high beep sound on load, you know it's the right one from o0=0 at the end. Direct, back-to-back experiment of code there, F10, high beep, clouds disappear. Comment out the line with ; hit F10, high beep, clouds come back.
It makes no sense that o0 has an effect, but that fixing code of depth*convergence doesn't alter it. I also see a change in depth on the wispy clouds about two pages back. The wisps are not at screen depth in that picture.
Post your code for just the Cumulus cloud with the fixing code in it.
Try some experiments there to see if you can alter it's location at all. Like multiply o0.x*1000, or o0.x*10, o0.x*-5. It might be that this is not the right parameter, but that wispy example implies it is correct.
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
OK I did as you suggested in the last post and found the whispy cloud file.. it is 89956a.... now to be sure I inpout the o0=0; code and then reloaded the fix F10 and the clouds disappeared.. I then took out that code omit and the clouds came back..
I then input the following code you told me to use:
// Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth*convergence*175;
I saved the file wnet ingame and reloaded the file with F10 and it did not appear to do anything.. so I by accident hit the Preset convergence cycle key and voila the clouds had separation..
Now I was very happy I got some progress but then I wondered why is the convergence hotkey setting the depth.. I then looked back on Mikes Notes from and it stated it right there in that last thread..
" The usual way to fix a skybox is to just multiply stereoParams.x by a constant value (between 0-1). Sometimes that just does not seem to work well, or sometimes you need to multiply by a much bigger number than one, and oftentimes the skybox may still exhibit dependence on convergence"
so I guess by multiplying by a bigger number it is deopendent on the convergance now.. which is still no good but at least I took a step forward a bit..
Mike mentions to input this code "r10.x += stereoParams.x * xxx" now do I add that to your code or just add that line in the cloud code??
I am unsure what to do at this point but we are making headway now.. here is the code for the Whispy clouds:
[code] // ---- Created with 3Dmigoto v1.2.43 on Wed Aug 24 19:39:15 2016
// Whispy clouds..
cbuffer g_CameraParameter : register(b0)
{
struct
{
row_major float3x4 m_ViewMatrix;
row_major float3x4 m_InverseViewMatrix;
row_major float4x4 m_ViewProjectionMatrix;
row_major float4x4 m_InverseViewProjectionMatrix;
row_major float4x4 m_InverseProjectionMatrix;
row_major float4x4 m_ProjectionMatrix;
row_major float4x4 m_MainViewToProjectionMatrix;
float3 m_EyePosition;
float3 m_LookAtVector;
} g_CameraParameter : packoffset(c0);
}
cbuffer g_WorldMatrix : register(b1)
{
row_major float3x4 g_WorldMatrix : packoffset(c0);
}
cbuffer g_VSParam : register(b2)
{
float4 g_VSParam[5] : packoffset(c0);
}
// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);
void main(
float4 v0 : POSITION0,
float2 v1 : TEXCOORD0,
out float4 o0 : SV_POSITION0,
out float4 o1 : TEXCOORD0,
out float4 o2 : TEXCOORD4,
out float4 o3 : TEXCOORD5,
out float4 o4 : TEXCOORD6,
out float4 o5 : TEXCOORD7)
{
float4 r0,r1,r2;
uint4 bitmask, uiDest;
float4 fDest;
r0.x = dot(g_VSParam[1].xy, v0.xz);
r0.x = 0.5 + r0.x;
r0.xy = -r0.xx * r0.xx + float2(1,0.5);
r0.y = 0.5 + -abs(r0.y);
r0.y = 5 * r0.y;
r0.yz = g_VSParam[1].xy * r0.yy;
r0.yz = g_VSParam[1].ww * r0.yz;
r0.w = 1 + v0.y;
r0.yz = r0.yz * r0.ww;
r0.w = r0.w * r0.w;
r0.w = r0.w * g_VSParam[4].w + 1;
r1.x = 1 + -g_VSParam[1].w;
r1.x = g_VSParam[1].w * r0.x + r1.x;
r0.x = g_VSParam[1].w * r0.x + g_VSParam[1].z;
r1.x = v0.y * r1.x + r0.x;
r0.x = 1 + -r1.x;
r0.x = r0.x * r0.x + 1;
r2.xy = v0.xz * r0.xx;
r1.yz = r2.xy * r0.ww + r0.yz;
r1.w = 1;
r0.x = dot(g_WorldMatrix._m01_m00_m02_m03, r1.xyzw);
r0.y = dot(g_WorldMatrix._m11_m10_m12_m13, r1.xyzw);
r0.z = dot(g_WorldMatrix._m21_m20_m22_m23, r1.xyzw);
r1.x = saturate(r1.x);
r1.x = 1 + -r1.x;
r1.x = r1.x * r1.x;
r2.y = -r1.x * 1.5 + 0.5;
o2.xy = r1.yz;
r0.w = 1;
r1.x = dot(g_CameraParameter.m_ViewProjectionMatrix._m20_m21_m22_m23, r0.xyzw);
r1.y = dot(g_CameraParameter.m_ViewProjectionMatrix._m30_m31_m32_m33, r0.xyzw);
r1.z = 0.999998987 * r1.y;
o0.w = r1.y;
o0.z = min(r1.x, r1.z);
o0.x = dot(g_CameraParameter.m_ViewProjectionMatrix._m00_m01_m02_m03, r0.xyzw);
o0.y = dot(g_CameraParameter.m_ViewProjectionMatrix._m10_m11_m12_m13, r0.xyzw);
o1.xyzw = v1.xyxy;
r0.x = -r2.y * r2.y + 1;
r0.x = sqrt(r0.x);
r2.xz = v0.xz * -r0.xx;
o2.w = dot(g_VSParam[3].xyz, -r2.xyz);
o2.z = 0;
o3.xyz = r2.xyz;
o3.w = 0;
r0.x = dot(g_VSParam[2].xy, v0.xz);
r0.x = 0.5 + r0.x;
r0.x = g_VSParam[2].z * r0.x + g_VSParam[2].w;
o4.w = 1 + -r0.x;
o5.w = r0.x;
r0.xz = float2(-1,1) * v0.zx;
r0.y = 0;
o4.xyz = r0.xyz;
r1.xyz = r2.zxy * r0.yzx;
o5.xyz = r2.yzx * r0.zxy + -r1.xyz;
// Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth*convergence*175;
return;
}
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// using 3Dmigoto v1.2.43 on Wed Aug 24 19:39:15 2016
//
//
// Buffer Definitions:
//
// cbuffer g_CameraParameter
// {
//
// struct CameraParameter
// {
//
// row_major float3x4 m_ViewMatrix;// Offset: 0
// row_major float3x4 m_InverseViewMatrix;// Offset: 48
// row_major float4x4 m_ViewProjectionMatrix;// Offset: 96
// row_major float4x4 m_InverseViewProjectionMatrix;// Offset: 160
// row_major float4x4 m_InverseProjectionMatrix;// Offset: 224
// row_major float4x4 m_ProjectionMatrix;// Offset: 288
// row_major float4x4 m_MainViewToProjectionMatrix;// Offset: 352
// float3 m_EyePosition; // Offset: 416
// float3 m_LookAtVector; // Offset: 432
//
// } g_CameraParameter; // Offset: 0 Size: 444
//
// }
//
// cbuffer g_WorldMatrix
// {
//
// row_major float3x4 g_WorldMatrix; // Offset: 0 Size: 48
//
// }
//
// cbuffer g_VSParam
// {
//
// float4 g_VSParam[5]; // Offset: 0 Size: 80
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// g_CameraParameter cbuffer NA NA 0 1
// g_WorldMatrix cbuffer NA NA 1 1
// g_VSParam cbuffer NA NA 2 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyz
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xyzw
// TEXCOORD 0 xyzw 1 NONE float xyzw
// TEXCOORD 4 xyzw 2 NONE float xyzw
// TEXCOORD 5 xyzw 3 NONE float xyzw
// TEXCOORD 6 xyzw 4 NONE float xyzw
// TEXCOORD 7 xyzw 5 NONE float xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[10], immediateIndexed
dcl_constantbuffer cb1[3], immediateIndexed
dcl_constantbuffer cb2[5], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_temps 3
dp2 r0.x, cb2[1].xyxx, v0.xzxx
add r0.x, r0.x, l(0.500000)
mad r0.xy, -r0.xxxx, r0.xxxx, l(1.000000, 0.500000, 0.000000, 0.000000)
add r0.y, -|r0.y|, l(0.500000)
mul r0.y, r0.y, l(5.000000)
mul r0.yz, r0.yyyy, cb2[1].xxyx
mul r0.yz, r0.yyzy, cb2[1].wwww
add r0.w, v0.y, l(1.000000)
mul r0.yz, r0.wwww, r0.yyzy
mul r0.w, r0.w, r0.w
mad r0.w, r0.w, cb2[4].w, l(1.000000)
add r1.x, -cb2[1].w, l(1.000000)
mad r1.x, cb2[1].w, r0.x, r1.x
mad r0.x, cb2[1].w, r0.x, cb2[1].z
mad r1.x, v0.y, r1.x, r0.x
add r0.x, -r1.x, l(1.000000)
mad r0.x, r0.x, r0.x, l(1.000000)
mul r2.xy, r0.xxxx, v0.xzxx
mad r1.yz, r2.xxyx, r0.wwww, r0.yyzy
mov r1.w, l(1.000000)
dp4 r0.x, cb1[0].yxzw, r1.xyzw
dp4 r0.y, cb1[1].yxzw, r1.xyzw
dp4 r0.z, cb1[2].yxzw, r1.xyzw
mov_sat r1.x, r1.x
add r1.x, -r1.x, l(1.000000)
mul r1.x, r1.x, r1.x
mad r2.y, -r1.x, l(1.500000), l(0.500000)
mov o2.xy, r1.yzyy
mov r0.w, l(1.000000)
dp4 r1.x, cb0[8].xyzw, r0.xyzw
dp4 r1.y, cb0[9].xyzw, r0.xyzw
mul r1.z, r1.y, l(0.999999)
mov o0.w, r1.y
min o0.z, r1.z, r1.x
dp4 o0.x, cb0[6].xyzw, r0.xyzw
dp4 o0.y, cb0[7].xyzw, r0.xyzw
mov o1.xyzw, v1.xyxy
mad r0.x, -r2.y, r2.y, l(1.000000)
sqrt r0.x, r0.x
mul r2.xz, -r0.xxxx, v0.xxzx
dp3 o2.w, cb2[3].xyzx, -r2.xyzx
mov o2.z, l(0)
mov o3.xyz, r2.xyzx
mov o3.w, l(0)
dp2 r0.x, cb2[2].xyxx, v0.xzxx
add r0.x, r0.x, l(0.500000)
mad r0.x, cb2[2].z, r0.x, cb2[2].w
add o4.w, -r0.x, l(1.000000)
mov o5.w, r0.x
mul r0.xz, v0.zzxz, l(-1.000000, 0.000000, 1.000000, 0.000000)
mov r0.y, l(0)
mov o4.xyz, r0.xyzx
mul r1.xyz, r0.yzxy, r2.zxyz
mad o5.xyz, r2.yzxy, r0.zxyz, -r1.xyzx
ret
// Approximately 55 instruction slots used
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
[/code]
I also inpout a few other lines of code I did not make any headway with that.. I still need to get the code down a bit better to know what to input in there myself.. but I guess I am not supposed to know that yet??
As always thank you so much for all the help this is good stuff.. ;)
OK I did as you suggested in the last post and found the whispy cloud file.. it is 89956a.... now to be sure I inpout the o0=0; code and then reloaded the fix F10 and the clouds disappeared.. I then took out that code omit and the clouds came back..
I then input the following code you told me to use:
// Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth*convergence*175;
I saved the file wnet ingame and reloaded the file with F10 and it did not appear to do anything.. so I by accident hit the Preset convergence cycle key and voila the clouds had separation..
Now I was very happy I got some progress but then I wondered why is the convergence hotkey setting the depth.. I then looked back on Mikes Notes from and it stated it right there in that last thread..
" The usual way to fix a skybox is to just multiply stereoParams.x by a constant value (between 0-1). Sometimes that just does not seem to work well, or sometimes you need to multiply by a much bigger number than one, and oftentimes the skybox may still exhibit dependence on convergence"
so I guess by multiplying by a bigger number it is deopendent on the convergance now.. which is still no good but at least I took a step forward a bit..
Mike mentions to input this code "r10.x += stereoParams.x * xxx" now do I add that to your code or just add that line in the cloud code??
I am unsure what to do at this point but we are making headway now.. here is the code for the Whispy clouds:
// ---- Created with 3Dmigoto v1.2.43 on Wed Aug 24 19:39:15 2016
// Whispy clouds..
cbuffer g_CameraParameter : register(b0)
{
I also inpout a few other lines of code I did not make any headway with that.. I still need to get the code down a bit better to know what to input in there myself.. but I guess I am not supposed to know that yet??
As always thank you so much for all the help this is good stuff.. ;)
OK, very good, that means we are in fact affecting the cloud location using the Vertex Shader, it's just some unusual combination.
The way this works is that we are trying to affect the o0.x parameter/variable only. That's what determines the depth into our out of the screen. As noted in the ShaderHackers class you might expect this to be .z, but it's .x because that's separating the images along the x axis.
What we are doing with adding in an x value is increasing the separation between the eyes. Go back and review the ShaderHacker class section where I talk about this. More depth means more x delta. Less depth is less delta. So, "o0.x += depth * convergence * 0.75" is specifically saying to set the depth to 75% of the maximum. So it would be 3/4 of the way to the deepest object in the 3D view. 0=screen depth, 1=mountain/sky/stars/max depth.
BTW, all the stuff we've been talking about is all math, not programming or HLSL. These formulas are the same ones you'd use to describe it using algebra. So for example "o0.x = o0.x + depth * convergence" is the type of math formula we are using.
The "o0.x += depth * convergence" is a shorthand computer form that says to just add the value to the current value.
Based on some discussions from DarkStarSword, the actual code I would expect to work here would be:
[code]// Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth * convergence;
[/code]
The reason that is the more canonical version of the code, is because that takes into account convergence, and so moving convergence with the hot keys won't move the clouds in game. This doesn't always work for various weird game reasons, but it's the preferred form.
Try that code, and play with convergence and depth to see what happens. If I'm understanding what you are saying this will probably look like nothing is happening.
If that proves to not work, we can try Mike's suggestions. In the code there he was using r10, that's just a temporary variable that holds the o0 value. There is no significance to r10, it's just like x or y in x + y = 3.
His notation of [0..1] is a math notation of a number between 0 and 1. A percentage in other words. So his version of stereoParams.x * [0..1] would be the same as "o0.x += depth * %"
If the canonical form does not work, try Mike's first suggestion with:
[code]// Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth * 0.99;
[/code]
Try other values than 0.99 (99% of max). Just experiment to see if something makes sense. Also play with convergence to see if it diverges.
OK, very good, that means we are in fact affecting the cloud location using the Vertex Shader, it's just some unusual combination.
The way this works is that we are trying to affect the o0.x parameter/variable only. That's what determines the depth into our out of the screen. As noted in the ShaderHackers class you might expect this to be .z, but it's .x because that's separating the images along the x axis.
What we are doing with adding in an x value is increasing the separation between the eyes. Go back and review the ShaderHacker class section where I talk about this. More depth means more x delta. Less depth is less delta. So, "o0.x += depth * convergence * 0.75" is specifically saying to set the depth to 75% of the maximum. So it would be 3/4 of the way to the deepest object in the 3D view. 0=screen depth, 1=mountain/sky/stars/max depth.
BTW, all the stuff we've been talking about is all math, not programming or HLSL. These formulas are the same ones you'd use to describe it using algebra. So for example "o0.x = o0.x + depth * convergence" is the type of math formula we are using.
The "o0.x += depth * convergence" is a shorthand computer form that says to just add the value to the current value.
Based on some discussions from DarkStarSword, the actual code I would expect to work here would be:
The reason that is the more canonical version of the code, is because that takes into account convergence, and so moving convergence with the hot keys won't move the clouds in game. This doesn't always work for various weird game reasons, but it's the preferred form.
Try that code, and play with convergence and depth to see what happens. If I'm understanding what you are saying this will probably look like nothing is happening.
If that proves to not work, we can try Mike's suggestions. In the code there he was using r10, that's just a temporary variable that holds the o0 value. There is no significance to r10, it's just like x or y in x + y = 3.
His notation of [0..1] is a math notation of a number between 0 and 1. A percentage in other words. So his version of stereoParams.x * [0..1] would be the same as "o0.x += depth * %"
If the canonical form does not work, try Mike's first suggestion with:
OK that is the classes you made up for the dx9 version found here:
http://wiki.bo3b.net/index.php?title=Bo3b%27s_School_for_Shaderhackers
If so the question it asks for the god of 3D??? I do not know that answer to make an account lol!!
I will go through those classes as well..
but I will try both of those codes to see if either works..
Hey bo3b,
I tried both of your sugestions for the code and neither did anything.. and like you said I meesed with the separation and convergance it did not affect the clouds at all..
I would have posted this last night but I was getting a thunderstorm and I shutdown the PC..
I also started your classes and did lesson 0. I was one lesson 1 when I shut down, I am about to finish that lesson now..
Definetely some good stuff with those lessons..
I tried both of your sugestions for the code and neither did anything.. and like you said I meesed with the separation and convergance it did not affect the clouds at all..
I would have posted this last night but I was getting a thunderstorm and I shutdown the PC..
I also started your classes and did lesson 0. I was one lesson 1 when I shut down, I am about to finish that lesson now..
You still there bo3b?? I tried inputting this bit of code:
// Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth*convergence*175;
It seems to be the only one that works but then it depends on the convergence setting.. at a lower convergence setting the clouds barely look 3D or have separation.. at about 13.0 on the sepratin they look just fine..
I did try all of the other combos the only one that seems too work is the above form.. So would that be a fix or is that still broke?? Either way I think I am done with this one for now as I don't know what else to try..
Thank you for all the help I will make a note you where a big help in getting FFXIV fixed thnx Dude!! ;) *****
You still there bo3b?? I tried inputting this bit of code:
// Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth*convergence*175;
It seems to be the only one that works but then it depends on the convergence setting.. at a lower convergence setting the clouds barely look 3D or have separation.. at about 13.0 on the sepratin they look just fine..
I did try all of the other combos the only one that seems too work is the above form.. So would that be a fix or is that still broke?? Either way I think I am done with this one for now as I don't know what else to try..
Thank you for all the help I will make a note you where a big help in getting FFXIV fixed thnx Dude!! ;) *****
Well this is still related as it is the code I been using that almost works.. I was reading on the Prime Directive and found this last line of code.. now I was wondering could I inpout this into the exisiting code I been using on the 4th line??
// At this point, "location" is the output position, but missing stereo.
location.x += separation * (location.w - convergence);
it states it is a output position. would that be why the code is not really working as it does not have the position of the clouds?? So the new code I could input would be this:
float4 stereo = StereoParams.Load(0);
float separation = stereo.x;
float convergence = stereo.y;
location.x += separation * (location.w - convergence);
I will try it either way I am just hoping bo3b returns to the thread and continues to help my poor soul out ;)
Well this is still related as it is the code I been using that almost works.. I was reading on the Prime Directive and found this last line of code.. now I was wondering could I inpout this into the exisiting code I been using on the 4th line??
// At this point, "location" is the output position, but missing stereo.
it states it is a output position. would that be why the code is not really working as it does not have the position of the clouds?? So the new code I could input would be this:
// Cumulus Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += 70 * (o0.w - 13.0);
Well I inpuit the above code and it worked but just like the other code did. The separation was tied in with the convergence setting.. Either way it works for me but I am not sure most other users use the same high converence settings I use..
I will just go ask on the Helixmod sirte to toehr users who use this fix what convergence level they are at.. I do not know what else to try now for sure..
Well I inpuit the above code and it worked but just like the other code did. The separation was tied in with the convergence setting.. Either way it works for me but I am not sure most other users use the same high converence settings I use..
I will just go ask on the Helixmod sirte to toehr users who use this fix what convergence level they are at.. I do not know what else to try now for sure..
Well it seems that code did not do anything but omit the clouds a bit.. I noticed it when they where cloudy and raining the sky was a bit glitch like blinking on and off but no clouds..
I will need to try this code on a clear day maybe..
Well it seems that code did not do anything but omit the clouds a bit.. I noticed it when they where cloudy and raining the sky was a bit glitch like blinking on and off but no clouds..
I will need to try this code on a clear day maybe..
boeb and DarkStarSword you guys are cool as beans.. I not being deterred kept wondering why the clouds where not working with the code you said should work.. Well I looked at the code I was using and I had a parameter misplaced and wrong..
Float separation = stereo.x was what I was using it was supposed to be float "DEPTH" = Stereo.x.. I set it too 1000 and the clouds sepoerated near what they should be..
so here was the final code:
// Cumulus Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth * 1000;
So it works now 100% I just need to get the depth set correct for my setting and save the file and reupload the new version and this is done ;)
Thank you so much to Everybody and especially bo3b who persevered through my ramblings !! ;)
boeb and DarkStarSword you guys are cool as beans.. I not being deterred kept wondering why the clouds where not working with the code you said should work.. Well I looked at the code I was using and I had a parameter misplaced and wrong..
Float separation = stereo.x was what I was using it was supposed to be float "DEPTH" = Stereo.x.. I set it too 1000 and the clouds sepoerated near what they should be..
I actually set the final variable too 2500 and it has the same separation I need.. so basically this should be set the separation according to each users separation setting??
I actually set the final variable too 2500 and it has the same separation I need.. so basically this should be set the separation according to each users separation setting??
Well I answered my own question and found the answer all is good as Seperation is set by end users own NCP Settings..
Fix is up besides the shadows most all should be fixed.. I probally will not get the shadows fixed as they prove to be a bit more advanced of a fix..
Thank you to bo3b and all the coders and modders who have helped make this all possible and I cant forget God ;)
Dude... Focus! :-> Don't branch off to some other complicated approach until we are sure we need to. It dilutes your effort and adds confusion.
For the two cloud types, I'm not clear what happens when you add the depth*convergence code to each of those?
Disable one with o0=0; to make it clear what is happening, then add the fix code to the other. Does it work? Your code above does not include the fix code.
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
for the 2 cloud types I pout in the dsiable code and input the 3D code in the other and other then the 1 cloud type not showing the other cloud type did not go into 3D.. I checked to see and the 1 was disabled and the opther with the 3D code did nothing..
I tried a few combos of the code even going back the the code I used for the nameplates..
After I did that and nothing happened that is when I was branching out as I did not know what else to try with the code front.. So I figured do something vs nothing was a good idea..
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit
Ja, no worries. But you didn't tell me here that you had already tried it and it didn't work. Always fine to experiment if you have nothing else to try. I mostly meant that to keep this conversation sensible, we need to keep it in order. These threads are hard to follow as it is.
So for the fixing code in say the Cumulus clouds. Are absolutely certain it's set up correctly? i.e. no errors in the Log, high beep sound on load, you know it's the right one from o0=0 at the end. Direct, back-to-back experiment of code there, F10, high beep, clouds disappear. Comment out the line with ; hit F10, high beep, clouds come back.
It makes no sense that o0 has an effect, but that fixing code of depth*convergence doesn't alter it. I also see a change in depth on the wispy clouds about two pages back. The wisps are not at screen depth in that picture.
Post your code for just the Cumulus cloud with the fixing code in it.
Try some experiments there to see if you can alter it's location at all. Like multiply o0.x*1000, or o0.x*10, o0.x*-5. It might be that this is not the right parameter, but that wispy example implies it is correct.
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 then input the following code you told me to use:
// Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth*convergence*175;
I saved the file wnet ingame and reloaded the file with F10 and it did not appear to do anything.. so I by accident hit the Preset convergence cycle key and voila the clouds had separation..
Now I was very happy I got some progress but then I wondered why is the convergence hotkey setting the depth.. I then looked back on Mikes Notes from and it stated it right there in that last thread..
" The usual way to fix a skybox is to just multiply stereoParams.x by a constant value (between 0-1). Sometimes that just does not seem to work well, or sometimes you need to multiply by a much bigger number than one, and oftentimes the skybox may still exhibit dependence on convergence"
so I guess by multiplying by a bigger number it is deopendent on the convergance now.. which is still no good but at least I took a step forward a bit..
Mike mentions to input this code "r10.x += stereoParams.x * xxx" now do I add that to your code or just add that line in the cloud code??
I am unsure what to do at this point but we are making headway now.. here is the code for the Whispy clouds:
I also inpout a few other lines of code I did not make any headway with that.. I still need to get the code down a bit better to know what to input in there myself.. but I guess I am not supposed to know that yet??
As always thank you so much for all the help this is good stuff.. ;)
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit
The way this works is that we are trying to affect the o0.x parameter/variable only. That's what determines the depth into our out of the screen. As noted in the ShaderHackers class you might expect this to be .z, but it's .x because that's separating the images along the x axis.
What we are doing with adding in an x value is increasing the separation between the eyes. Go back and review the ShaderHacker class section where I talk about this. More depth means more x delta. Less depth is less delta. So, "o0.x += depth * convergence * 0.75" is specifically saying to set the depth to 75% of the maximum. So it would be 3/4 of the way to the deepest object in the 3D view. 0=screen depth, 1=mountain/sky/stars/max depth.
BTW, all the stuff we've been talking about is all math, not programming or HLSL. These formulas are the same ones you'd use to describe it using algebra. So for example "o0.x = o0.x + depth * convergence" is the type of math formula we are using.
The "o0.x += depth * convergence" is a shorthand computer form that says to just add the value to the current value.
Based on some discussions from DarkStarSword, the actual code I would expect to work here would be:
The reason that is the more canonical version of the code, is because that takes into account convergence, and so moving convergence with the hot keys won't move the clouds in game. This doesn't always work for various weird game reasons, but it's the preferred form.
Try that code, and play with convergence and depth to see what happens. If I'm understanding what you are saying this will probably look like nothing is happening.
If that proves to not work, we can try Mike's suggestions. In the code there he was using r10, that's just a temporary variable that holds the o0 value. There is no significance to r10, it's just like x or y in x + y = 3.
His notation of [0..1] is a math notation of a number between 0 and 1. A percentage in other words. So his version of stereoParams.x * [0..1] would be the same as "o0.x += depth * %"
If the canonical form does not work, try Mike's first suggestion with:
Try other values than 0.99 (99% of max). Just experiment to see if something makes sense. Also play with convergence to see if it diverges.
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
http://wiki.bo3b.net/index.php?title=Bo3b%27s_School_for_Shaderhackers
If so the question it asks for the god of 3D??? I do not know that answer to make an account lol!!
I will go through those classes as well..
but I will try both of those codes to see if either works..
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit
helix
Me too i didn't found the answer until someone told me (DHR maybe?).
Good luck for the fix.
I tried both of your sugestions for the code and neither did anything.. and like you said I meesed with the separation and convergance it did not affect the clouds at all..
I would have posted this last night but I was getting a thunderstorm and I shutdown the PC..
I also started your classes and did lesson 0. I was one lesson 1 when I shut down, I am about to finish that lesson now..
Definetely some good stuff with those lessons..
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit
// Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth*convergence*175;
It seems to be the only one that works but then it depends on the convergence setting.. at a lower convergence setting the clouds barely look 3D or have separation.. at about 13.0 on the sepratin they look just fine..
I did try all of the other combos the only one that seems too work is the above form.. So would that be a fix or is that still broke?? Either way I think I am done with this one for now as I don't know what else to try..
Thank you for all the help I will make a note you where a big help in getting FFXIV fixed thnx Dude!! ;) *****
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit
// At this point, "location" is the output position, but missing stereo.
location.x += separation * (location.w - convergence);
it states it is a output position. would that be why the code is not really working as it does not have the position of the clouds?? So the new code I could input would be this:
float4 stereo = StereoParams.Load(0);
float separation = stereo.x;
float convergence = stereo.y;
location.x += separation * (location.w - convergence);
I will try it either way I am just hoping bo3b returns to the thread and continues to help my poor soul out ;)
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += 70 * (o0.w - 13.0);
Well I inpuit the above code and it worked but just like the other code did. The separation was tied in with the convergence setting.. Either way it works for me but I am not sure most other users use the same high converence settings I use..
I will just go ask on the Helixmod sirte to toehr users who use this fix what convergence level they are at.. I do not know what else to try now for sure..
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit
I will need to try this code on a clear day maybe..
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit
Float separation = stereo.x was what I was using it was supposed to be float "DEPTH" = Stereo.x.. I set it too 1000 and the clouds sepoerated near what they should be..
so here was the final code:
// Cumulus Clouds to near infinity
float4 stereo = StereoParams.Load(0);
float depth = stereo.x;
float convergence = stereo.y;
o0.x += depth * 1000;
So it works now 100% I just need to get the depth set correct for my setting and save the file and reupload the new version and this is done ;)
Thank you so much to Everybody and especially bo3b who persevered through my ramblings !! ;)
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit
Fix is up besides the shadows most all should be fixed.. I probally will not get the shadows fixed as they prove to be a bit more advanced of a fix..
Thank you to bo3b and all the coders and modders who have helped make this all possible and I cant forget God ;)
Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit