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
using UnityEngine; | |
public class DistanceJoint3D : MonoBehaviour { | |
public Transform ConnectedRigidbody; | |
public bool DetermineDistanceOnStart = true; | |
public float Distance; | |
public float Spring = 0.1f; | |
public float Damper = 5f; |
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.Linq; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
using UnityEngine.Serialization; | |
using UnityEditor.VFX; | |
using UnityEngine.VFX; | |
namespace UnityEditor.VFX |
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 MAINLIGHT_INCLUDED | |
#define MAINLIGHT_INCLUDED | |
void GetMainLightData_float(out half3 direction, out half3 color, out half distanceAttenuation, out half shadowAttenuation) | |
{ | |
#ifdef SHADERGRAPH_PREVIEW | |
// In Shader Graph Preview we will assume a default light direction and white color | |
direction = half3(-0.3, -0.8, 0.6); | |
color = half3(1, 1, 1); | |
distanceAttenuation = 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
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
/* | |
A simple little editor extension to copy and paste all components | |
Help from http://answers.unity3d.com/questions/541045/copy-all-components-from-one-character-to-another.html | |
license: WTFPL (http://www.wtfpl.net/) | |
author: aeroson | |
advise: ChessMax | |
editor: frekons | |
*/ | |
#if UNITY_EDITOR |