Skip to content

Instantly share code, notes, and snippets.

View mrpropellers's full-sized avatar
:shipit:

Devin M. mrpropellers

:shipit:
View GitHub Profile
@dorodo95
dorodo95 / GenerateVectorData.cs
Last active July 11, 2023 00:20
Object Smearing via Shader
using UnityEngine;
public class GenerateVectorData : MonoBehaviour
{
private SkinnedMeshRenderer m_mesh;
private Mesh skinnedMeshCache;
private Vector3[] vertexFrameCache1;
private Vector3[] vertexFrameCache2;
private Vector3[] vertexFrameCache3;
private ComputeBuffer vertexBuffer1;
inline float inverselerp(float min, float max, float x)
{
return (x - min) / (max - min);
}
float hash(float n)
{
return frac(sin(n)*43758.5453);
}
@MBoffin
MBoffin / Messenger.cs
Last active April 20, 2025 18:58
A very simple event management system for Unity.
/*
* Advanced C# messenger by Ilya Suzdalnitski. V1.0
*
* Based on Rod Hyde's "CSharpMessenger" and Magnus Wolffelt's "CSharpMessenger Extended".
* (Modified by Dylan Bennett to add Unity 2017+ Scene Management support and switch to enums
* instead of strings for names of events.)
*
* Features:
* Prevents a MissingReferenceException because of a reference to a destroyed message handler.
* Option to log all messages