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: static branching instead of macros #109

Merged
merged 17 commits into from
Sep 25, 2023
Merged

feat: static branching instead of macros #109

merged 17 commits into from
Sep 25, 2023

Conversation

doodlum
Copy link
Owner

@doodlum doodlum commented Sep 24, 2023

  • Only touches Lighting.hlsl and Water.hlsl because only those have a permutation problem right now.
  • Could reduce techniques further by checking for the improved snow shader, and modifying techniques as well as flags (50% smaller or more, with those changes on Lighting.hlsl)
  • Need to review performance changes. So far seems to be negligible ( < 0.05 ms )

@doodlum doodlum marked this pull request as ready for review September 24, 2023 23:52
@doodlum doodlum requested a review from alandtse September 24, 2023 23:52
@doodlum doodlum merged commit 5eeffaf into dev Sep 25, 2023
3 checks passed
alandtse added a commit to alandtse/skyrim-community-shaders that referenced this pull request Sep 25, 2023
alandtse added a commit that referenced this pull request Sep 25, 2023
alandtse added a commit to TheRiverwoodModder/skyrim-community-shaders that referenced this pull request Sep 25, 2023
doodlum pushed a commit that referenced this pull request Sep 25, 2023
* Early shader work on Rain Wetness Effects

* Added some comments

* Added the main files. Still need to figure out the last step and work through some bugs.

* Got the effect working end-to-end.

* No more conflict with LLF. Adding it to feature list for both VR and flat.

* Added fade-in / fade-out transitions for the rain effect to only get wet once it has been raining and take some time to dry after it is done raining

* Added tooltips to the feature menu

* style: 🎨 apply clang-format changes

* - IsRaining and IsOutdoors should no longer exist. Only using EnableEffect 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.

* style: 🎨 apply clang-format changes

* Bug fixes
- Fixed bug in lighting.hlsl where Snow was having the effect applied to it and glowing during rain.
- String change in a tooltip

* style: 🎨 apply clang-format changes

* Updated defaults for specular and diffuse multipliers to have a stronger wetness effect.

* Adding back in the snow fix that got undone in the merge.

* Added separate settings for effect at night vs during the day

* style: 🎨 apply clang-format changes

* Moved multiplier calculations to the CPU
- Also made min value for Shininess multiplier 0.5

* style: 🎨 apply clang-format changes

* Added a safeguard to prevent certain weathers from returning negative transition values.
- Updated nighttime defaults

* style: 🎨 apply clang-format changes

* Bug fix
- Finished transition fix for negative precipitationBeginFadeIn values

* style: 🎨 apply clang-format changes

* fix: fix compilation error in treelod

Fixes issue from #109

---------

Co-authored-by: TheRiverwoodModder <[email protected]>
Co-authored-by: Alan Tse <[email protected]>
Co-authored-by: alandtse <[email protected]>
@alandtse alandtse deleted the static-branching branch July 10, 2024 01:35
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.

2 participants