Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/beinteractive/LWRPShaders

A collection of high customizable unlit shaders for Lightweight Render Pipeline
https://github.com/beinteractive/LWRPShaders

graphics shader unity unity3d

Last synced: about 2 months ago
JSON representation

A collection of high customizable unlit shaders for Lightweight Render Pipeline

Awesome Lists containing this project

README

        

# 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
- Color
- Texture
- Textureless (Port from [ShurikenPlus](https://github.com/keijiro/ShurikenPlus))

## 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.

```C#
// 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!