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 "Pristine Radial Grid" | |
{ | |
Properties | |
{ | |
[Toggle] _WorldUV ("Use World Space UV", Float) = 1.0 | |
_GridScale ("Grid Scale", Float) = 1.0 | |
[Toggle] _UseAdaptiveAngularSegments ("Use Adaptive Angular Segment Count", Float) = 0.0 | |
[IntRange] _AngularSegments ("Angular Segments", Range(1,360)) = 4.0 | |
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.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
using Random = System.Random; | |
// This source code is used for the video. It obviously requires heavy alterations to be used in a real project. | |
public class ExampleGrid : MonoBehaviour | |
{ | |
[SerializeField] private Vector2Int _size; | |
[SerializeField] private Vector2 _gap; |
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.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
using UnityEngine.Rendering.Universal; | |
namespace Zombies.VFX { | |
public class BlitPass : ScriptableRenderPass { | |
RenderTargetHandle _source; |
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; | |
using UnityEngine.InputSystem; | |
//!!>> This script should NOT be placed in an "Editor" folder. Ideally placed in a "Plugins" folder. | |
namespace Invertex.UnityInputExtensions.Interactions | |
{ | |
//https://gist.github.com/Invertex | |
/// <summary> | |
/// Custom Hold interaction for New Input System. | |
/// With this, the .performed callback will be called everytime the Input System updates. |
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
#ifndef TRICUBIC_INCLUDED | |
#define TRICUBIC_INCLUDED | |
float4 Cubic(float v) | |
{ | |
float4 n = float4(1.0, 2.0, 3.0, 4.0) - v; | |
float4 s = n * n * n; | |
float x = s.x; | |
float y = s.y - 4.0 * s.x; | |
float z = s.z - 4.0 * s.y + 6.0 * s.x; |