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

Add weather to shaders #60

Closed
alandtse opened this issue Aug 29, 2023 · 1 comment · Fixed by #83
Closed

Add weather to shaders #60

alandtse opened this issue Aug 29, 2023 · 1 comment · Fixed by #83
Labels
enhancement New feature or request

Comments

@alandtse
Copy link
Collaborator

Some potential starting points:
Per RiverwoodModder

This should be how to calculate it, I'm just not sure where in CS to put it, and how to make it available in lighting.hlsl
    // Papyrus Weather.GetClassification 
    int32_t GetClassification(TESWeather * weather)
    {
        const auto flags = *((byte *)weather + 0x66F);

        if (flags & 1)
            return 0;
        if (flags & 2)
            return 1;
        if (flags & 4)
            return 2;
        if (flags & 8)
            return 3;

        return 0xFFFFFFFF;
    }

    bool GetCurrentWeatherClassification(int32_t &classification)
    {
        const auto skyPtr = *g_skyPtr;
        if (skyPtr && skyPtr->currentWeather)
        {
            classification = GetClassification(skyPtr->currentWeather);
            return true;
        }
        return false;
    }
@alandtse
Copy link
Collaborator Author

Some potential work started here. https://github.com/ffarrell17/skyrim-community-shaders/tree/WeatherTOD

@alandtse alandtse added the enhancement New feature or request label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant