Skip to content

Instantly share code, notes, and snippets.

View jpsarda's full-sized avatar

Jean-Philippe SARDA jpsarda

View GitHub Profile
@jpsarda
jpsarda / WaveExplo.shader
Last active August 3, 2022 05:10
Unity (pro) post processing explosion wave effect (need GoKit library). You call it like this : WaveExploPostProcessing.Get().StartIt(myVector2Position);
Shader "Custom/WaveExplo" {
Properties {
_MainTex ("", 2D) = "white" {}
_CenterX ("CenterX", Range(-1,2)) = 0.5
_CenterY ("CenterY", Range(-1,2)) = 0.5
_Radius ("Radius", Range(-1,1)) = 0.2
_Amplitude ("Amplitude", Range(-10,10)) = 0.05
}
SubShader {
@jpsarda
jpsarda / ImagePlane.cs
Created October 6, 2017 12:30
Build dynamically a plane mesh from its 4 corners position in world and displaying an image filling the plane .
using FuretCompany.Utils;
using UnityEngine;
public class ImagePlane : MonoBehaviour
{
public string imageResourceName;
protected Vector3 _topLeft;
public Vector3 topLeft { get { return _topLeft; } set { if (value != _topLeft) { _topLeft = value; _meshDirty = true; } } }
protected Vector3 _topRight;
public Vector3 topRight { get { return _topRight; } set { if (value != _topRight) { _topRight = value; _meshDirty = true; } } }