Jump to content
Sign in to follow this  
mobiel

Moon brightness

Recommended Posts

Hello guys,

is there any tweak to reduce the brightness of the moon? In V5 the moon illuminates the aircraft a lot so the night is not very dark.

Are anyone using HDR?

Share this post


Link to post

The night is not very dark when the moon is out.

Just sayin...

  • Like 2
  • Upvote 1

Share this post


Link to post

Yes of course, but irl i never mentioned such a bright night during half moon

Share this post


Link to post

Look at this (EA on HF1) this is with half moon today. It is definitely too bright

kzo3mswy.png

  • Like 1

Share this post


Link to post

NVM. User error.

Edited by B777ER

Eric 

 

 

Share this post


Link to post

i have edited shaders_hlsl manually to completely rid off any kind of moon contribution and i`am pretty satisfied with the result. here you can see all the differences i have made (use winmerge to sort it out) https://yadi.sk/d/S5zRCvbTrorHew

Edited by aiRoNe_fx

Share this post


Link to post
3 hours ago, aiRoNe_fx said:

i have edited shaders_hlsl manually to completely rid off any kind of moon contribution and i`am pretty satisfied with the result. here you can see all the differences i have made (use winmerge to sort it out) https://yadi.sk/d/S5zRCvbTrorHew

awsome, but it doesnt seem to work with truesky on.  I guess its a different set of shaders.

 

EDIT: It might be because I forgot to clear shaders.  You are the hero I was looking for today.

Edited by Pilot53

 

Lian Li 011 Air Mini | AMD 7950X3D | Asus ROG STRIX B650E-F | Arctic Cooling Liquid Freezer II 280mm RGB | 2x32GB G.Skill DDR5-6000 | ASUS TUF RTX 4090 | Seasonic Prime Platinum 1000W | Varjo Aero

 

Share this post


Link to post

True Sky has its own sky, clouds, sun and moon which cannot be changed by modifying the P3D shaders.

Edited by GSalden
  • Upvote 1

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

I figured it out, by looking at the files modified by @aiRoNe_fx I was able to lower the influence of the moon on overall lighting in the sim, with truesky enabled.  This way you still get some light from the moon from different phases, but a realistic amount.  Clear your shaders or it won't work.

The first file you need to mod is FuncLibrary.fxh, this one controls the VC lighting and building textures, runways, etc.

Find this code:

#if defined(SHD_VERTICAL_NORMAL)
    const float fDotSun = max(cb_mSun.mDirection.y, 0);
    const float fDotMoon = max(cb_mMoon.mDirection.y, 0);
#else
    const float fDotSun = saturate(dot(vNormalWS, normalize(cb_mSun.mDirection)));
    const float fDotMoon = saturate(dot(vNormalWS, normalize(cb_mMoon.mDirection)));
#endif

    float3 diffuseLighting = (shadowContrib * (cb_mSun.mDiffuse.xyz * fDotSun)) + 
                             (shadowContrib * (cb_mMoon.mDiffuse.xyz * fDotMoon));

    return diffuseLighting + cb_mCombinedAmbient.rgb;

Replace it with this:

#if defined(SHD_VERTICAL_NORMAL)
    const float fDotSun = max(cb_mSun.mDirection.y, 0);
    const float fDotMoon = max((cb_mMoon.mDirection.y * 0.1), 0);
#else
    const float fDotSun = saturate(dot(vNormalWS, normalize(cb_mSun.mDirection)));
    const float fDotMoon = saturate(dot(vNormalWS, normalize(cb_mMoon.mDirection * 0.1)));
#endif

    float3 diffuseLighting = (shadowContrib * (cb_mSun.mDiffuse.xyz * fDotSun)) + 
                             (shadowContrib * (cb_mMoon.mDiffuse.xyz * 0.1 * fDotMoon));

    return diffuseLighting + cb_mCombinedAmbient.rgb;

 

The second file is PBRBase.fx, this one seems to control the lighting on the outside of the aircraft.

Find this code:

float3 moonContrib = DirectionalLightingPBR(cb_mMoon, pbrValues);

Replace it with this code:

float3 moonContrib = DirectionalLightingPBR(cb_mMoon, pbrValues) * 0.1;

The last file is Terrain.fx, this controls the terrain brightness

Find this code:

float3 sunContrib = DirectionalLightingPBR(cb_mSun, pbrValues);
    float3 moonContrib = DirectionalLightingPBR(cb_mMoon, pbrValues);
    
    color.rgb = (sunContrib + moonContrib)* shadowContrib;

Replace it with this:

float3 sunContrib = DirectionalLightingPBR(cb_mSun, pbrValues);
    float3 moonContrib = DirectionalLightingPBR(cb_mMoon, pbrValues) * 0.1;
    
    color.rgb = (sunContrib + moonContrib)* shadowContrib;

 

------------------------------------------------------------------------------------------------------------

As you can see its quite simple, we are just adding a multiplier, play with it to suit your tastes. I think this covers all of the scenery and objects, let me know if I missed anything.  Remember to clear your shader cache or the tweaks will not show up.    

 

  • Like 3

 

Lian Li 011 Air Mini | AMD 7950X3D | Asus ROG STRIX B650E-F | Arctic Cooling Liquid Freezer II 280mm RGB | 2x32GB G.Skill DDR5-6000 | ASUS TUF RTX 4090 | Seasonic Prime Platinum 1000W | Varjo Aero

 

Share this post


Link to post
16 hours ago, GSalden said:

True Sky has its own sky, clouds, sun and moon which cannot be changed by modifying the P3D shaders.

faulted 😄

Share this post


Link to post
33 minutes ago, aiRoNe_fx said:

faulted 😄

You cannot change the way sun, moon and clouds look with EA on. 

You can change the amount of overall brightness on the ground/objects, like saturation and shadows.

Hopefully v5.1 will have  EA improved ....

Edited by GSalden

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
4 hours ago, GSalden said:

You cannot change the way sun, moon and clouds look with EA on. 

You can change the amount of overall brightness on the ground/objects, like saturation and shadows.

Hopefully v5.1 will have  EA improved ....

You mean 5.2 Gerard.... :-) 😉


Regards,

Marcus P.

xaP1VAU.png

Share this post


Link to post
3 minutes ago, mpo910 said:

You mean 5.2 Gerard.... 🙂😉

Yep, you’re right Marcus 🤤


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

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.
×
×
  • Create New...