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





