r/Unity2D • • 4h ago

Showcase Taking my 2D sprites into a 2.5D dragon fight in Unity

10 Upvotes

Been working on Throneward’s 2.5D battle scene. Here’s the walk up to a black dragon and the transition into the fight. Pretty happy seeing it all together now.

Encounter staged for this clip; loading shortened and battle HUD hidden.


r/Unity2D • • 22h ago

Free Asset/Tool Anyone want some free 2D outdoor tiles? All handmade, no AI.

Post image
10 Upvotes

I made these in Gimp to use to test out my camera system, but figured that people may get some good use out of them. I've put them on the asset store for free. Every sprite was made by hand by me. In addition to ground tiles there are paths, water, trees, rocks, and a few other fun little things like the snowman.

There's a quick video on the store page that shows one way that you could potentially put them together. The pack also includes a few little neat things like a script to animate the water tiles, to create waves at the shorelines, to blend together tiles at the edges of biomes, etc.

If you use these tiles to make something, I'd love to see it!

Here's the link to the asset store listing if anyone is interested: https://assetstore.unity.com/packages/2d/environments/timbeaux-s-2d-worldbuilding-toolkit-412078


r/Unity2D • • 20h ago

Question/Help Why is my shader graph preview of this sprite different compared to the normal sprite preview?

1 Upvotes
Sprite in Libresprite
Sprite ingame
Sprite in shader graph

I'm trying to add a shader to my sprite. The sprite is clean in both libresprite and ingame, but when i set it as the default texture in the shader graph main texture, dots show up, and it is the same for 90% of my sprites. Using this material for my sprite means the dots show up there too. I have no idea where these came from. Any help would be appreciated.

Edit : (Comment from unity forums) :

The extra dots are not a bug in your shader or in Unity.

They come from the source texture itself.

Where the dots actually come from

When you export a sprite with transparency from LibreSprite (or Aseprite, Photoshop, etc.), the fully transparent pixels still contain RGB color data. Most image editors do not zero out the RGB channels of transparent pixels. They just set the alpha to 0 and leave whatever color was there before (or random leftover values from anti-aliasing, previous layers, compression, etc.).

Unity’s normal Sprite Renderer and the built-in sprite shaders always multiply by alpha, so those leftover colors become invisible.

Shader Graph’s Sample Texture 2D preview (and any material that doesn’t properly use the alpha) simply shows the raw RGB values. That’s why you suddenly see the dots only when you look at the texture inside Shader Graph.

This is extremely common with pixel-art sprites. Roughly 90% of transparent PNGs have some amount of this “garbage” RGB data in the transparent areas.

Why connecting Alpha fixes it

Once you plug the A output into the Fragment’s Alpha, the shader starts discarding/masking those pixels the same way the normal sprite material does. The dots disappear because their alpha is 0.

You don’t need any special workaround nodes (multiply RGB by alpha, Branch, etc.) unless you specifically want a cleaner preview inside the graph. The normal connection is the correct and intended way.