Skip to content

[Terrain] Refactor so tmat use Texture instead of string - #11673

Open
PolEpie wants to merge 4 commits into
Facepunch:masterfrom
PolEpie:terrain-tmat-texture
Open

[Terrain] Refactor so tmat use Texture instead of string#11673
PolEpie wants to merge 4 commits into
Facepunch:masterfrom
PolEpie:terrain-tmat-texture

Conversation

@PolEpie

@PolEpie PolEpie commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Thanks for contributing to s&box ❤️
Please fill out the sections below to help us review your change efficiently.


Summary

Before you could only put path to a texture and it fetched it, but no operation were possible unlike what Decals have with builtin Texture type

Motivation & Context

I wanted a way to add roughness easily #11510 but then wheatley point out that adding this feature would be better than just a roughness slider

Implementation Details

So i did a huge refactor cause we gotta do a json upgrade, but basically i changed every slot for Texture type, a upgrader and i did change how we generate the texture then, so i unify the template (thx jean claude) and create Bitmap.PackChannel so we can build the baked texture easily

Screenshots / Videos (if applicable)

Now :
image

Checklist

  • Code follows existing style and conventions
  • No unnecessary formatting or unrelated changes
  • Public APIs are documented (if applicable)
  • Unit tests added where applicable and all passing
  • I’m okay with this PR being rejected or requested to change 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant