Skip to content

Instantly share code, notes, and snippets.

View dorodo95's full-sized avatar

Rodolfo dorodo95

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;
Shader "Custom/LED"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_PixelTex ("Pixel Texture", 2D) = "white" {}
_Pixelate ("Pixel Resolution", Range(0.03,1)) = 1
_CameraMaskFallof ("Camera Fallof", Float) = 4
}
SubShader
@dorodo95
dorodo95 / .compute
Created February 12, 2020 03:51
Compute shader issue (.compute)
#pragma kernel StartKernel
#pragma kernel StepKernel
RWTexture2D<float4> _outTex;
RWTexture2D<float4> _inTex;
float hash(float2 uv)
{
return sin(dot(float2(49104.3, 13059.2), uv));
}
@dorodo95
dorodo95 / .cs
Created February 12, 2020 03:50
Compute Shader Issue (.cs)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CCA2DCustom : MonoBehaviour
{
//Rendering stuff
private RenderTexture inRT;
private RenderTexture outRT;