Boat Attack使用了Universal RP的许多新图形功能,可以用于探索 Universal RP 的使用方式和技巧。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

73 行
1.6 KiB

Shader "Hidden/Universal Render Pipeline/SubpixelMorphologicalAntialiasing"
{
Properties
{
[HideInInspector] _StencilRef ("_StencilRef", Int) = 64
[HideInInspector] _StencilMask ("_StencilMask", Int) = 64
}
HLSLINCLUDE
#pragma multi_compile_local _SMAA_PRESET_LOW _SMAA_PRESET_MEDIUM _SMAA_PRESET_HIGH
#pragma exclude_renderers gles
ENDHLSL
SubShader
{
Cull Off ZWrite Off ZTest Always
// Edge detection
Pass
{
Stencil
{
WriteMask [_StencilMask]
Ref [_StencilRef]
Comp Always
Pass Replace
}
HLSLPROGRAM
#pragma vertex VertEdge
#pragma fragment FragEdge
#include "SubpixelMorphologicalAntialiasingBridge.hlsl"
ENDHLSL
}
// Blend Weights Calculation
Pass
{
Stencil
{
WriteMask [_StencilMask]
ReadMask [_StencilMask]
Ref [_StencilRef]
Comp Equal
Pass Replace
}
HLSLPROGRAM
#pragma vertex VertBlend
#pragma fragment FragBlend
#include "SubpixelMorphologicalAntialiasingBridge.hlsl"
ENDHLSL
}
// Neighborhood Blending
Pass
{
HLSLPROGRAM
#pragma vertex VertNeighbor
#pragma fragment FragNeighbor
#include "SubpixelMorphologicalAntialiasingBridge.hlsl"
ENDHLSL
}
}
}