Skip to content

Instantly share code, notes, and snippets.

@brianasu
brianasu / hexTileUnity.shader
Last active August 31, 2022 13:07
Hex tiling
Shader "Custom/hex tiling surface"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
_RotStrength ("Rot Strength", FLOAT) = 0
_FalloffContrast ("Falloff Contrast", FLOAT) = 0.6
@brianasu
brianasu / SPHBurst.cs
Created July 7, 2021 12:03
Simple example of Smooth Particle Hydrodynamics using Unity Jobs and Burst
// Smooth Particle Hydrodynamics using burst
// Requires native collections which is removed from unity 2020/2019. This has to be manually installed
// https://forum.unity.com/threads/visibility-changes-for-preview-packages-in-2020-1.910880/
// Burst and Mathematics needed
// @brianasu
using System.Collections.Generic;
using Unity.Burst;
using Unity.Collections;
using Unity.Jobs;