LWRPShaders

by beinteractive

beinteractive / LWRPShaders

A collection of high customizable unlit shaders for Lightweight Render Pipeline

126 Stars 8 Forks Last release: Not found 28 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Lightweight Render Pipeline Shaders

"Lightweight Render Pipeline Shaders" is a collection of shaders designed for Unity 2018 Lightweight Render Pipeline. It's especially useful for VFX and particles.

All shaders are fully customizable and GPU Instancing / GPU Instancing Particles friendly.

2018-04-04 14 09 07 2018-04-04 14 09 52

Available Shaders

  • Lightweight
    • Unlit
      • Color
      • Gradient
      • Texture
      • Texture and Color
    • Particles

Features

Basic Parameters

2018-04-04 14 18 37

This section contains shader specific parameters. Basically, color and texture.

Alpha Clip

2018-04-04 14 18 50

If you check

Alpha Clip
, alpha clipping is enabled. A pixel with alpha that is less than threshold will be discarded.

Surface

2018-04-04 14 19 01

You can choose one of the following surface types:

  • Opaque
  • Transparent
  • Premultiply
  • Additive
  • Multiply

and

Src Blend
,
Dst Blend
,
Z Write
and
Premultiplied Alpha
values will automatically be configured to appropriate settings.

If you choose

Custom
, you can change that values as you like.

Cull

2018-04-04 14 19 13

You can choose a cull mode from:

  • Off
  • Front
  • Back

Default is

Back
.
Off
is for double sided material.

Z Test

2018-04-04 14 19 24

You can choose which compare function will be used for Z Test.

GPU Instaincing

2018-04-04 14 19 39

If you check

Enable GPU Instancing
, a material is automatically configured for GPU Instancing. If you use same mesh and the material with MeshRenderer for rendering, draw call will be automatically instanced.

Also if you check

Enable Per Instance Data
, you can store per-instance
Basic Parameters
via MaterialPropertyBlock.
// Set random colors but keep GPU Instancing
foreach (var g in gameObjects)
{
  var property = new MaterialPropertyBlock();
  property.SetColor("_Color", Random.color);
  g.GetComponent().SetProperty(property);
}

GPU Instancing Particle

All Particles shaders works correctly with GPU Instaincing in Particle System.

To enable GPU Instaincing in Particle System, use

Mesh
render mode and check
Enable GPU Instancing
in
Render
section of Particle System inspector.

Minimum

All features are implemented by shader variants. After compilation, code of non-used feature is efficiently striped!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.