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

Displacement maps big update #30093

Merged

Conversation

TheShuEd
Copy link
Member

@TheShuEd TheShuEd commented Jul 16, 2024

About the PR

The displacement maps is a very powerful tool that is not fully integrated into the game. This pr is making some changes, making it easier to use and expanding its capabilities.

  • The function of applying the displacement map is put into a separate system, and is easy to reuse at different points in the game.
  • You no longer need to write a bunch of parameters passed to the shader every time.
  • added support for maps of different sizes. A 32x32 or 48x48 or 64x64 (or any other) resolution, if created, can now be modified with a corresponding displacement maps of the same size via prototypes.
  • clothing that uses special species clothing sprites will ignore displacement maps, favoring hand-drawn sprites.
  • inhand item sprites got support for displacement maps (not used anywhere, but verified in my fork that it works)
  • Removed stencil masks, and replaced with displacement maps for the different genders of the species. (the map is better than the mask in all parameters, and now the system works for any layers, not just uniforms)
  • added shoes and ears voxes displacement maps

Breaking changes

the format for describing displacement maps in the species prototypes has been changed:
from

    displacements:
      jumpsuit:
        layer:
          sprite: Mobs/Species/Vox/displacement.rsi
          state: jumpsuit
          copyToShaderParameters:
            # Value required, provide a dummy. Gets overridden when applied.
            layerKey: dummy
            parameterTexture: displacementMap
            parameterUV: displacementUV

to

    displacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: Mobs/Species/Vox/displacement.rsi
            state: jumpsuit

Changelog
absolutely no changes inside the game.

@TheShuEd TheShuEd requested a review from DrSmugleaf as a code owner July 16, 2024 11:43
@github-actions github-actions bot added Changes: Sprites Changes: Might require knowledge of spriting or visual design. S: Needs Review Status: Requires additional reviews before being fully accepted labels Jul 16, 2024
Copy link
Contributor

github-actions bot commented Jul 16, 2024

RSI Diff Bot; head commit decc27f merging into 6005a9f
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Mobs/Species/Human/displacement.rsi

State Old New Status
jumpsuit-female Added

Resources/Textures/Mobs/Species/Vox/displacement.rsi

State Old New Status
ears Added
shoes Added

Edit: diff updated after decc27f

@TheShuEd
Copy link
Member Author

now girls can be made to look very different in silhouette from men.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jul 19, 2024
@github-actions github-actions bot removed the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jul 19, 2024
@TheShuEd TheShuEd merged commit 918709c into space-wizards:master Jul 23, 2024
13 checks passed
@Plykiya
Copy link

Plykiya commented Jul 23, 2024

you didn't update the comment after changing to pixelspermeter!

themias pushed a commit to themias/space-station-14 that referenced this pull request Aug 9, 2024
* split logic into own system

* add support for different size displacement maps

* some clothes may not use displacement maps

* displacement maps spport hand sprites

* Update DisplacementMapSystem.cs

* rename things

* fuck stencilmask

* fix bugs

* no masks

* Update jumpsuits.yml

* fix species specific sprites

* Update ClothingSystem.cs

* shoes + ears displacement, some bugfix

* Update DisplacementMapSystem.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: Sprites Changes: Might require knowledge of spriting or visual design. S: Needs Review Status: Requires additional reviews before being fully accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants