Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1027 from malaybaku/develop
v3.6.0
- Loading branch information
Showing
31 changed files
with
704 additions
and
83 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v3.5.1 | ||
v3.6.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 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 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 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 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 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
39 changes: 39 additions & 0 deletions
39
VMagicMirror/Assets/Baku/VMagicMirror/Scripts/Environment/PostProcessing/VmmAlphaEdge.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using UnityEngine; | ||
using UnityEngine.Rendering.PostProcessing; | ||
|
||
namespace Baku.VMagicMirror | ||
{ | ||
|
||
[Serializable] | ||
[PostProcess(typeof(VmmAlphaEdgeRenderer), PostProcessEvent.AfterStack, "Vmm/AlphaEdge", allowInSceneView: false)] | ||
public sealed class VmmAlphaEdge : PostProcessEffectSettings | ||
{ | ||
public FloatParameter thickness = new() { value = 20f }; | ||
public FloatParameter threshold = new() { value = 1f }; | ||
public ColorParameter edgeColor = new() { value = Color.white }; | ||
public FloatParameter outlineOverwriteAlpha = new() { value = 0.02f }; | ||
public BoolParameter highQualityMode = new() { value = false }; | ||
} | ||
|
||
public sealed class VmmAlphaEdgeRenderer : PostProcessEffectRenderer<VmmAlphaEdge> | ||
{ | ||
private static readonly int Thickness = Shader.PropertyToID("_Thickness"); | ||
private static readonly int Threshold = Shader.PropertyToID("_Threshold"); | ||
private static readonly int EdgeColor = Shader.PropertyToID("_EdgeColor"); | ||
private static readonly int OutlineOverwriteAlpha = Shader.PropertyToID("_OutlineOverwriteAlpha"); | ||
private static readonly int HighQualityMode = Shader.PropertyToID("_HighQualityMode"); | ||
|
||
public override void Render(PostProcessRenderContext context) | ||
{ | ||
var sheet = context.propertySheets.Get(Shader.Find("Hidden/Vmm/AlphaEdge")); | ||
sheet.properties.SetFloat(Thickness, settings.thickness); | ||
sheet.properties.SetFloat(Threshold, settings.threshold); | ||
sheet.properties.SetColor(EdgeColor, settings.edgeColor); | ||
sheet.properties.SetFloat(OutlineOverwriteAlpha, settings.outlineOverwriteAlpha); | ||
sheet.properties.SetFloat(HighQualityMode, settings.highQualityMode ? 1f : 0f); | ||
|
||
context.command.BlitFullscreenTriangle(context.source, context.destination, sheet, 0); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...icMirror/Assets/Baku/VMagicMirror/Scripts/Environment/PostProcessing/VmmAlphaEdge.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.