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
| // Colors scraped from https://simple.wikipedia.org/wiki/List_of_colors | |
| public static class ReColors | |
| { | |
| public static readonly Color AMARANTH = new Color(229f / 255f, 43f / 255f, 80f / 255f); | |
| public static readonly Color AMBER = new Color(255f / 255f, 191f / 255f, 0); | |
| public static readonly Color AMETHYST = new Color(153f / 255f, 102f / 255f, 204f / 255f); | |
| public static readonly Color APRICOT = new Color(251f / 255f, 206f / 255f, 177f / 255f); | |
| public static readonly Color AQUAMARINE = new Color(127f / 255f, 255f / 255f, 212f / 255f); | |
| public static readonly Color AZURE = new Color(0, 127f / 255f, 255f / 255f); |
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.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using UnityEngine; | |
| public class SnakeOneLine : MonoBehaviour | |
| { | |
| void OnEnable() | |
| { | |
| var quadgo = GameObject.CreatePrimitive(PrimitiveType.Quad); |
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 "Custom/URPSimpleLit" | |
| { | |
| Properties | |
| { | |
| _Color ("Color", Color) = (1,0,0,1) | |
| } | |
| SubShader | |
| { | |
| Tags { | |
| "RenderPipeline" = "UniversalPipeline" |
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
| public class OptionException : System.Exception | |
| { | |
| public OptionException(string message) : base(message) { } | |
| } | |
| public struct Option<T> | |
| { | |
| T _value; |
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
| #pragma kernel Downscale | |
| #pragma kernel GaussianBlurVertical | |
| #pragma kernel GaussianBlurHorizontal | |
| #pragma kernel BoxBlur | |
| Texture2D<float4> _Source; | |
| RWTexture2D<float4> _Dest; | |
| float _Amount; | |
| float2 _Size; |
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.Collections.Generic; | |
| using System.Runtime.InteropServices; | |
| using UnityEngine; | |
| class Render : MonoBehaviour | |
| { | |
| struct DrawData | |
| { | |
| public Vector3 Pos; | |
| public Quaternion Rot; |
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 "Hidden/GrabPassBlit" | |
| { | |
| Properties { } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Opaque" } | |
| Pass | |
| { | |
| Name "FinalBlit" |
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
| const DIRS: [Point; 4] = [Point(1, 0), Point(0, 1), Point(-1, 0), Point(0, -1)]; | |
| type FindPathResult = (Vec<Point>, usize); | |
| #[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, PartialOrd, Ord)] | |
| pub struct Point(pub isize, pub isize); | |
| impl Add for Point { | |
| type Output = Point; | |
| fn add(self, r: Point) -> <Self as std::ops::Add<Point>>::Output { |
OlderNewer