Aug
20
2016

Sprite Shader with Clip() *Discard pixels

Testing what happens if add clip(discard), remove transparency and remove color tint from default Sprite Shader..
Just wanted to see if there is big difference or not,
but seems like no huge difference on PC (asus laptop, gtx970m), unless you have thousands of sprites on screen (*will test on mobile later)

This thread says in mobile devices it might be worse performance to use Clip()..

Stats for test scene (20000 sprites overlapping, sprite texture: 128×128) *Using Unity 5.4.0p2

default-sprite-shader

sprite-shader-clip

sprite-shader-clip-no_transparency

Sprite used (sprite mesh type: full rect)

sprite 1

Shader sources

Sprites/Clip

Sprites/Clip-NoTransparency


Leave a comment

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.