Skip to content

DrawnUI and SKSL shaders are used to construct a custom Carousel control for .NET MAUI. SkiaSharp version 3 made this possible.

License

Notifications You must be signed in to change notification settings

taublast/ShadersCarousel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET MAUI Shaders Carousel Demo

demo.mp4

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.

Do not run this app on iOS and Catalyst simulators as SkiaSharp is not supporting their hardware acceleration at this time.

DrawnUI preview nuget allowed to use SkiaSharp intuitively on a hardware-accelerated Skia canvas.

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.

About

DrawnUI and SKSL shaders are used to construct a custom Carousel control for .NET MAUI. SkiaSharp version 3 made this possible.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages