Created
September 24, 2023 17:27
-
-
Save Donnotron666/e6841dbc7742938b1101a7e2544d5a29 to your computer and use it in GitHub Desktop.
Consume Edge Maps on the GPU
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
void getSpriteEdges_float(UnityTexture2D edgeMap, UnitySamplerState ss, float2 uv, out float top, out float right, out float left, out float bot) { | |
//MY COUNTERPART IS EdgeMapUtils.GetEdge | |
float4 color = edgeMap.Sample(ss, uv); | |
top = color.r; | |
right = color.g; | |
left = color.b; | |
bot = color.a; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment