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
| /*--------------------------------------------------------------------------*\ | |
| Copyright (c) 2008-2009, Danny Ruijters. All rights reserved. | |
| http://www.dannyruijters.nl/cubicinterpolation/ | |
| This file is part of CUDA Cubic B-Spline Interpolation (CI). | |
| Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions are met: | |
| * Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. | |
| * Redistributions in binary form must reproduce the above copyright | |
| notice, this list of conditions and the following disclaimer in the |
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
| // https://forum.unity.com/threads/texture-bombing-lets-tackle-this-one.185724/#post-1278100 | |
| Shader "Annihlator/Raindrop TextureBomber" { | |
| Properties { | |
| _MainTex("Texture (RGB)", 2D) = "black" {} | |
| _BumpMap ("Normalmap", 2D) = "bump" {} | |
| _BombTex("Bomb Texture (RGB)", 2D) = "black" {} | |
| _RandomTex("Random Texture (RGB)", 2D) = "black" {} | |
| _Slider("Slider", Range(0,1)) = 1 | |
| _Params("Params, Z = Scale",Vector) = (0.037, 0.119, 5, 0) | |
| _ReflectionTex ("Reflection", 2D) = "white" { TexGen ObjectLinear } |
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
| /* | |
| * Ambient Occlusion and Direction. | |
| * | |
| * Calculates AO and the average direction where the ambient light came from. | |
| * | |
| * Original AO code from https://github.com/sambler/osl-shaders/blob/master/ramps/BaAmbientOcclusion/BaAmbientOcclusion.osl | |
| * | |
| */ | |
| void rng_seed(output int rng, int seed) |
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.Generic; | |
| using UnityEngine; | |
| using UnityEngine.Rendering; | |
| using UnityEngine.Rendering.Universal; | |
| public class GrabScreenFeature : ScriptableRendererFeature | |
| { | |
| [System.Serializable] | |
| public class Settings |
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
| #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
| /******************************************************************************* | |
| * Don't Be a Jerk: The Open Source Software License. | |
| * Adapted from: https://github.com/evantahler/Dont-be-a-Jerk | |
| ******************************************************************************* | |
| * _I_ am the software author - JohannesMP on Github. | |
| * _You_ are the user of this software. You might be a _we_, and that's OK! | |
| * | |
| * This is free, open source software. I will never charge you to use, | |
| * license, or obtain this software. Doing so would make me a jerk. | |
| * |
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; | |
| [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 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 UnityEngine; | |
| public class LabelDrawer : MonoBehaviour | |
| { | |
| struct Label3D | |
| { | |
| public readonly string text; | |
| public readonly Vector3 position; |