From cada07db5fedd004e67b2eb2810303c3e98834b7 Mon Sep 17 00:00:00 2001 From: Keijiro Takahashi Date: Wed, 13 Apr 2016 17:50:38 +0900 Subject: [PATCH] Change for reducing the number of shader variants. --- Assets/Kino/Bloom/Shader/Bloom.shader | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Assets/Kino/Bloom/Shader/Bloom.shader b/Assets/Kino/Bloom/Shader/Bloom.shader index b0c336f..7f6bc40 100644 --- a/Assets/Kino/Bloom/Shader/Bloom.shader +++ b/Assets/Kino/Bloom/Shader/Bloom.shader @@ -33,10 +33,6 @@ Shader "Hidden/Kino/Bloom" #include "UnityCG.cginc" - #pragma multi_compile _ HIGH_QUALITY - #pragma multi_compile _ ANTI_FLICKER - #pragma multi_compile LINEAR_COLOR GAMMA_COLOR - // Mobile: use RGBM instead of float/half RGB #define USE_RGBM defined(SHADER_API_MOBILE) @@ -103,8 +99,6 @@ Shader "Hidden/Kino/Bloom" return s * (1.0 / 4); } - #if ANTI_FLICKER - // Downsample with a 4x4 box filter + anti-flicker filter half3 DownsampleAntiFlickerFilter(float2 uv) { @@ -125,8 +119,6 @@ Shader "Hidden/Kino/Bloom" return (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * one_div_wsum; } - #endif - half3 UpsampleFilter(float2 uv) { #if HIGH_QUALITY @@ -264,6 +256,8 @@ Shader "Hidden/Kino/Bloom" { ZTest Always Cull Off ZWrite Off CGPROGRAM + #pragma multi_compile _ ANTI_FLICKER + #pragma multi_compile LINEAR_COLOR GAMMA_COLOR #pragma vertex vert_img #pragma fragment frag_prefilter #pragma target 3.0 @@ -273,6 +267,7 @@ Shader "Hidden/Kino/Bloom" { ZTest Always Cull Off ZWrite Off CGPROGRAM + #pragma multi_compile _ ANTI_FLICKER #pragma vertex vert_img #pragma fragment frag_downsample1 #pragma target 3.0 @@ -291,6 +286,7 @@ Shader "Hidden/Kino/Bloom" { ZTest Always Cull Off ZWrite Off CGPROGRAM + #pragma multi_compile _ HIGH_QUALITY #pragma vertex vert_multitex #pragma fragment frag_upsample #pragma target 3.0 @@ -300,6 +296,8 @@ Shader "Hidden/Kino/Bloom" { ZTest Always Cull Off ZWrite Off CGPROGRAM + #pragma multi_compile _ HIGH_QUALITY + #pragma multi_compile LINEAR_COLOR GAMMA_COLOR #pragma vertex vert_multitex #pragma fragment frag_upsample_final #pragma target 3.0