Skip to content

Instantly share code, notes, and snippets.

@torcado194
torcado194 / cleanEdge-shadertoy.glsl
Last active May 15, 2024 16:30
cleanEdge, a pixel art upscaling algorithm for clean rotations
/*** MIT LICENSE
Copyright (c) 2022 torcado
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
@tarocco
tarocco / AnimatorEvaluate.cs
Last active March 11, 2022 05:03
Component to evaluate Unity Animator in-editor with the press of a button by calling Animator.Update(0f) exactly once. Useful for applying one frame of animation to an object, such as a model pose, and saving it permanently in the scene. Supports undo.
using System;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
[RequireComponent(typeof(Animator))]
public class AnimatorEvaluate : MonoBehaviour
{
}
@tarocco
tarocco / Unity Encapsulation Tutorial.md
Last active March 11, 2022 05:05
Best practices for making your serialized classes code & editor-friendly!

Unity Encapsulation Tutorial

by Tarocco

Fields and Properties

Unity does not serialize properties or any static members. You have some options for serializing member fields.

Field-only