Skip to content

Instantly share code, notes, and snippets.

View cortvi's full-sized avatar

Victor Navarro cortvi

View GitHub Profile
@cortvi
cortvi / !Refractive Surface Shader.md
Last active March 31, 2022 22:55
Custom refractive liquid surface shader
We couldn’t find that file to show.
@cortvi
cortvi / !Liquid Volume Shader.md
Last active June 18, 2024 06:46
Simple shader that imitates a liquid moving inside a vessel.

custom liquid shader cover image

@cortvi
cortvi / !Two-Sided Shader.md
Last active August 27, 2024 01:11
A PBR two-sided cloth shader that works correctly with Unity's lighting.

Extended from this article

two-sided custom shader cover image

@cortvi
cortvi / EnumExtension.cs
Last active October 20, 2018 11:55
Flag enums extension methods for Unity (if using .NET 3.5 or less)
/// Created by @cortvi
/// adapted code from:
/// https://stackoverflow.com/questions/28167873/custom-generic-setflag-unsetflag-extension-methods
using System;
using System.Globalization;
public static class Extension
{
/// <summary>
/// Usage: "if ( someEnum.HasFlag (someEnumFlag) ) {..}"
@cortvi
cortvi / SmartAnimator.cs
Last active February 17, 2023 10:49
Wrapper for Unity Animator class to better manage parameter values.
/// Written by @cortvi
using System.Collections.Generic;
using UnityEngine;
public class SmartAnimator : UnityEngine.Object
{
#region DATA
public Animator Animator { get; private set; }
private Dictionary<string, Param<float>> floats;
private Dictionary<string, Param<bool>> bools;
@cortvi
cortvi / !Collision Matrix.md
Last active August 11, 2023 19:50
Custom editor for Unity to make it easier to edit collision layer interactions.

Just download the script and put it in a "Editor" folder.