{"repo":"Unity-Technologies/NativeRenderingPlugin","free":true,"listed":false,"github":"https://github.com/Unity-Technologies/NativeRenderingPlugin","clone":"git clone https://github.com/Unity-Technologies/NativeRenderingPlugin.git","description":"C++ Rendering Plugin example for Unity","language":"C","stars":939,"topics":["unity","native-plugin","rendering"],"license":"MIT","category":"game-templates","readme_excerpt":"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: 2023.1+ use tip of default branch. 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 and DX12 are not compiled in by default Vulkan requires Vulkan SDK; enable it by editing #define SUPPORT VULKAN 0 to 1 under UNITY WIN clause in PlatformBase.h DX12 requires additional header files (see on github or nuget package); enable it by editing #define SUPPORT D3D12 0 to 1 under UNITY WIN clause in Pl","default_branch":null,"files":null,"tree":[],"storefront":"/r/Unity-Technologies","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Unity-Technologies/NativeRenderingPlugin/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}