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
Help AVSIM continue to serve you!
Please donate today!

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

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

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.

 

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

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