Credits and inspiration :
- https://github.com/android/renderscript-samples (Project base)
- https://github.com/ttddee/Cascade (Vulkan shaders)
- https://github.com/cats-oss/android-gpuimage (GLES pipeline and shaders)
- https://gitlab.com/higan/xml-shaders/-/tree/master/shaders/OpenGL/v1.0 (more GLES shaders)
- https://github.com/awxkee/aire (fast image processing)
RenderScript is being deprecated since Android 12. We recommend computationally intensive applications to use Vulkan, the cross platform industry standard API. Please refer to the RenderScript Migration Guide for more details.
To help developers for the migration, this sample is created to demonstrate how to apply the image filtering to a bitmap with the Vulkan compute pipeline. The sample creates a common ImageProcessor interface, on the top of Vulkan Compute and RenderScript, that performs two compute tasks:
- HUE rotation: A simple compute task with a single compute kernel.
- Blur: A more complex compute task which executes two compute kernels sequentially.
- Resize
All tasks are implemented with
- RenderScript (intrinsics & custom scripts)
- Vulkan
- OpenGL ES 2.0
- RenderEffect
- Aire
to demonstrate the migration from RenderScript to these various alternatives.
- Download Android Studio.
- Launch Android Studio.
- Open the sample directory.
- Click Tools/Android/Sync Project with Gradle Files.
- Click Run/Run 'app'.