All Projects → Unity-Technologies → Nativerenderingplugin

Unity-Technologies / Nativerenderingplugin

Licence: mit
C++ Rendering Plugin example for Unity

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Nativerenderingplugin

Pbr proj
Shader of PBR for Unity
Stars: ✭ 68 (-77.26%)
Mutual labels:  unity, rendering
X Postprocessing Library
Unity Post Processing Stack Library | Unity引擎的高品质后处理库
Stars: ✭ 1,079 (+260.87%)
Mutual labels:  unity, rendering
Fontainebleaudemo
Fontainebleau demo
Stars: ✭ 524 (+75.25%)
Mutual labels:  unity, rendering
Lwrpambientocclusion
Post-Processing Stack v2 Ambient Occlusion works on Lightweight Render Pipeline
Stars: ✭ 179 (-40.13%)
Mutual labels:  unity, rendering
Unity Dithered Transparency Shader
Unity material and shader for applying clipped, dithered transparency
Stars: ✭ 174 (-41.81%)
Mutual labels:  unity, rendering
Cp sssss
Naive screen-space subsurface scattering solution for Unity 5.
Stars: ✭ 119 (-60.2%)
Mutual labels:  unity, rendering
Shadergraph
Unity ShaderGraph project
Stars: ✭ 1,009 (+237.46%)
Mutual labels:  unity, rendering
Herebedragons
A basic 3D scene implemented with various engines, frameworks or APIs.
Stars: ✭ 1,616 (+440.47%)
Mutual labels:  unity, rendering
Ssrt
Real-time indirect diffuse illuminaton using screen-space information for Unity.
Stars: ✭ 176 (-41.14%)
Mutual labels:  unity, rendering
Scriptablerenderpipeline
Scriptable Render Pipeline
Stars: ✭ 2,639 (+782.61%)
Mutual labels:  unity, rendering
Tutorial 2d Game Unity
Unity tutorial to learn how to make a complete 2D Shoot'em Up
Stars: ✭ 290 (-3.01%)
Mutual labels:  unity
Zcode Assetbundlepacker
Unity的AssetBundle模块扩展插件,主要目的用于简化AssetBundle打包,提供AssetBundle管理,支持热更新、支持资源包下载、支持版本控制。
Stars: ✭ 291 (-2.68%)
Mutual labels:  unity
Kcp
KCP C#版。线程安全,运行时无alloc,对gc无压力。
Stars: ✭ 294 (-1.67%)
Mutual labels:  unity
Enterprisepbrshadingmodel
Stars: ✭ 299 (+0%)
Mutual labels:  rendering
Angrybirdsstylegame
Angry Birds style game in Unity
Stars: ✭ 290 (-3.01%)
Mutual labels:  unity
Marching Cubes Terrain
Marching Cubes terrain implementation in Unity using the Job System and the Burst compiler
Stars: ✭ 292 (-2.34%)
Mutual labels:  unity
Ecsrx
A reactive take on the ECS pattern for .net game developers
Stars: ✭ 288 (-3.68%)
Mutual labels:  unity
Unity Script Collection
A maintained collection of useful & free unity scripts / library's / plugins and extensions
Stars: ✭ 3,640 (+1117.39%)
Mutual labels:  unity
Unityruntimespritesheetsgenerator
Unity – generate SpriteSheets at runtime!
Stars: ✭ 286 (-4.35%)
Mutual labels:  unity
Proceduralmotiontrack
Simple procedural motion with Unity Timeline.
Stars: ✭ 300 (+0.33%)
Mutual labels:  unity

Native code (C++) rendering plugin example for Unity

This sample demonstrates how to render and do other graphics related things from a C++ plugin, via a native plugin interface.

Unity versions:

  • 2018.1+ use tip of default branch.
  • 5.6, 5.5, 5.4: use corresponding unity-x.x tag.

The plugin itself does very few things:

  • Demonstrates basic plumbing. How to initialize the graphics API, and how calls from Unity into plugin are made.
  • Draws a triangle. A single colored rotating triangle in the middle of the screen. For each backend API, this shows bare basics of how to setup vertex data, setup some shaders or render states, and do a draw call.
  • Changes Unity texture data. Unity side passes a texture into the plugin, and the code changes the pixels of it each frame, with an animated "plasma" pattern. This demonstrates how to work with Texture.GetNativeTexturePtr.
  • Changes Unity mesh vertex data. Unity side passes a vertex buffer into the plugin, and the code changes the vertices each frame, with an animated "heightfield" pattern. This demonstrates how to work with Mesh.GetNativeVertexBufferPtr.

Native code rendering is implemented for several platforms and graphics APIs:

  • Windows (D3D11, D3D12, OpenGL, Vulkan)
    • Note that Vulkan is not compiled in by default (requires Vulkan SDK); enable it by editing #define SUPPORT_VULKAN 0 to 1 under UNITY_WIN clause in PlatformBase.h
  • macOS (Metal, OpenGL)
  • Linux (OpenGL, Vulkan)
  • Windows Store aka UWP (D3D11, D3D12)
  • WebGL (OpenGL ES)
  • Android (OpenGL ES, Vulkan)
  • iOS/tvOS (Metal; Simulator is supported if you use unity 2020+ and XCode 11+)
  • ...more platforms might be coming soon, we just did not get around to adding project files yet.

Code is organized as follows:

  • PluginSource is source code & IDE project files for the C++ plugin.
    • source: The source code itself. RenderingPlugin.cpp is the main logic, RenderAPI*.* files contain rendering implementations for different APIs.
    • projects/VisualStudio2015: Visual Studio 2015 project files for regular Windows plugin
    • projects/UWPVisualStudio2015: Visual Studio 2015 project files for Windows Store (UWP - Win10) plugin
    • projects/Xcode: Apple Xcode project file for Mac OS X plugin, Xcode 10.3 on macOS 10.14 was tested
    • projects/GNUMake: Makefile for Linux
  • UnityProject is the Unity (2018.3.9 was tested) project.
    • Single scene that contains the plugin sample scene.

What license are the graphics samples shipped under?

Just like with most other samples, the license is MIT/X11.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].