playcanvas / playcanvas/engine
Texture atlas features(like texture repeat) for materials
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
I tried to implement game with a lot of sprites within one texture as atlas and multiple materials with region cutting.
I use StandardMaterial props like diffuseMapTiling and diffuseMapOffset to slice specified region.
I set uv > 1 to some surface and expect tiled slice wrap's many times, but instead it's just extends texture to next tiles outside slicing region.
I see no way to achieve this without custom shader, but i think it's relative frequent case to add this functional to standard shader.
And even better implement 3d(not for 2d screen-space gui sprites) texture atlases into engine.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the StandardMaterial diffuseMapTiling and diffuseMapOffset entry points and how they affect texture coordinates in the standard shader. Compare the requested repeated atlas-region behavior with the current handling, and define completion around tiled regions staying within the selected atlas slice, including the proposed 3D texture-atlas case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100