]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Displacement map prototype (#26709)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Sat, 27 Apr 2024 06:03:58 +0000 (08:03 +0200)
committerGitHub <noreply@github.com>
Sat, 27 Apr 2024 06:03:58 +0000 (16:03 +1000)
commit2f7d0dedbded99a8f3f538c887c3c17aaa667501
tree961ea997c4a5d96a3b4256eca1faa202851fc21f
parentb4212a08f4cb335ee723fd5f52b88223465d7a29
Displacement map prototype (#26709)

Requires https://github.com/space-wizards/RobustToolbox/pull/5023

This uses the new engine features (above) to add a displacement map shader. This allows deforming a sprite based on another sprite.

Primary use case is automatically adapting human clothing sprites to different species, something we want to make species like Vox a reality.

A basic example of wiring this up with Vox has been added. The system is however incredibly simple and **will** need more work by a content developer to select and toggle displacement maps when appropriate. I am leaving that to somebody else. For example right now the displacement map is applied even if a species already has custom-fit sprites for a piece of clothing, such as the grey jumpsuit for Vox.

Basic Aseprite plugins to help with authoring displacement maps have also been made.
Content.Client/Clothing/ClientClothingSystem.cs
Content.Shared/Inventory/InventoryComponent.cs
Resources/Prototypes/Entities/Mobs/Species/vox.yml
Resources/Prototypes/Shaders/displacement.yml [new file with mode: 0644]
Resources/Textures/Mobs/Species/Vox/displacement.rsi/jumpsuit.png [new file with mode: 0644]
Resources/Textures/Mobs/Species/Vox/displacement.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Shaders/displacement.swsl [new file with mode: 0644]
Tools/SS14 Aseprite Plugins/Displacement Map Flip.lua [new file with mode: 0644]
Tools/SS14 Aseprite Plugins/Displacement Map Visualizer.lua [new file with mode: 0644]