Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Rain wetness effects #83

Merged
merged 29 commits into from
Sep 25, 2023

Conversation

TheRiverwoodModder
Copy link
Contributor

@TheRiverwoodModder TheRiverwoodModder commented Sep 6, 2023

Adds a rain wetness effect for VR and Flat:

  • Allows control of the specular light multiplier (how strong the specular light reflection is)
  • Allows control of the specular light power (a.k.a. the shininess)
  • Allows control of the diffuse light multiplier (so you can darken the diffuse color since light is being reflected in a less diffuse and more specular manner due to the layer of water)
  • Syncs with the weather transitions to fade in wetness ony after rain has started and to fade it out a little while after rain has ended.

closes #60

@TheRiverwoodModder TheRiverwoodModder changed the title Rain wetness effects feat: add Rain wetness effects Sep 6, 2023
Copy link
Collaborator

@alandtse alandtse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job. Will try to test tonight. Have you gotten any feedback?

package/SKSE/Plugins/CommunityShaders.json Show resolved Hide resolved
@doodlum
Copy link
Owner

doodlum commented Sep 7, 2023

Looks awesome! Minor nitpicks below:

bool IsOutdoors;
bool IsRaining;
bool EnableRainWetnessEffects;

Can replace with a single bool.

exp2(transitionCurveMultiplier * log2(perPassRainWetnessEffects[0].TransitionPercentage)));

Can do on the CPU instead.

@alandtse
Copy link
Collaborator

alandtse commented Sep 7, 2023

bool IsOutdoors; bool IsRaining; bool EnableRainWetnessEffects;

Isn't it two? I think we need to provide the enable/disable option; but agree that isOutdoors and isRaining should just collapse to isRaining. But ultimately, does it matter if it's 3 vs 1 bool?

@doodlum
Copy link
Owner

doodlum commented Sep 7, 2023

bool IsOutdoors; bool IsRaining; bool EnableRainWetnessEffects;

Isn't it two? I think we need to provide the enable/disable option; but agree that isOutdoors and isRaining should just collapse to isRaining. But ultimately, does it matter if it's 3 vs 1 bool?

It's just good housekeeping to keep the code as tight as possible, particularly with compilation speed issues. It's not at all critical, I can just fix it very quickly after merge if needed.

IsRaining/IsOutdoor/EnableRainWetness all go to only one path therefore all can be merged.

@TheRiverwoodModder
Copy link
Contributor Author

IsRaining/IsOutdoor/EnableRainWetness all go to only one path therefore all can be merged.

IsRaining should be completely replaced by IsOutdoors and shouldn't still exist. If you see it anywhere tell me. This value makes sure that it doesn't show wetness effects when you are in indoors.

EnableRainWetnessEffects is the user setting to toggle the effect on or off and as a result is separate.

@doodlum
Copy link
Owner

doodlum commented Sep 7, 2023

but you could just do EnableRainWetnessEffects && IsRaining && IsOutdoors on the CPU? it should have the same result

@TheRiverwoodModder
Copy link
Contributor Author

TheRiverwoodModder commented Sep 7, 2023

Yeah, good point. You would only need them both on the CPU side.

@TheRiverwoodModder TheRiverwoodModder marked this pull request as draft September 7, 2023 05:19
…ffect in the shader.

- Moved EnableRainWetnessEffects setting check to the CPU and it skips calculating anything when it is disabled.
- Moved the transition easing function to the CPU.
@TheRiverwoodModder TheRiverwoodModder marked this pull request as ready for review September 7, 2023 05:50
@TheRiverwoodModder TheRiverwoodModder marked this pull request as draft September 7, 2023 07:29
- Fixed bug in lighting.hlsl where Snow was having the effect applied to it and glowing during rain.
- String change in a tooltip
@TheRiverwoodModder TheRiverwoodModder marked this pull request as ready for review September 7, 2023 08:05
@TheRiverwoodModder TheRiverwoodModder marked this pull request as draft September 9, 2023 20:58
@TheRiverwoodModder TheRiverwoodModder changed the title feat: add Rain wetness effects feat: WIP add Rain wetness effects Sep 9, 2023
@alandtse alandtse changed the title feat: WIP add Rain wetness effects feat: add Rain wetness effects Sep 10, 2023
… transition values.

- Updated nighttime defaults
- Finished transition fix for negative precipitationBeginFadeIn values
@alandtse alandtse marked this pull request as ready for review September 25, 2023 01:57
@alandtse alandtse marked this pull request as draft September 25, 2023 01:58
@alandtse alandtse marked this pull request as ready for review September 25, 2023 02:56
@alandtse
Copy link
Collaborator

@doodlum Ok, I'd suggest a squash since much of the commit history isn't normalized.

@alandtse alandtse marked this pull request as draft September 25, 2023 03:01
@alandtse alandtse marked this pull request as ready for review September 25, 2023 03:06
@doodlum doodlum merged commit ac1ea90 into doodlum:dev Sep 25, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add weather to shaders
3 participants