This file contains hidden or 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
| // | |
| // 1. Add a Quad in Unity | |
| // 2. Parent the quad under camera, to prevent frustum culling. | |
| // 3. Attach this shader. | |
| // | |
| Shader "Quad/Fullscreen" | |
| { | |
| Properties | |
| { | |
| } |
This file contains hidden or 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 "Milkbag/CurvatureImageEffect" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| _LightStrength ("LightStrength", Float) = 0.3 | |
| _DarkStrength ("DarkStrength", Float) = 0.3 | |
| _Spread ("Spread", Float) = 1.0 | |
| [Toggle(USE_MULTIPLY)] _UseMultiply("Use Multiply", Float) = 0 | |
| [Toggle(CURVATURE_ONLY)] _CurvatureOnly("Curvature Only", Float) = 0 |
This file contains hidden or 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; | |
| public class CustomParticleCulling : MonoBehaviour | |
| { | |
| public float cullingRadius = 10; | |
| public ParticleSystem target; | |
| CullingGroup m_CullingGroup; | |
| Renderer[] m_ParticleRenderers; |
This file contains hidden or 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.IO; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| public class UnityUtils: MonoBehaviour | |
| { | |
| [MenuItem("Tools/Find Broken GUIDs")] |
This file contains hidden or 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; | |
| public class CornerCheat : MonoBehaviour { | |
| public CircleCollider2D circle; | |
| public Rigidbody2D body; | |
| EdgeCollider2D edge; | |
| [Range(0, .2f)] public float distanceThreshold = .03f; | |
| [Range(0, 1)] public float dotThreshold = .96f; |
This file contains hidden or 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 "WorldNormalFromDepthTexture" | |
| { | |
| Properties { | |
| [KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0 | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
| LOD 100 |
This file contains hidden or 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 Felix Westin | |
| //Source: https://github.com/Fewes/MinimalAtmosphere | |
| //Ported to GLSL by Marcin Ignac | |
| #ifndef ATMOSPHERE_INCLUDED | |
| #define ATMOSPHERE_INCLUDED | |
| // ------------------------------------- |
This file contains hidden or 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
| /* | |
| * Used for culling tiles in a map renderer I wrote. | |
| * All tiles used geometry in the [-1, 1] range, and their mvp matrix would get precalculated. | |
| * So it was simply a matter of seeing if their projected OBB overlapped with the screen's clip space. | |
| * Returns true if the cube is visible. (false positives for near misses due to conservative w-value) | |
| */ | |
| static inline bool MapTileFrustumCull(const mat4 mvp){ | |
| // Clip space center of the cube is the last column of the matrix. | |
| vec4 c = {mvp.m[12], mvp.m[13], mvp.m[14], mvp.m[15]}; | |
| // Clip space extents are the component wise absolute values of the first three columns. |
This file contains hidden or 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; | |
| using UnityEditor; | |
| using System.Collections; | |
| using System; | |
| using System.Linq; | |
| using System.Reflection; | |
| [InitializeOnLoad] | |
| public class RXLookingGlass | |
| { |
This file contains hidden or 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; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.U2D; | |
| [ExecuteInEditMode] | |
| public class SpriteWaterShape : MonoBehaviour | |
| { | |
| public SpriteShapeController controller; |