Skip to content

Instantly share code, notes, and snippets.

View NeatWolf's full-sized avatar

NeatWolf NeatWolf

View GitHub Profile
@atyuwen
atyuwen / opt_fsr.fxh
Last active October 15, 2024 10:59
An optimized AMD FSR implementation for Mobiles
//==============================================================================================================================
// An optimized AMD FSR's EASU implementation for Mobiles
// Based on https://github.com/GPUOpen-Effects/FidelityFX-FSR/blob/master/ffx-fsr/ffx_fsr1.h
// Details can be found: https://atyuwen.github.io/posts/optimizing-fsr/
// Distributed under the MIT License. Copyright (c) 2021 atyuwen.
// -- FsrEasuSampleH should be implemented by calling shader, like following:
// AH3 FsrEasuSampleH(AF2 p) { return MyTex.SampleLevel(LinearSampler, p, 0).xyz; }
//==============================================================================================================================
void FsrEasuL(
out AH3 pix,
@noisecrime
noisecrime / Unity-AssemblyDefinitionDebugger.cs
Last active August 13, 2024 00:32 — forked from karljj1/Unity Assembly Definition Debugger.cs
Find out what assemblies are being built and how long each takes.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using UnityEditor;
using UnityEditor.Compilation;
using UnityEngine;
/// <summary>
/// NoiseCrimeStudio OneShots are single scripts that provide specific funactionality.
@ditzel
ditzel / MeshDestroy.cs
Created August 19, 2019 19:02
MeshDestroy => Put it on a game object with a mesh filter and renderer. Make sure to have read/write enabled on fbx import
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeshDestroy : MonoBehaviour
{
private bool edgeSet = false;
private Vector3 edgeVertex = Vector3.zero;
private Vector2 edgeUV = Vector2.zero;
@HAliss
HAliss / CurveDissolve.shader
Last active June 7, 2022 17:26
Creates a monochromatic texture with color values from a given animation curve
Shader "Custom/CurveDissolve"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Noise("Noise", 2D) = "white" {}
_CurveTexture("Curve texture", 2D) = "white" {}
_Cutoff("Cutoff", Range(0,1)) = 0
_Glossiness ("Smoothness", Range(0,1)) = 0.5
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FixLightMapTiling : MonoBehaviour {
public GameObject _getLightmapScaleObj;
public GameObject _setLightmapScaleObj;
public Vector4 _lightmapScalOffset;
public int _lightmapIndex;
void OnDrawGizmos()
{
@kajott
kajott / bluenoise.c
Created June 26, 2019 10:49
Blue Noise texture generation using the void-and-cluster algorithm
#if 0 // self-compiling code
gcc -std=c99 -Wall -Wextra -pedantic -Werror -g -O4 -march=native $0 -lm || exit 1
exec time ./a.out
#endif
// Blue Noise texture generation using the void-and-cluster algorithm
// implemented by Martin Fiedler <[email protected]>
// using an algorithm description written by Alan Wolfe:
// https://blog.demofox.org/2019/06/25/generating-blue-noise-textures-with-void-and-cluster/
@NeatWolf
NeatWolf / gmail-github-filters.md
Created May 1, 2019 13:14 — forked from ldez/gmail-github-filters.md
Gmail and GitHub - Filters

Gmail and GitHub

Create new filters and create new labels.

Pull Request

from:([email protected]) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed 1 commit." "pushed 2 commits." "pushed 3 commits."}

label: gh-pull-request

@bitinn
bitinn / .a-unity-git-config.md
Last active June 25, 2024 13:21
My Unity git config
@joshcamas
joshcamas / IsDirtyUtility.cs
Created March 18, 2019 14:44
Simple Utility script for Unity3D that allows access for "IsDirty" method for gameobjects.
using UnityEngine;
using UnityEditor;
using System.Reflection;
using System;
//Special thanks to Shamanim for solution
//https://forum.unity.com/threads/sorta-solved-check-if-gameobject-is-dirty.504894/#post-3967810
public class IsDirtyUtility
{
//Cached Value
@volblob
volblob / ScriptableObjectReload.cs
Created January 21, 2019 09:44
Code to illustrate new reloading of ScriptableObject in Unity 2019.1
using System.IO;
using UnityEngine;
using UnityEditor;
// Save this to a file named ScriptableObjectReload.cs and run this example with menu item "Examples" -> "Reload ScriptableObject Example"
public class ScriptableObjectReload : ScriptableObject
{
const string assetPath = "Assets/ScriptObject.asset";
public string stringValue;