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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class pipeGenerator : MonoBehaviour | |
{ | |
[SerializeField] Mesh straightMesh; | |
[SerializeField] Mesh elbowMesh; | |
[Space] | |
[SerializeField] Vector3[] pathPoints; |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Unity.Profiling; | |
using UnityEngine.UI; | |
using System.Text; | |
using Unity.Profiling.LowLevel.Unsafe; | |
public class ReleaseBuildRecordCheck : MonoBehaviour | |
{ |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
using UnityEngine.Rendering.Universal; | |
public class RenderObjectsToTextureFeature : ScriptableRendererFeature | |
{ | |
public RenderObjectsToTexturePass.Settings Settings = new(); |
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
static float2 kernel3UVs[9] = { | |
float2(-1, 1), float2(0, 1), float2(1, 1), | |
float2(-1, 0), float2(0, 0), float2(1, 0), | |
float2(-1, -1), float2(0, -1), float2(1, -1), | |
}; | |
void DoubleKernel3x3_float(Texture2D Texture, SamplerState Sampler, float TexelWidth, float TexelHeight, float2 UV, | |
float3x3 KernelX, float3x3 KernelY, float Thickness, out float Out) | |
{ | |
const float2 texelSize = float2(TexelWidth, TexelHeight); | |
const float2 offset = Thickness / texelSize; |
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
//============================================================================================================================== | |
// 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, |
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; | |
public class Flicker : MonoBehaviour | |
{ | |
public string LightStyle = "mmamammmmammamamaaamammma"; | |
private Light light; | |
public float loopTime = 2f; | |
[SerializeField] | |
private int currentIndex = 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 UnityEngine; | |
using UnityEngine.UI; | |
// Text2 extends the Text component in Unity UI. | |
// It makes hyphens and soft hyphens work. | |
// Inserting soft hyphens in text can be tricky and confusing, given they are invisible, | |
// so you can instead also insert Hyphenation Point characters, which will be replaced by soft hyphens: | |
// https://www.compart.com/en/unicode/U+2027 | |
public class Text2 : Text { |
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; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.EditorTools; | |
// Tagging a class with the EditorTool attribute and no target type registers a global tool. Global tools are valid for any selection, and are accessible through the top left toolbar in the editor. | |
[EditorTool("Moving Particle Context")] |
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
// https://twitter.com/Cyanilux/status/1396848736022802435?s=20 | |
#ifndef GRASS_INSTANCED_INCLUDED | |
#define GRASS_INSTANCED_INCLUDED | |
// ---------------------------------------------------------------------------------- | |
// Graph should contain Boolean Keyword, "PROCEDURAL_INSTANCING_ON", Global, Multi-Compile. | |
// Must have two Custom Functions in vertex stage. One is used to attach this file (see Instancing_float below), | |
// and another to set #pragma instancing_options : |
NewerOlder