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
## | |
# A script to split simple, architectural geometry into convex pieces. | |
# | |
# This script makes use of Blender's built-in "Split Concave Faces" clean-up | |
# algorithm to break-up the faces of an object into convex pieces. The script | |
# attempts to identify all the edges that represent convex boundaries, and then | |
# it splits objects up along those edges. Each resulting piece is then made into | |
# a closed object by converting it into a convex hull. | |
# | |
# Be sure to select the object you wish the split into convex pieces before |
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
// Based on the Unity Wiki FloatingOrigin script by Peter Stirling | |
// URL: http://wiki.unity3d.com/index.php/Floating_Origin | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class FloatingOrigin : MonoBehaviour | |
{ | |
[Tooltip("Point of reference from which to check the distance to origin.")] | |
public Transform ReferenceObject = null; |
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 TMPro; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class AnimatorPanel : MonoBehaviour | |
{ | |
[SerializeField] Animator _animator; | |
[SerializeField] Button _button; | |
void Start() |
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
/*--------------------------------------------------------------------------*\ | |
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 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 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 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 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 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 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; |