Jump to content
Sign in to follow this  
arnava1304

Manual file tweaking v4

Recommended Posts

Some people suggested in the v4 thread that it would be a good idea to manually tweak the shader files to get the same effects as PTA. Results I've gotten so far haven't worked well, I won't even get into it. Please share here if you have any success.

 

Edit:

 

My main interest I the Rayleigh effect, but being completely new to this kind of stuff, I can't find where the values are being changed/added... maybe yuri or pe11e will be kind enough to shed some light :).

Share this post


Link to post
Share on other sites

Hi Arnav,

I looked into it and didn't find an answer yet, I'm not an expert of shader tweaks even if I made a few ones for Envtex but I received some help.

It seems to me that some variables changed and does not exist anymore in v4, and that's why it doesn't work at all as it is, it needs to be refined with the new variables first, I could be wrong, but if someone here is willing to try, I would begin with this.

  • Upvote 1

Maxime
TOGA projects

 

Share this post


Link to post
Share on other sites
3 hours ago, kmax59 said:

Hi Arnav,

I looked into it and didn't find an answer yet, I'm not an expert of shader tweaks even if I made a few ones for Envtex but I received some help.

It seems to me that some variables changed and does not exist anymore in v4, and that's why it doesn't work at all as it is, it needs to be refined with the new variables first, I could be wrong, but if someone here is willing to try, I would begin with this.

Hmm... Maybe a complete pta recreation is unlikely for this reason because the shader filles have changed too much. IMHO the new sim only lacks a few crucial tweaks from PTA. Namely, Rayleigh. People on the other thread seemed to want the same. Maybe we should focus on getting that to work?

Share this post


Link to post
Share on other sites

I've gotten URP v1.1's presets to port over perfectly. Took a little trial and error, as LM modified some stuff with the dynamic lighting, but in the end, it works!!

  • Upvote 2

Share this post


Link to post
Share on other sites
2 hours ago, 997R8V10 said:

I've gotten URP v1.1's presets to port over perfectly. Took a little trial and error, as LM modified some stuff with the dynamic lighting, but in the end, it works!!

Hi Prithvi. Could you share the files you have modified?

Share this post


Link to post
Share on other sites
8 hours ago, 997R8V10 said:

I've gotten URP v1.1's presets to port over perfectly. Took a little trial and error, as LM modified some stuff with the dynamic lighting, but in the end, it works!!

+1 

Thanks in advance


13900 8 cores @ 5.5-5.8 GHz / 8 cores @ 4.3 GHz (hyperthreading on) - Asus ROG Strix Gaming D4 - GSkill Ripjaws 2x 16 Gb 4266 mhz @ 3200 mhz / cas 13 -  Inno3D RTX4090 X3 iCHILL 24 Gb - 1x SSD M2 2800/1800 2TB - 1x SSD M2 2800/1800 1Tb - Sata 600 SSD 500 Mb - Thermaltake Level 10 GT case - EKWB Extreme 240 liquid cooling set push/pull - 2x 55’ Sony 4K tv's as front view and right view.

13600  6 cores @ 5.1 GHz / 8 cores @ 4.0 GHz (hypterthreading on) - Asus ROG Strix Gaming D - GSkill Trident 4x Gb 3200 MHz cas 15 - Asus TUF RTX 4080 16 Gb  - 1x SSD M2 2800/1800 2TB - 2x  Sata 600 SSD 500 Mb - Corsair D4000 Airflow case - NXT Krajen Z63 AIO liquide cooling - 1x 65” Sony 4K tv as left view.

FOV : 190 degrees

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

 

Share this post


Link to post
Share on other sites
13 hours ago, 997R8V10 said:

I've gotten URP v1.1's presets to port over perfectly. Took a little trial and error, as LM modified some stuff with the dynamic lighting, but in the end, it works!!

+2

Prithvi,

I would love to know how to port these settings.

 


David Webster

AMD Ryzen 7 5800X3D | G.Skill 32GB DDR4 3600Mhz | EVGA RTX 3080 Ti @ 3440X1440 | Crucial 2TB M.2 | Win11
 

Share this post


Link to post
Share on other sites
17 hours ago, 997R8V10 said:

I've gotten URP v1.1's presets to port over perfectly. Took a little trial and error, as LM modified some stuff with the dynamic lighting, but in the end, it works!!

+3 

Please share what you changed Prithvi! 

Share this post


Link to post
Share on other sites

Sorry for not getting back to you guys! As you can see, URP v1.1 for P3D v4 was released, as I coordinated with Pe11e to create the tool.

Converting shaders from v3->v4 is very simple. As long as you have the original v3 shaders, and the v3 shaders updated by PTA, simply use a diff tool to find differences between the two.

  1. Use a diff tool to find differences between P3D v3 DEFAULT and P3D v3 MODIFIED shaders.
  2. Make a backup of your v4 shaders.
  3. Manually copy changes from WinMerge (or any diff tool) to the new v4 shaders.
  4. Replace all occurrences of cb_mLights[SUN_LIGHT] with cb_mSun
  5. Replace all occurrences of cb_mLights[MOON_LIGHT] with cb_mMoon
  6. IMPORTANT: If you are using the "Reduce cloud brightness at dawn/ dusk/ night" tweak in PTA, you must edit Cloud.fx and do the following, or the effect will not work.
    1. Move the float kk = 1 + saturate... line to below fColor += scatter...
    2. Replace fGreen in the above line with fColor.g
    3. Remove the fRed /= kk;fGreen/=kk;, and fBlue/=kk lines.
    4. Under the float kk = 1 + saturate... line, add fColor /= kk;
    5. If you wish to remove the default scatter effect (NEW IN v4):
      1. Change float scatter = ComputeScatterFactor( to //float scatter = ComputeScatterFactor( or comment it out.
      2. Change fColor += scatter to //fColor += scatter or comment it out.
    6. When finished, it should look something like this:
    7.     float scatter = ComputeScatterFactor(cloudGroupNormal, cb_mInverseView[2].xyz, lightDirection, 0.8f);
      
          float3 fColor = fIntensity * cb_mCloudDirectional.rgb + cb_mCloudAmbient.rgb;
      
          //Add fast aprox scatter to diffuse.
          fColor += scatter * cb_mCloudDirectional.rgb;
          float kk = 1 + saturate(fColor.g/(cb_mFogColor.g + 0.00001) - 2);
          fColor /= kk;

       

  7. Overwrite the old v4 shaders in ShadersHLSL with the new modified shaders. MAKE SURE YOU MADE A BACKUP!!!

That's pretty much it!!

 

Share this post


Link to post
Share on other sites
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.
×
×
  • Create New...