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 support for unshaded displacement maps #34876

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ruddygreat
Copy link

@ruddygreat ruddygreat commented Feb 4, 2025

About the PR

Made a couple tiny changes to DisplacementMapSystem & DisplacementData to allow displacements to propely be applied to unshaded layers on a sprite.

Why / Balance

It's a small thing that's been annoying the artists on the fork I play on + it seems a few people have been talking about it in the main wizden discord.

Technical details

Added the DisplacedStencilDrawUnshaded shader, a copy of DisplacedStencilDraw with light_mode set to unshaded.
Added the ShaderOverrideUnshded field to DisplacementData that points to the new shader.
Added a check to DisplacementMapSystem to use the new shader if the original layer was unshaded.

To use it, all you need to do is specify an unshaded layer in the clothingComponent, like so

  - type: Clothing
    sprite: Clothing/Head/Hats/beret_engineering.rsi
    clothingVisuals:
      head:
      - state: equipped-HELMET
        shader: unshaded

Media

old (left) & new (right), using the above example clothing comp

displacementunshadeddemo

Requirements

Changelog

no CL; not player-facing enough?

@github-actions github-actions bot added Changes: Shaders Changes: Might require knowledge of shaders. size/S Denotes a PR that changes 10-99 lines. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Feb 4, 2025
@TheShuEd
Copy link
Member

TheShuEd commented Feb 4, 2025

Looks fine! Can you please attach to PR description a YML example of using this new feature?

@ruddygreat
Copy link
Author

Looks fine! Can you please attach to PR description a YML example of using this new feature?

Example added! Also changed the example screenshot to something more obvious.

@ArtisticRoomba ArtisticRoomba added T: New Feature Type: New feature or content, or extending existing content D3: Low Difficulty: Some codebase knowledge required. S: Needs Review Status: Requires additional reviews before being fully accepted A: Art Area: Art with no implications for other areas. P3: Standard Priority: Default priority for repository items. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Art Area: Art with no implications for other areas. Changes: Shaders Changes: Might require knowledge of shaders. D3: Low Difficulty: Some codebase knowledge required. P3: Standard Priority: Default priority for repository items. S: Needs Review Status: Requires additional reviews before being fully accepted size/S Denotes a PR that changes 10-99 lines. T: New Feature Type: New feature or content, or extending existing content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants