Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Sol R | 279 | 4 years ago | n,ull | other | C++ | |||||
Open-Source CUDA/OpenCL Speed Of Light Ray-tracer | ||||||||||
Cef Mixer | 84 | 3 years ago | 6 | mit | C++ | |||||
High Performance off-screen rendering (OSR) demo using CEF | ||||||||||
Sluggish | 61 | 4 years ago | unlicense | C | ||||||
Toy CPU and GPU implementations of the Slug rendering algorithm | ||||||||||
Goldensun | 17 | 2 years ago | 8 | mit | C++ | |||||
A path tracer based on hardware ray tracing | ||||||||||
Lavaframe | 16 | 10 months ago | 1 | other | C++ | |||||
An interactive, GPU based path tracing renderer. | ||||||||||
Nexus | 12 | 8 years ago | ActionScript | |||||||
:framed_picture: Actionscript 3, GPU accelerated 2D game engine using Stage3D | ||||||||||
Gpu | 9 | 8 months ago | 1 | apache-2.0 | C | |||||
🔭 cross platform general purpose GPU library - optimized for rendering | ||||||||||
Gpu Raytracing | 3 | 6 years ago | mit | HLSL | ||||||
Simple real-time raytracing demo running as a fragment shader on the computer's graphics card. | ||||||||||
Azure Glx Rendering | 3 | 4 years ago | Shell | |||||||
Multi-container OpenGL/GLX rendering in Azure | ||||||||||
Azure Batch Glx Rendering | 1 | 4 years ago | Python | |||||||
Move OpenGL/GLX rendering at containers on new level running its in Azure Batch |
This is cross platform GPU library based on Apple's Metal API. Library is written in C language and it provides and will provide C API. Since this is C API, language bindings can be written for any language.
I'll announce after first release is ready.
I'll try to create new shading language that called ("Universal Shading Language") (https://github.com/UniversalShading). GPU library will use that high level language for shading. Shading language will be translated/compiled into GLSL, HLSL or Metal Shaders... Since GPU library will be cross platform, this will also make shading language cross platform...
GPU library provides GPUApi
structure and headers. In theory any GPU API e.g. Metal, Vulkan, DirectX, OpenGL... could be bind this GPU library.
Switching between GPU APIs will be easy: GPUSwitchGPUApi(GPU_BACKEND_METAL);
or auto select GPUSwitchGPUApiAuto()
.
This section and others will be documented in detail later...
TODO: GPUSetFrontFace()
vs gpuSetFrontFace()
vs gpu_set_frontface()
, feedbacks
I have translated Xcode's Game template project's renderer codes into GPU library (This may be obsoleted by time):
GPUSwitchGPUApi(GPU_BACKEND_METAL);
device = GPUCreateSystemDefaultDevice();
pipeline = GPUNewPipeline(GPUPixelFormatBGRA8Unorm_sRGB);
library = GPUDefaultLibrary(device);
vertFunc = GPUNewFunction(library, "vertexShader");
fragFunc = GPUNewFunction(library, "fragmentShader");
vert = GPUNewVertexDesc();
GPUAttrib(vert, VertexAttributePosition, GPUFloat3, 0, BufferIndexMeshPositions);
GPUAttrib(vert, VertexAttributeTexcoord, GPUFloat2, 0, BufferIndexMeshGenerics);
GPULayout(vert, BufferIndexMeshPositions, 12, 1, GPUPerVertex);
GPULayout(vert, BufferIndexMeshGenerics, 8, 1, GPUPerVertex);
GPUSetFunction(pipeline, vertFunc, GPU_FUNCTION_VERT);
GPUSetFunction(pipeline, fragFunc, GPU_FUNCTION_FRAG);
GPUSetVertexDesc(pipeline, vert);
GPUColorFormat(pipeline, 0, (GPUPixelFormat)_view.colorPixelFormat);
GPUDepthFormat(pipeline, (GPUPixelFormat)_view.depthStencilPixelFormat);
GPUStencilFormat(pipeline, (GPUPixelFormat)_view.depthStencilPixelFormat);
GPUSampleCount(pipeline, (uint32_t)_view.sampleCount);
renderState = GPUNewRenderState(device, pipeline);
depthStencil = GPUNewDepthStencil(GPUCompareFunctionLess, true);
depthStencilState = GPUNewDepthStencilState(device, depthStencil);
dynamicUniformBuffer = GPUNewBuffer(device, uniformBufferSize, GPUResourceStorageModeShared);
commandQueue = GPUNewCommandQueue(device);
- (void)drawInMTKView:(nonnull MTKView *)view {
dispatch_semaphore_wait(_inFlightSemaphore, DISPATCH_TIME_FOREVER);
cmdb = GPUNewCommandBuffer(commandQueue, _inFlightSemaphore, cmdOnComplete);
[self _updateDynamicBufferState];
[self _updateGameState];
if ((pass = GPUPassFromMTKView(view))) {
GPURenderCommandEncoder *rce;
rce = GPUNewRenderCommandEncoder(cmdb, pass);
{
GPUSetFrontFace(rce, GPUWindingCounterClockwise);
GPUSetCullMode(rce, GPUCullModeBack);
GPUSetRenderState(rce, renderState);
GPUSetDepthStencil(rce, depthStencilState);
GPUSetVertexBuffer(rce, dynamicUniformBuffer, uniformBufferOffset, BufferIndexUniforms);
GPUSetFragmentBuffer(rce, dynamicUniformBuffer, uniformBufferOffset, BufferIndexUniforms);
GPUSetFragmentTexture(rce, _colorMap, TextureIndexColor);
GPULoadAndDrawMTKMesh(rce, _mesh);
}
GPUEndEncoding(rce);
GPUPresent(cmdb, view.currentDrawable);
}
GPUCommit(cmdb);
}
Apple name/logo and Metal are trademarks of Apple Inc. Vulkan and OpeenGL are trademarks of Khronos Group. DirectX is trademark of Microsoft Corp.