also DarkStarSword mentioned experimenting with part of this fog shader because the standard pattern didn't work for some reason. (I didn't ask which part.) I would be greatful for an example of the section I need to tweak.
//Fog in asteroid
cbuffer cb0 : register(b0)
{
float4 cb0[11] : packoffset(c0);
}
// Apply a stereo correction to the temporary register that holds a copy of the
// output position:
float4 stereo = StereoParams.Load(0);
r1.x += stereo.x * (r1.w - stereo.y);
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 7 64bit, i5 2500 @ 4.4ghz, SLI GTX670, 8GB, Viewsonic VX2268WM
By the looks of how simple the vertex shader is, the shiny shader is likely a deferred shader and might need a fix in the pixel shader - you will need to perform experiments to find potential places you can adjust it.
For experimentation, I will usually just add a value to x coordinates at random various and observe what happens. I use an IniParam set to transition from 0 to 1 over 1 second so I can see more clearly what the change is doing. Sometimes I multiply the experimental value by StereoParams.Load(0).x so that it will move in opposite directions in each eye. You are trying to find spots where you are able to move the effect horizontally with respect to the camera (regardless of camera orientation), but if you find a spot where you are able to move it in a cardinal direction (e.g. north-south) with respect to the world that is interesting as well.
For a few places to start experimenting - try adjusting each of the output registers at the end of the vertex shader (or sometimes inputs at the start). Look for anything that might be a matrix multiply (four 'dot' product instructions using consecutive constant registers) and try on the coordinate before and after that.
By the looks of how simple the vertex shader is, the shiny shader is likely a deferred shader and might need a fix in the pixel shader - you will need to perform experiments to find potential places you can adjust it.
For experimentation, I will usually just add a value to x coordinates at random various and observe what happens. I use an IniParam set to transition from 0 to 1 over 1 second so I can see more clearly what the change is doing. Sometimes I multiply the experimental value by StereoParams.Load(0).x so that it will move in opposite directions in each eye. You are trying to find spots where you are able to move the effect horizontally with respect to the camera (regardless of camera orientation), but if you find a spot where you are able to move it in a cardinal direction (e.g. north-south) with respect to the world that is interesting as well.
For a few places to start experimenting - try adjusting each of the output registers at the end of the vertex shader (or sometimes inputs at the start). Look for anything that might be a matrix multiply (four 'dot' product instructions using consecutive constant registers) and try on the coordinate before and after that.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Thanks for this :)
Am I right in thinking, once it looks like the shader has done its calculations I can add multipliers and it doesn't matter if the wxyz part of the wxyz is split over a couple of lines?
Re Fog shader - 2nd one above
I added multipliers for the fog VS. It's a weird one, with the fore and midground being fine but the extreme distance looking too near. Is it possible to stretch out the depth of a shader? If so what part of the shader would I be looking at tweaking? (The second shader in the OP.)
With regard to PSs they look different to VSs. The output looks different. Is there a way to fix using copy and paste patterns like you can do with VSs?
Finally you mentioned four dots, but most of the time there are only bunches of three like in the first example above (there is only one set in this one though) could I just add the forth, including the extra coordinate and adding one to the packoffset at the top? e.g.
[code]float4 cb0[4] : packoffset(c0);
o1.x = dot(cb0[0].xywz, r0.xyzw);
o1.y = dot(cb0[1].xywz, r0.xyzw);
o1.z = dot(cb0[2].xywz, r0.xyzw);
o1.w = dot(cb0[3].xywz, r0.xyzw);
[/code]
I clearly have no idea what I am doing; pure guess work :/
Thanks in advance!
Am I right in thinking, once it looks like the shader has done its calculations I can add multipliers and it doesn't matter if the wxyz part of the wxyz is split over a couple of lines?
Re Fog shader - 2nd one above
I added multipliers for the fog VS. It's a weird one, with the fore and midground being fine but the extreme distance looking too near. Is it possible to stretch out the depth of a shader? If so what part of the shader would I be looking at tweaking? (The second shader in the OP.)
With regard to PSs they look different to VSs. The output looks different. Is there a way to fix using copy and paste patterns like you can do with VSs?
Finally you mentioned four dots, but most of the time there are only bunches of three like in the first example above (there is only one set in this one though) could I just add the forth, including the extra coordinate and adding one to the packoffset at the top? e.g.
I clearly have no idea what I am doing; pure guess work :/
Thanks in advance!
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 7 64bit, i5 2500 @ 4.4ghz, SLI GTX670, 8GB, Viewsonic VX2268WM
This shader seems to effect shiny surfaces - it renders slightly wrong
I am being fussy but the shader looks broken: it has o2.z = 0.000000000e+000; That's wrong right? Or is it just how the shader handles real numbers?
Here is the shader. Is there anyway to fix it? I don't mind tweaking but would be really greatful for a demo of which part(s) needs to be tweaked. :)
also DarkStarSword mentioned experimenting with part of this fog shader because the standard pattern didn't work for some reason. (I didn't ask which part.) I would be greatful for an example of the section I need to tweak.
Many thanks in advance! :)
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 7 64bit, i5 2500 @ 4.4ghz, SLI GTX670, 8GB, Viewsonic VX2268WM
Handy Driver Discussion
Helix Mod - community fixes
Bo3b's Shaderhacker School - How to fix 3D in games
3dsolutionsgaming.com - videos, reviews and 3D fixes
For experimentation, I will usually just add a value to x coordinates at random various and observe what happens. I use an IniParam set to transition from 0 to 1 over 1 second so I can see more clearly what the change is doing. Sometimes I multiply the experimental value by StereoParams.Load(0).x so that it will move in opposite directions in each eye. You are trying to find spots where you are able to move the effect horizontally with respect to the camera (regardless of camera orientation), but if you find a spot where you are able to move it in a cardinal direction (e.g. north-south) with respect to the world that is interesting as well.
For a few places to start experimenting - try adjusting each of the output registers at the end of the vertex shader (or sometimes inputs at the start). Look for anything that might be a matrix multiply (four 'dot' product instructions using consecutive constant registers) and try on the coordinate before and after that.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD
Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword
Am I right in thinking, once it looks like the shader has done its calculations I can add multipliers and it doesn't matter if the wxyz part of the wxyz is split over a couple of lines?
Re Fog shader - 2nd one above
I added multipliers for the fog VS. It's a weird one, with the fore and midground being fine but the extreme distance looking too near. Is it possible to stretch out the depth of a shader? If so what part of the shader would I be looking at tweaking? (The second shader in the OP.)
With regard to PSs they look different to VSs. The output looks different. Is there a way to fix using copy and paste patterns like you can do with VSs?
Finally you mentioned four dots, but most of the time there are only bunches of three like in the first example above (there is only one set in this one though) could I just add the forth, including the extra coordinate and adding one to the packoffset at the top? e.g.
I clearly have no idea what I am doing; pure guess work :/
Thanks in advance!
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 7 64bit, i5 2500 @ 4.4ghz, SLI GTX670, 8GB, Viewsonic VX2268WM
Handy Driver Discussion
Helix Mod - community fixes
Bo3b's Shaderhacker School - How to fix 3D in games
3dsolutionsgaming.com - videos, reviews and 3D fixes