diff options
Diffstat (limited to 'Assets/ThirdParty/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_EncodeFloatRGHlpNode.shader')
-rw-r--r-- | Assets/ThirdParty/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_EncodeFloatRGHlpNode.shader | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Assets/ThirdParty/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_EncodeFloatRGHlpNode.shader b/Assets/ThirdParty/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_EncodeFloatRGHlpNode.shader new file mode 100644 index 00000000..f3b8ff14 --- /dev/null +++ b/Assets/ThirdParty/AmplifyShaderEditor/Plugins/EditorResources/Previews/Preview_EncodeFloatRGHlpNode.shader @@ -0,0 +1,27 @@ +Shader "Hidden/EncodeFloatRGNode" +{ + Properties + { + _A ("_A", 2D) = "white" {} + } + SubShader + { + Pass + { + CGPROGRAM + #include "UnityCG.cginc" + #pragma vertex vert_img + #pragma fragment frag + + sampler2D _A; + + + float4 frag( v2f_img i ) : SV_Target + { + float a = tex2D( _A, i.uv ).r; + return float4( EncodeFloatRG( a ), 0,0); + } + ENDCG + } + } +} |