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; | |
using System.IO; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.AssetGraph; | |
using UnityEngine.AssetGraph.DataModel.Version2; | |
public class AssetGraphIgnorer |
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 UnityEditor; | |
using UnityEngine; | |
using UnityEngine.AssetGraph; | |
using Model = UnityEngine.AssetGraph.DataModel.Version2; | |
[CustomFilter("TextureTypeFilter")] | |
public class TextureFilter : IFilter | |
{ | |
[SerializeField] |
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
#pragma kernel CSMain | |
RWTexture2D<float4> buffer; | |
RWStructuredBuffer<int> Result; | |
int Width; | |
[numthreads(8,8,1)] | |
void CSMain (uint3 id : SV_DispatchThreadID) | |
{ | |
float4 pixelValue = buffer[int2(id.x, id.y)]; | |
//e.g. pack to result buffer in 8bit rgb order |
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; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
namespace PrefabUtil | |
{ | |
public static class FindVariantsFromOriginal | |
{ | |
[MenuItem("Assets/PrefabUtil/Find Prefab Variant from Original Prefab", validate = true)] |
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.IO; | |
using System.Linq; | |
using System.Reflection; | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
namespace PrefabReverter |
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
#pragma kernel CSMain | |
ByteAddressBuffer Indices; | |
RWStructuredBuffer<int> IndexResultBuffer; | |
int IndicesCount; | |
uint2 AsUint16 (uint a) | |
{ | |
uint x = a >> 16; |
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
#pragma kernel CSMain | |
struct VertexPosition | |
{ | |
float3 Position; | |
}; | |
ByteAddressBuffer Verts; | |
RWStructuredBuffer<VertexPosition> VertexPositionBuffer;; |
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 "Unlit/FineTextureTiling" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_NoiseTex ("Noise Texture", 2D) = "white" {} | |
_NoiseScale("Noise Scale", float) = 0.005 | |
_SmoothingPower("Smoothing Power", Range(0.001, 2)) = 1 | |
[Toggle]_ShowIndex("Show Index", int) = 0 | |
[Toggle]_FineTiling("Fine Tiling", int) = 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 UnityEngine; | |
public class SMBTestMainBehaviour : StateMachineBehaviour | |
{ | |
private static readonly int _walk = Animator.StringToHash("Walk"); | |
private GameObject _camera; | |
private GameObject _speechBalloon; | |
private TextMesh _text; | |
private void Awake() |
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.Rendering; | |
public class CubemapUpdater : MonoBehaviour { | |
[SerializeField] private Shader _blitShader; | |
private Cubemap _cubemap; | |
private readonly int _cubemapSize = 16; | |
private Material _blitMat; | |
private RenderTexture _cubemapRT; |
NewerOlder