wellmorq / per-renderer-data

An simple tool for serialization and comfortable use of MaterialPropertyBlocks from the Unity editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Per Renderer Data

This tool is designed for convenient use of MaterialPropertyBlock from the Unity editor. Think of it as overriding a material for a specific Renderer.

Use it in cases when you don't want to create new material every time or for optimization purposes (GPU Instancing).

Base case:

  1. Add the component to the GameObject.
  2. Click the Add button
  3. Select the property that you want to override.

The Per Renderer block - all properties that have the PerRenderer or PerRendererData attribute fall here.

If you want to override these properties without breaking gpu instancing - you should add gpu instancing support for shader properties yourself, as it stated [here] (https://docs.unity3d.com/Manual/GPUInstancing.html).

By the way, I add samples that have simple shader example with instancing support.

2 2

License

The software is released under the terms of the MIT license.

No personal support or any guarantees.

About

An simple tool for serialization and comfortable use of MaterialPropertyBlocks from the Unity editor

License:MIT License


Languages

Language:C# 82.0%Language:ShaderLab 18.0%