Seaside Studios
HomeOverviewFAQsContactReview
Sprite Shader
Sprite Shader
  • What is All In 1 Sprite Shader
  • Overview
  • First Steps (Must Read)
  • Render Pipeline And Post Processing Setup
  • Asset Component Features
  • Right Click Create Material
  • Asset Window
  • Textures Setup
  • Custom Sort Axis
  • Saving Prefabs
  • Sprite Atlases
  • How to animate effects
  • Scripting
  • How to Enable/Disable Effects at Runtime
  • Random Seed
  • Scaled Time
  • UI Masking
  • 2D Renderer URP Lights
  • 3D Lights
  • Unified Outline
  • Render Material To Image
  • Compatibility with other assets
  • Effects and Properties Breakdown
  • Considerations
  • Running out of Shader Keywords
  • FAQ (Frequently Asked Questions)
Powered by GitBook
On this page

Considerations

The shader uses compilation flags to enable and disable different effects, meaning that only the code of enabled effects is included in each compiled shader variant. This ensures the GPU only computes the necessary parts, significantly reducing unnecessary calculations and memory usage.

The shader code has been hand-written line by line and is fast, uses as little memory as possible, and has no conditionals. Additionally, Unity will batch instances of the same material and sprite into a single draw call. For other Renderers, a GPU Instancing Toggle is available in the Advanced Configuration of the Material Inspector.

PreviousEffects and Properties BreakdownNextRunning out of Shader Keywords

Last updated 7 months ago