Coder Social home page Coder Social logo

opencl-ue4's Introduction

OpenCL Plugin for Unreal Engine 4

GitHub release Github All Releases

Enables using OpenCL kernel from UE4. Supports both blueprint and C++.

Forked from original work by kwonoh.

Installation

Windows

  1. Install NVIDIA, AMD Graphics Driver, or Intel OpenCL runtime.
  2. Browse to your project folder (typically found at Documents/Unreal Project/{Your Project Root})
  3. Copy Plugins folder into your Project root.

OS X

  1. Browse to your project folder
  2. Copy Plugins folder into your Project root.

C++ extra steps

  1. Add "OpenCL" under "PublicDependencyModuleNames" in your *.Build.cs file to include header files from your project.
  2. Include "OpenCL.h" in your source code.

How to use

Add an Open CL Component to an actor of your choice.

add component

Optionally enumerate and add to or remove from your Device Group. For v0.3 the plugin will only run kernels on the first device in the Device Group array (index 0)

enumerate devices

Run a kernel either directly from string source

run inline

or from a file, default expected location is {project root}/Content/Kernels. Here's an example hello.cl kernel

run from file

then subscribe to your component's On Result callback

subscribe

for example print out the result string

print results

Note that kernel compile errors will be logged to your Output log, which should make development easy. kernel compile

To improve the development loop further the plugin contains a convenience OpenCLDevActor where you can specify a filename and kernel function name and upon play it will watch that file in {project root}/Content/Kernels. This means you can open your favorite text editor

own editor

and it will hotreload whenever that file has changed.

hotreload

That's more or less it for blueprint use for v0.3. You have access to the whole OpenCL library so if you want to dig down to C++ level you can bind much more complicated workflows. See https://github.com/getnamo/opencl-ue4/blob/master/Source/OpenCL/Private/OpenCLPlugin.cpp#L131 for code examples.

Supported Platform

See https://github.com/getnamo/opencl-ue4/releases. If you're version isn't listed it can probably still be recompiled without code changes.

Known Issues

Screenshots

Windows

Log Screenshots on Windows

OS X

Log Screenshots on OS X

Legal info

Unreal® is a trademark or registered trademark of Epic Games, Inc. in the United States of America and elsewhere. Unreal® Engine, Copyright 1998 – Current, Epic Games, Inc. All rights reserved.

Plugin is completely free and available under MIT open-source license.

opencl-ue4's People

Contributors

getnamo avatar kwonoh avatar georger avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.