This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////////////////////////// | |
// ABOUT: A unity Shader .cginc to draw numbers in the fragment shader | |
// AUTHOR: Freya Holmér | |
// LICENSE: Use for whatever, commercial or otherwise! | |
// Don't hold me liable for issues though | |
// But pls credit me if it works super well <3 | |
// LIMITATIONS: There's some precision loss beyond 3 decimal places | |
// CONTRIBUTORS: yes please! if you know a more precise way to get | |
// decimal digits then pls lemme know! | |
// GetDecimalSymbolAt() could use some more love/precision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The contents of this file is free and unencumbered software released into the | |
// public domain. For more information, please refer to <http://unlicense.org/> | |
using System; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
using UnityEngine; | |
using UnityEngine.Assertions; | |
public class SpatialHash<T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: Unlicense OR CC0-1.0+ | |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
// ReSharper disable MemberCanBePrivate.Global | |
namespace Loggers | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT License | |
Copyright (c) 2021 Noé Charron | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
public class MaterialGradientDrawer : MaterialPropertyDrawer { | |
private int resolution; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alpha blending test | |
// more info: https://twitter.com/FreyaHolmer/status/1293163103035817985 | |
// add this script to an object in the scene, | |
// then edit src and dst to see - will it blend? | |
using UnityEngine; | |
[ExecuteAlways] | |
public class BlendTest : MonoBehaviour { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[RequireComponent( typeof(Camera) )] | |
public class FlyCamera : MonoBehaviour { | |
public float acceleration = 50; // how fast you accelerate | |
public float accSprintMultiplier = 4; // how much faster you go when "sprinting" | |
public float lookSensitivity = 1; // mouse look sensitivity | |
public float dampingCoefficient = 5; // how quickly you break to a halt after you stop your input | |
public bool focusOnEnable = true; // whether or not to focus and lock cursor immediately on enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE DONT put in an editor folder! | |
using UnityEngine; | |
public class AutohookAttribute : PropertyAttribute | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/StencilMask" { | |
Properties { | |
_StencilMask("Stencil mask", Int) = 0 | |
} | |
SubShader { | |
Tags { | |
"RenderType" = "Opaque" | |
"Queue" = "Geometry-100" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is in the public domain. Where | |
// a public domain declaration is not recognized, you are granted | |
// a license to freely use, modify, and redistribute this file in | |
// any way you choose. | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// Unity remake of a fake volumetric light glow effect |
NewerOlder