SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   Can anyone tell me how to increase value and reduce the value? (https://www.subsim.com/radioroom/showthread.php?t=166033)

W_clear 03-24-10 09:05 AM

Can anyone tell me how to increase value and reduce the value?
 
// 6. horizont haze
float hazeMask = smoothstep(1, 0, saturate(In.eyeDir.w * g_skyHazeHeight.x - g_skyHazeHeight.y)*2);
color = lerp(color, g_skyHazeColor, hazeMask);


THANKS!:salute:

Seeadler 03-24-10 09:25 AM

which value?

kriller2 03-24-10 09:49 AM

@Seeadler
I think that W_clear want's to decrease/increase the fog value (colour maybe?) to get rid of the line seen in the horizont in the other thread :hmmm: It seems editing in SH5 has gone from complicated to more complicated? :o :har:

Captain von Keldunk 03-24-10 11:52 AM

Quote:

Originally Posted by kriller2 (Post 1331561)
@Seeadler
I think that W_clear want's to decrease/increase the fog value (colour maybe?) to get rid of the line seen in the horizont in the other thread :hmmm: It seems editing in SH5 has gone from complicated to more complicated? :o :har:

HMM I myself now use stock SkyTopColor as fog color, not released it yet,
works well with my mod as I get dark nights with redused HDRMaxLumScale.:hmmm:

gutted 03-24-10 12:10 PM

Quote:

Originally Posted by W_clear (Post 1331508)
// 6. horizont haze
float hazeMask = smoothstep(1, 0, saturate(In.eyeDir.w * g_skyHazeHeight.x - g_skyHazeHeight.y)*2);
color = lerp(color, g_skyHazeColor, hazeMask);


THANKS!:salute:


It's linear interpolation. Without seeing the specifics of their implemenation, and i can only guess.

the first function call is for finding out how much the color will change, and the second call is doing the actual color interpolation.

1. smoothstep:
The first two arguements define the Max/Min of the step ( 1 & 0 would mean between full color and no color) and the last part acts as a "weight" for the "step".

2. Lerp:
Is the actual interpolation. It's changing "color" towards "g_skyHazeColor" by "hazeMask" amount... and then returning it back into the "color" variable.

So if you need to change how the interpolation is done between the sky and the fog... you'd probably want to alter the way "hazemask" gets computed. And that would be done by adjusting the weight (3rd portion) of the smoothstep function call. Probalby leave the saturation part alone and adjust the multiplier to the right of it some.

Or

If you want less overall haze color, you could probably turn it down by change the 1 in smoothstep to like 0.8 or 0.5 or something. Just fiddle with it.

Captain von Keldunk 03-24-10 02:56 PM

color banding
 
I made skytop, bottom and fog colors same, this way I got rid of most
color banding in the sky, only sun, moon and horizon haze make some.
Good enough for me.:up:
Also I made underwater up, down and fog colors same
and got rid of underwater color banding for good. :woot:
Released it with SH5EnvMod V1.2.

W_clear 03-24-10 07:48 PM

Quote:

Originally Posted by Seeadler (Post 1331528)
which value?


Kriller2 the best understanding of the meaning of my ChineseEnglish .

Please help me.Mr. Seeadler:salute:


All times are GMT -5. The time now is 09:07 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.