Skip to content

Some meshes return false from CanApplySnowShader() when they should be true #8

@hakasapl

Description

@hakasapl

For example, consider the FORM ID 0401F9E4 from Dragonborn. This is swapped for a tundra rock in whiterun because the conditional model::must_only_contain_textureset(stat, { "Snow", "Mask" }) passes. This static does not have any snow material so the only way it would be considered for swap is if the above passes. It has a snow texture as an alternate texture, however, it does not have any snow material nor snowy mountain alternate textures for the mountains themselves.

Then, during CanApplySnowShader() that static returns SWAP_RESULT::kBaseFail because the base object (const auto base = util::get_original_base(a_ref)) does not equal static, because it was swapped and assumed to already be snowy.

Fixes include:

  • Create a better snowy version in SnowOverSkyrim.esp
  • Removing the base != a_static check in CanApplySnowShader(), though I'm not sure of the implications of doing that
  • More comprehensive lookup in get_snow_variants to account for cases like this - I have not given that much thought yet

Let me know what you think

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions