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