Optimized Health Bar Billboard Shader for SRP and URP

This package includes two shaders: one for SRP and one for URP. The health bar shader uses a quad and a shader to render the effect, making it an optimized method for rendering character health bars. It supports GPU instancing and uses just 4 vertices and a single batch to render 3 different bars. The shader uses two textures: one for the background and one for detecting the different bars. The second texture is a splat map where each channel selects a specific bar, allowing for independent control of each bar's slider.

Shader Parameters:

  • Background texture
  • Splatmap texture
  • Smoothstep (sharp health bar edge)
  • Red, Green, Blue channels to handle 3 different bars
  • uvMin (to select the starting point of the bar)
  • uvMax (to select the end point of the bar)
  • Fill (to control the normalized value (between 0 and 1) of the bar)

Optimized Health Bar Billboard Shader for SRP and URP - Asset Store

πŸ€– Chat with AI

AI is typing

Suggested Posts

Toon Ramp Shader for SRP, URP, and HDRP

Toon Ramp Shader for SRP, URP, and HDRP Thumbnail

Stylized Foliage and Objects Shader for URP

Stylized Foliage and Objects Shader for URP Thumbnail

Procedural Planets for URP and HDRP

Procedural Planets for URP and HDRP Thumbnail

Materialize and Dissolve Shader Effect for Unity URP

Materialize and Dissolve Shader Effect for Unity URP Thumbnail

Crystal Shader for URP

Crystal Shader for URP Thumbnail

Hot Air Refraction for URP and HDRP

Hot Air Refraction for URP and HDRP Thumbnail