mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-08 16:18:41 +12:00
metal: add all the files
This commit is contained in:
parent
0602467c61
commit
98b5d56021
18 changed files with 3041 additions and 12 deletions
9
src/host_shaders/metal_copy_to_lut_texture.metal
Normal file
9
src/host_shaders/metal_copy_to_lut_texture.metal
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include <metal_stdlib>
|
||||
using namespace metal;
|
||||
|
||||
constant ushort lutTextureWidth [[function_constant(0)]];
|
||||
|
||||
// The copy is done in a vertex shader instead of a compute kernel, since dispatching compute would require ending the render pass
|
||||
vertex void vertexCopyToLutTexture(uint vid [[vertex_id]], texture2d<float, access::write> out [[texture(0)]], constant float2* data [[buffer(0)]], constant uint& arrayOffset [[buffer(1)]]) {
|
||||
out.write(float4(data[vid], 0.0, 0.0), uint2(vid % lutTextureWidth, arrayOffset + vid / lutTextureWidth));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue