Skip to main content
16 votes
Accepted

Texture atlas vs. array-texture: how differently are they handled by CPU and GPU and how that impacts performance?

As noted in the comments above, performance is going to depend on implementation, your particular hardware, and what you're trying to do with the textures, so the only reliable answer there is to ...
DMGregory's user avatar
  • 135k
6 votes

What is the difference between a sprite sheet and a texture atlas?

A sprite sheet and texture atlas are nearly the same. They are both bitmap image files (jpg, png, etc.) that contain multiple smaller images, usually in a grid, that are indexed and displayed using ...
ow3n's user avatar
  • 246
6 votes

How do you handle edges on textures that join adjacent textures?

You've accurately identified the reason why it's better to store textures like this in a texture array / array texture, where supported, rather than a texture atlas. In a texture array, each image ...
DMGregory's user avatar
  • 135k
3 votes

Slicing irregular spritesheet (automatically?)

Since you found the picture online, without any json file attached or any other information, its not possible to cut this into multiple sprites automatically. You'd ...
Tom Tsagkatos's user avatar
3 votes
Accepted

Learning how to make imposters manually in Unity - how to render an object to a texture not what camera sees?

There are a variety of different imposter techniques. Level of detail is probably the easiest to achieve, but has two main drawbacks. The noticeable 'pop' effect when you swap between low and high ...
Reuben Crimp's user avatar
3 votes

Removing texture wrapping artifacts in OpenGLES

I figured out what was going on. The problem was not floating point precision, and not that I needed to make my own mipmaps to blend each level correctly. There were actually 2 problems: I was ...
AldaronLau's user avatar
2 votes

Player customization of entity and handling textures

I think the best way to handle it would be to create an atlas at runtime. Maybe by having it compile once a player saves their customizations in the customizing menu. It would be the easiest in the ...
basklein's user avatar
  • 416
2 votes
Accepted

Slicing irregular spritesheet (automatically?)

There is the way, which is partially automated: Open sprite sheet with Photoshop Using the slice tool make one big slice that'll contain the entire image Right-click it and split this slice into a ...
badunius's user avatar
  • 166
2 votes
Accepted

OpenGL tile map rendering with 1 quad for all tiles and 1 texture atlas

I suggest you to read about the vertex input layout and geometry shaders. In general: define your goal first, let's say the goal is to use only one draw call and least vertexbuffer updates because ...
D3d_dev's user avatar
  • 338
2 votes
Accepted

How to render a trimmed sprite?

What you have to do is roughly the following: Pretend that your sprite has the original size in your game. This is important to keep animations aligned. Instead of rendering the original sprites' ...
Andreas Löw's user avatar
2 votes

Textures in build duplicated, despite they're packed into atlases

Here's an official answer. Any assets inside the Resources folder (including Sprites and Atlases regardless of being packed) will always be exported. This is by design. So when we make a ...
Jacob's user avatar
  • 2,552
2 votes

Slicing irregular spritesheet (automatically?)

You can use Leshy's tools to split non uniform spritesheets: https://www.leshylabs.com/apps/sstool/ Your spritesheet is 32x32. I've used it before:
Sean Morris's user avatar
2 votes
Accepted

Using ID3D11DeviceContext::Map to update a dynamic texture results in offset or incomplete data

Check the returned pitch from your map call - you're assuming it's width * 4 (for 32-bit RGBA) but it may not be (particularly if your texture is not a power of 2 or it's width is not a multiple of 4)....
Maximus Minimus's user avatar
2 votes
Accepted

Should I be worried about textures higher than 4K?

You'll probably be fine with textures up to 16384x16384 on modern hardware as that's the limit in DX11. For older hardware (DX9 era), you probably want to set the limit at 2048x2048. The reason that ...
Adam's user avatar
  • 7,384
2 votes
Accepted

why One big texture frames is consuming more RAM compared to be divided into single frame ones

There is no discrepancy in RAM usage using a texture-atlas or multiple texture per frame/sprite. The discrepancy that i had it was a small bug that instead of adding one for a remainder, it was adding ...
Raffaello's user avatar
  • 125
1 vote

Animate some tiles of tile map

I'd recommend doing this in your shader. Arrange your atlas so that subsequent frames of each animation are arranged consecutively in a row. No duplication of non-animated tiles required. Use 3D UVW ...
DMGregory's user avatar
  • 135k
1 vote

How can I pack repeated textures into one texture efficiently?

Since the question is about "efficiently" packing a mix of repeated and non-repeated textures into a texture atlas, the answer is: most likely no, you can't. As DMGregory said Texture Arrays are ...
Stephane Hockenhull's user avatar
1 vote
Accepted

Tools or techniques for UV unwrapping/texturing terrain with features such as roads?

It's UV-mapping. There are no rules to say it has to be neat, it is just preferred and encouraged by most to have a neat UV layout. UV-mapping is about making a part of a texture show on a certain ...
sambler's user avatar
  • 366
1 vote
Accepted

Combining multiple diffuse textures into one leaves strange distortions?

DMGregory's suggestion to use a different format is simple and straight forward. So perhaps try that first and see if it solves your issue. However, if you for some reason want to keep using PNG, you ...
Morten's user avatar
  • 616
1 vote

Combining multiple diffuse textures into one leaves strange distortions?

This often happens when saving in PNG format. As Morten Andersen points out, those streaky stripes are a telltale sign of PNG compression in zero-alpha areas. The reason is that PNG exporters assume ...
DMGregory's user avatar
  • 135k
1 vote

limits of tiles on tilemap, for mobile devices?

The limits are more likely to come from the details of how you render & process the tiles, rather than some universal cutoff number. If you're "baking" your tilemap to a pre-assembled image, then ...
DMGregory's user avatar
  • 135k
1 vote

Is there a tool to automatically pack individual textures into one big png?

Another option is crunch which is a free open source cli tool originally designed for Celeste
Secret's user avatar
  • 133
1 vote

Unity shaders - blend edges of tile textures stored in an atlas

It was suggested to me to create special "edge tile" textures and use them for the edge tiles, but I would rather avoid that because it would require creating an edge tile texture for every 2 possible ...
Tom Tsagkatos's user avatar
1 vote
Accepted

Reduce texture switches in UI

First thing is to use distance field font rendering and pack every glyph into a single texture using all 4 channels as individual gray-scale textures. This allows you to use only 1 font size in your ...
Stephane Hockenhull's user avatar
1 vote

LibGDX: TextureRegion renders correctly, but .getTexture() doesn't

Ok, problem solved. Trying with bigger objects from the same texture atlas, I see that getTexture() actually returns the whole atlas image, and this is by design, see eg this question
persson's user avatar
  • 221
1 vote
Accepted

Multiple textures/texture atlas

I would say that a few years ago, creating a texture atlas would have been better, however now, I believe that GPUs would be more optimal at sampling from multiple different textures. There are a few ...
MishMash95's user avatar
1 vote
Accepted

How do I import a Spine animation project into DragonBones when DB cannot read the atlas file?

So, after hours of hit and trials, here are my OBSERVATIONS when importing spine project in DragonBones. (1) You cannot import .atlas file and its sprite sheet ...
master_dodo's user avatar
1 vote

Why some textures become black in GDX

https://github.com/mattdesl/lwjgl-basics/wiki/LibGDX-Textures Read this and especially Hardware Limitations part. Each phone/pc has it's max_texture_size and if exceeded - will print a black texture.
Jacob's user avatar
  • 2,552

Only top scored, non community-wiki answers of a minimum length are eligible