Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1461

[VB6] Draw 2D shapes using Signed Distance Function

$
0
0
Draw 2D shapes using 2D Signed distance Function.

Calculate distance from each pixel to each shape and compute its RGB value.

Do not use (DX) GPU HLSL, with which it would be very much faster.

2D SDF functions taken and customized from here:
https://iquilezles.org/www/articles/...unctions2d.htm

__Requires__:
RC6 (for RC6 Render mode) http://vbrichclient.com/#/en/About/

DOWNLOAD:
https://github.com/miorsoft/VB6-2D-SDF



INTERESTING:
Deriving the SDF of a Line Segment
https://www.youtube.com/watch?v=PMltMdi1Wzg
Rounding Corners in SDF
https://www.youtube.com/watch?v=s5NGeUV2EyU

Viewing all articles
Browse latest Browse all 1461

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>