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; | |
using UnityEngine.Rendering.Universal; | |
public class DepthNormalsFeature : ScriptableRendererFeature | |
{ | |
class DepthNormalsPass : ScriptableRenderPass | |
{ | |
int kDepthBufferBits = 32; | |
private RenderTargetHandle depthAttachmentHandle { get; set; } |
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
TEXTURE2D(_CameraColorTexture); | |
SAMPLER(sampler_CameraColorTexture); | |
float4 _CameraColorTexture_TexelSize; | |
TEXTURE2D(_CameraDepthTexture); | |
SAMPLER(sampler_CameraDepthTexture); | |
TEXTURE2D(_CameraDepthNormalsTexture); | |
SAMPLER(sampler_CameraDepthNormalsTexture); | |
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; | |
using UnityEngine.Rendering.Universal; | |
public class OutlineFeature : ScriptableRendererFeature | |
{ | |
class OutlinePass : ScriptableRenderPass | |
{ | |
private RenderTargetIdentifier source { get; set; } | |
private RenderTargetHandle destination { get; set; } |
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
TEXTURE2D(_CameraDepthTexture); | |
SAMPLER(sampler_CameraDepthTexture); | |
float4 _CameraDepthTexture_TexelSize; | |
TEXTURE2D(_CameraDepthNormalsTexture); | |
SAMPLER(sampler_CameraDepthNormalsTexture); | |
float3 DecodeNormal(float4 enc) | |
{ | |
float kScale = 1.7777; |
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
// ScriptableRenderPass template created for URP 12 and Unity 2021.2 | |
// Made by Alexander Ameye | |
// https://alexanderameye.github.io/ | |
using System; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
using UnityEngine.Rendering.Universal; | |
public class TemplatePass : ScriptableRenderPass |
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
// ScriptableRendererFeature template created for URP 12 and Unity 2021.2 | |
// Made by Alexander Ameye | |
// https://alexanderameye.github.io/ | |
using UnityEngine; | |
using UnityEngine.Rendering.Universal; | |
public class TemplateFeature : ScriptableRendererFeature | |
{ | |
[System.Serializable] |
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
// Two-pass box blur shader created for URP 12 and Unity 2021.2 | |
// Made by Alexander Ameye | |
// https://alexanderameye.github.io/ | |
Shader "Hidden/Blur" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" | |
} |
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; | |
using UnityEngine.Rendering.Universal; | |
public enum ExtrusionMethod | |
{ | |
ScaleObject, | |
ScaleObjectNormalized, | |
ExtrudeAlongNormal1, |
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
// DRAWING MODES | |
// OUTLINE ALWAYS: STENCIL NOTEQUAL, ZTEST ALWAYS | |
// HIDDEN SURFACES: STENCIL OFF, ZTEST GREATER, OUTLINE WIDTH 0 | |
using System; | |
using UnityEngine; | |
using System.Collections.Generic; | |
using UnityEngine.Rendering; | |
using UnityEngine.Rendering.Universal; |
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 "Hidden/Vertex Extrusion" | |
{ | |
Properties | |
{ | |
_Color ("_Color", Color) = (1, 1, 1, 1) | |
_Width ("_Width", Float) = 1 | |
_SrcBlend ("_SrcBlend", Int) = 0 | |
_DstBlend ("_DstBlend", Int) = 0 | |
} | |
OlderNewer