Skip to content

Instantly share code, notes, and snippets.

View ghysc's full-sized avatar

Cyril Ghys ghysc

View GitHub Profile
@ghysc
ghysc / MaterialGradientDrawer.cs
Last active June 9, 2022 13:19 — forked from totallyRonja/MaterialGradientDrawer.cs
A Material Property Drawer for the [Curve] attribute which lets you edit curves and adds them to the shader as textures. Forked from Ronja's Material Gradient Drawer. More information here: https://twitter.com/CyrilJGhys/status/1529496742642728964 and here: https://twitter.com/totallyRonja/status/1368704187580682240
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
public class MaterialCurveDrawer : MaterialPropertyDrawer {
private int resolution;