demo.mp4
Supports iOS, MacCatalyst, Android, Windows.
Updated with latest DrawnUI nuget. This now runs on Catalyst and iOS simulator too!
Among some stunning features, SkiaSharp version 3 brought the latest SKSL syntax. Can now use official samples etc, to create shaders for .NET MAUI.
An important new possibility is to port existing GLSL shaders into the modern SKSL, what was done in this case. Adapted GLSL shaders from https://github.com/gl-transitions/gl-transitions were used.
One could use the code to serve as a stand-alone control inside a usual MAUI app, just reference/initialize DrawnUI nuget then put the canvas with a drawn carousel anywhere. You could ship shader files inside the app Raw
folder or even as strings in code or from resources.
What's behind: subclassed SkiaShader
effect to create a custom one with transitions and attached it to a customized SkiaCarousel
via VisualEffects
property.
Our ShaderTransitionEffect
uses SkSl
helper to load shader source from app resources, then compile it into a SKRuntimeEffect
to be used while painting.