Polishes
This commit is contained in:
@@ -2,6 +2,7 @@ Shader "Hidden/ProjectM/PixelOutline"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[ToggleUI] _MasterEnabled ("Master (whole effect)", Float) = 1
|
||||
_PixelHeight ("Pixel Grid Height", Float) = 200
|
||||
[ToggleUI] _PosterizeEnabled ("Posterize (banded color)", Float) = 1
|
||||
_ColorLevels ("Posterize Levels / channel", Range(2,64)) = 12
|
||||
@@ -39,6 +40,7 @@ Shader "Hidden/ProjectM/PixelOutline"
|
||||
#include "Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blit.hlsl"
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float _MasterEnabled;
|
||||
float _PixelHeight;
|
||||
float _PosterizeEnabled;
|
||||
float _ColorLevels;
|
||||
@@ -65,6 +67,10 @@ Shader "Hidden/ProjectM/PixelOutline"
|
||||
{
|
||||
float2 uv = input.texcoord;
|
||||
|
||||
// Master bypass: return the untouched scene (dev on/off for the whole style).
|
||||
if (_MasterEnabled < 0.5)
|
||||
return half4(SAMPLE_TEXTURE2D_X(_BlitTexture, sampler_PointClamp, uv).rgb, 1.0);
|
||||
|
||||
// Fixed, square-pixel low-res grid derived from a target grid height.
|
||||
float aspect = _ScreenParams.x / max(_ScreenParams.y, 1.0);
|
||||
float2 res = float2(max(_PixelHeight * aspect, 1.0), max(_PixelHeight, 1.0));
|
||||
|
||||
Reference in New Issue
Block a user