Code: Select all
float zBiasOverride = ZBias;
if (ZBias < 0) zBiasOverride = -1 + ZBias * 0.03333333;
vProj[2][2] += zBiasOverride * 4.76837158e-7;
Code: Select all
float zBiasOverride = ZBias;
if (ZBias < 0) zBiasOverride = -1 + ZBias * 0.03333333;
vProj[2][2] += zBiasOverride * 4.76837158e-7;
Good morning!Beau Hollis wrote: ↑Mon Jan 11, 2021 6:31 pm Thanks for testing that out and providing feedback. I think this will work better:
This will scale all z-bias values (currently ranging from -1 to -30) into values between -1 and -2 while keeping all the object/layer ordering preserved. If you're seeing z-fighting, you could try increasing the value 0.03333333. I tested this briefly and didn't see z-fighting of the runways/aprons. If you do see issue with runways, aprons, etc, you could try bumping the base value (-1) up a bit.Code: Select all
float zBiasOverride = ZBias; if (ZBias < 0) zBiasOverride = -1 + ZBias * 0.03333333; vProj[2][2] += zBiasOverride * 4.76837158e-7;
This way it looks great or?
Code: Select all
vProj[2][2] += ZBias * 4.76837158e-7;
Code: Select all
float zBiasOverride = ZBias;
if (ZBias < 0) zBiasOverride = -1 + ZBias * 0.03333333;
vProj[2][2] += zBiasOverride * 4.76837158e-7;
Thanks for the update. This works flawlessly.Beau Hollis wrote: ↑Tue Jan 12, 2021 5:41 pm Thanks all for testing this out and providing feedback. Here is an updated set of full instructions with the newest shader change:
1. Open P3DInstallDirectory\ShadersHLSL\FuncLibrary.fxh
2. Look for this around line 780:
CODE: SELECT ALLCode: Select all
vProj[2][2] += ZBias * 4.76837158e-7;
replace it with:3. Clear cached shaders by deleting the Shaders folder here:Code: Select all
float zBiasOverride = ZBias; if (ZBias < 0) zBiasOverride = -1 + ZBias * 0.03333333; vProj[2][2] += zBiasOverride * 4.76837158e-7;
%LocalAppData%\Lockheed Martin\Prepar3D v5\Shaders
4. Re-launch p3d.
Beau, will this be a change reflected in the next release which I'm assuming is 5.2? Also, for those using a 3rd party software like EnvShade, will this code need to be changed everytime we update our shader files?Beau Hollis wrote: ↑Tue Jan 12, 2021 5:41 pm Thanks all for testing this out and providing feedback. Here is an updated set of full instructions with the newest shader change:
1. Open P3DInstallDirectory\ShadersHLSL\FuncLibrary.fxh
2. Look for this around line 780:replace it with:Code: Select all
vProj[2][2] += ZBias * 4.76837158e-7;
3. Clear cached shaders by deleting the Shaders folder here:Code: Select all
float zBiasOverride = ZBias; if (ZBias < 0) zBiasOverride = -1 + ZBias * 0.03333333; vProj[2][2] += zBiasOverride * 4.76837158e-7;
%LocalAppData%\Lockheed Martin\Prepar3D v5\Shaders
4. Re-launch p3d.
Hello Eric,B777ER wrote: ↑Tue Jan 12, 2021 8:56 pmBeau, will this be a change reflected in the next release which I'm assuming is 5.2? Also, for those using a 3rd party software like EnvShade, will this code need to be changed every time we update our shader files?Beau Hollis wrote: ↑Tue Jan 12, 2021 5:41 pm Thanks all for testing this out and providing feedback. Here is an updated set of full instructions with the newest shader change:
1. Open P3DInstallDirectory\ShadersHLSL\FuncLibrary.fxh
2. Look for this around line 780:replace it with:Code: Select all
vProj[2][2] += ZBias * 4.76837158e-7;
3. Clear cached shaders by deleting the Shaders folder here:Code: Select all
float zBiasOverride = ZBias; if (ZBias < 0) zBiasOverride = -1 + ZBias * 0.03333333; vProj[2][2] += zBiasOverride * 4.76837158e-7;
%LocalAppData%\Lockheed Martin\Prepar3D v5\Shaders
4. Re-launch p3d.
TOGA dropped Envshade future update in the recent annoucement.Hello Eric,/url]
This question you should probably parse to TOGA. TOGA will be able to answer this probably after the next release, as soon as they can take a look at the changes (I assume they are not part of LM BETA Team).
Marcus