An open API service indexing awesome lists of open source software.

https://github.com/robbwatershed/renderscript-alternatives-benchmark

Benchmark of RenderScript, RenderEffect, Vulkan and OpenGL ES in the same Android app
https://github.com/robbwatershed/renderscript-alternatives-benchmark

android opengl-es rendereffect renderscript vulkan

Last synced: 7 months ago
JSON representation

Benchmark of RenderScript, RenderEffect, Vulkan and OpenGL ES in the same Android app

Awesome Lists containing this project

README

          

# RenderScript Alternatives benchmark

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)

## Introduction

[RenderScript is being deprecated](https://android-developers.googleblog.com/2021/04/android-gpu-compute-going-forward.html) since Android 12. We recommend computationally intensive applications to use [Vulkan](https://www.khronos.org/vulkan), the cross platform industry standard API. Please refer to the [RenderScript Migration Guide](https://developer.android.com/guide/topics/renderscript/migrate) 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.

## Getting Started

1. Download Android Studio.
2. Launch Android Studio.
3. Open the sample directory.
4. Click Tools/Android/Sync Project with Gradle Files.
5. Click Run/Run 'app'.

## Screenshots

Screenshot of Hue Rotation
Screenshot of Blur