Skip to content

Instantly share code, notes, and snippets.

View viliwonka's full-sized avatar

Vili Volčini viliwonka

View GitHub Profile
@forkercat
forkercat / ShaderInteractor.cs
Last active August 14, 2023 05:06
Making Sky's Stylized Grass with Compute Shader in Unity. Check out junhaow.com for an article! Update: https://www.patreon.com/posts/urp-compute-54164790
// Credit: https://www.patreon.com/posts/grass-geometry-1-40090373
using UnityEngine;
public class ShaderInteractor : MonoBehaviour
{
private void Update()
{
// Set player position
Shader.SetGlobalVector("_MovingPosition", transform.position);