Jump to content

Sign in to follow this  
mpo910

P3D V5.1 Objects through FOG/Clouds Workaround - By LM

Recommended Posts

3 hours ago, w6kd said:

For those using Envshade, the code of interest will not be at line 721, as Envshade does modify this file...in my case it was at line 821, but its precise location in the file may vary depending on how you have Envshade configured.

Also, you will most likely have to go back in and reaccomplish this edit if you use Envshade to modify the shader settings again later.

FWIW, for those using the Lorby-SI P3D Addon Manager, under the "Tools" tab there's a handy one-click "Clear the Shader Cache" function there many may not have noticed.

 

Using Envshade, mine was at that line (821) too. And you are right, changes in Envshade settings require to accomplish the mod again. But usually, I don't play with Envshade settings too much.


- Harry J.

i7-7820X (@4.8 GHz), 32GB RAM (@3467) 2080Ti (3440x1440), SSD 500GB, (Win10x64),  SSDs 1+2 TB (P3Dv5.x + ORBX). FSGlobalNG (mesh), ORBX (Global+OLC, all FTX Regions, all TE products, many Airports), DDscenery (NY, CH, MIA), Airports (FT, FB, FSDT, AS); PMDG (737, 747, 777), MJC DQ400, RA Piston Duke, A2A C172. Weather ASP5. F1 GTN complete. AI Traffic: AIG OCI

 

 

 

Share this post


Link to post
2 hours ago, Nemo said:

Using Envshade, mine was at that line (821) too. And you are right, changes in Envshade settings require to accomplish the mod again. But usually, I don't play with Envshade settings too much.

I always search for words. Very easy and it doesn’t matter what line number

Edited by GSalden

Gerard

7940x ( 14 cores ) : 14 cores @ 4.7 - Gigabyte X299 Gaming 7 - 32 Gb G.Skill Trident Z 3200Mhz Cl 14 - Inno3D RTX3090 X4 iCHILL 24 Gb - 1x SSD M2 1800/1800 2TB - 2x  Sata 600 SSD 500 Mb - Thermaltake Level 10 GT case - EKWB Extreme 240 liquid cooling set push/pull - 2x 43” Sony 4K tv's in NVSurround

8700K : all 6 cores @ 5.0 GHz - Asus ROG 370 - 16 Gb 4000 MHz @ 3600 Mhz - Inno3D RTX 3090 X3 iCHILL 24 Gb  - 1x SSD M2 1800/1800 2TB - 2x  Sata 600 SSD 500 Mb - 1x 55” Sony 4K tv

My flightsim vids :  https://www.youtube.com/user/fswidesim/videos?shelf_id=0&sort=dd&view=0

 

Share this post


Link to post

I cant seem to get this to work. I have made the changes to the file and deleted the shaders. When I take off from LGAV (fly-tampa) the autogen on airport and in surrounding area/ city bleeds through the clouds.  Nothing has changed. What am I doing wrong?

Share this post


Link to post
12 minutes ago, LGKR said:

I cant seem to get this to work. I have made the changes to the file and deleted the shaders. When I take off from LGAV (fly-tampa) the autogen on airport and in surrounding area/ city bleeds through the clouds.  Nothing has changed. What am I doing wrong?

Can you quote all the lines you have at that section of your shader file please? Must be all the lines between the empty lines regarding this change. 

Marcus

Share this post


Link to post

thanks for your reply

Here's the section from the shader file with the amendment made:

 

#endif
    // 4.76837158e-7 is 2^-21.  In theory this offset should be 
    // depth buffer is 24 bits but this is added to (f+n)/(f-2) which is then multiplied by z
    // and devided by z.  As a result, there is precision lost and we must use a smaller number
    // The GDC presentation suggested 2^21 this value works fine for two coplanar meshes with same positions
    // It doesn't work for very long markings on a runway.  Adding 1mm y bias fixes the markings though.
    // NOTE: You should not pre-muliply world view proj.  iewspace position should be multiplied into this proj
    // matrix directly or percision will cause issues.

    float zBiasOverride = -1;
    if (ZBias != -30) zBiasOverride = ZBias;
    vProj[2][2] += zBiasOverride * 4.76837158e-7;
    return vProj;
}

/**
* Monitor resolution gama correction.

 

 

 

 

 

Share this post


Link to post

float zBiasOverride = ZBias;

    if (ZBias < 0) zBiasOverride = -1 + ZBias * 0.03333333;

    vProj[2][2] += zBiasOverride * 4.76837158e-7;

This is the correct one. Look here: 

https://www.prepar3d.com/forum/viewtopic.php?f=6312&t=141012&start=15#p234523

I recommend to test without any other shader tools first to look if it works now. After that you can apply shader mods via envshade  for instance

 

 

Edited by mpo910

Share this post


Link to post

Thanks for this, but it still bleeds through. No shaders applied.  It seems the autogen that bleeds through is the flytampa autogen, not the standard orbx/LM autogen. Wonder what could be done.

Share this post


Link to post

I am not getting this to work. Does the fix only work with EA enabled? I do not use EA.  Is there a solution for non-EA users?

Share this post


Link to post
22 minutes ago, LGKR said:

I am not getting this to work. Does the fix only work with EA enabled? I do not use EA.  Is there a solution for non-EA users?

I don't use non ea. Sorry. Can't tell you at the moment.  You have to try. Why you don't turn EA on for test purposes? It's easy to try. 

  • Upvote 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    41%
    $10,300.00 of $25,000.00 Donate Now
×
×
  • Create New...