Created
November 12, 2021 16:24
-
-
Save droganaida/dfcc9bf073d32d5a6dc7b9a4dce75e79 to your computer and use it in GitHub Desktop.
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
//HLSL Animated Normal Map for Unreal Engine material (custom node) | |
float2 uv = iCoord.xy / iResolution.xy; // iCoord - UV, iResolution - Float2(1,1) | |
float h = 0.6 * iTexture; // iTexture - RGBA (Float4) | |
float w = 40.0; | |
float3 n = normalize(float3(ddx(h) * w, ddy(h) * w, 1.0)); | |
return float4(n * 0.5 + 0.5,1.0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use custom node in material editor.
Inputs:
iCoord = UV
iResolution = Float2(1,1)
iTexture = RGBA (Float4) - your custom animated (or static) HLSL shader