Quadtree built on Unity.Collections
, Unity.Jobs
and Unity.Burst
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 "Universal Render Pipeline/Custom/UnlitTextureShadows" | |
{ | |
Properties | |
{ | |
[MainColor] _BaseColor("BaseColor", Color) = (1,1,1,1) | |
[MainTexture] _BaseMap("BaseMap", 2D) = "white" {} | |
} | |
SubShader | |
{ |
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
/** | |
* @file ConvexHull.cs | |
* @author Benjamin Williams <[email protected]> | |
*/ | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System.Linq; |
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.Concurrent; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Unity.Jobs; | |
public static class JobHelper | |
{ |
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
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME! | |
// However, if you want to author shaders in shading language you can use this teamplate as a base. | |
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader. | |
// This shader works with URP 7.1.x and above | |
Shader "Universal Render Pipeline/Custom/Physically Based Example" | |
{ | |
Properties | |
{ | |
// Specular vs Metallic workflow | |
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.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
/* This is taken from this blog post: | |
* http://loyc-etc.blogspot.ca/2014/05/2d-convex-hull-in-c-45-lines-of-code.html | |
* | |
* All I have done is renamed "DList" to "CircularList" and then wrote a wrapper for the generic C# list. | |
* The structure that is supposed to be used is *much* more efficient, but this works for my purposes. | |
* | |
* This can be dropped right into your Unity project and will work without any adjustments. | |
*/ | |
using System.Collections.Generic; | |
using UnityEngine; |
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
// this code is under MIT License, by Robert Yang + others (credits in comments) | |
// a lot of this is based on http://wiki.unity3d.com/index.php?title=SkinnedMeshCombiner | |
// but I removed the atlasing stuff because I don't need it | |
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; |
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 static class ConfigurableJointExtensions | |
{ | |
/// <summary> | |
/// Sets a joint's targetRotation to match a given local rotation. | |
/// The joint transform's local rotation must be cached on Start and passed into this method. | |
/// </summary> | |
public static void SetTargetRotationLocal (this ConfigurableJoint joint, Quaternion targetLocalRotation, Quaternion startLocalRotation) | |
{ |
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 static class ConfigurableJointExtensions { | |
/// <summary> | |
/// Sets a joint's targetRotation to match a given local rotation. | |
/// The joint transform's local rotation must be cached on Start and passed into this method. | |
/// </summary> | |
public static void SetTargetRotationLocal (this ConfigurableJoint joint, Quaternion targetLocalRotation, Quaternion startLocalRotation) | |
{ | |
if (joint.configuredInWorldSpace) { |