Releases: yukiny0811/EasyMetalShader
Releases · yukiny0811/EasyMetalShader
v3.3.1
v3.3.0
New Feature
- MTLCommandBuffer extension
Bug fix
- fixed swift-syntax dependency version
v3.2.1
fix
- fixed package dependencies
v3.2.0
New Feature
- array support
- double support
Fix
- small fix for ComputeShader3D
v3.1.1
Bug Fix
Fixed compilation error when using public
modifier with macro.
v3.1.0
3D Texture Support
@EMComputeShader3D
class MyCompute {
...
}
v3.0.0
Macro Update!
v3.0.0
@EMComputeShader
class MyCompute {
var tex: MTLTexture?
var intensity: Float = 0
var impl: String {
"float2 floatGid = float2(gid.x, gid.y);"
"float2 center = float2(tex.get_width() / 2, tex.get_height() / 2);"
"float dist = distance(center, floatGid);"
"float color = intensity / dist;"
"tex.write(float4(color, color, color, 1), gid);"
}
var customMetalCode: String { "" }
}
v2.2.1 (previous)
class MyCompute: EMMetalComputeFunction {
@EMArgument("tex") var tex: EMMetalTexture = .init(texture: nil, usage: .read_write)
@EMArgument("intensity") var intensity: Float = 0
@ShaderStringBuilder
override var impl: String {
"float2 floatGid = float2(gid.x, gid.y);"
"float2 center = float2(tex.get_width() / 2, tex.get_height() / 2);"
"float dist = distance(center, floatGid);"
"float color = intensity / dist;"
"tex.write(float4(color, color, color, 1), gid);"
}
}
v2.2.2
Fix
- fixed ios example
- fixed sample code on README
v2.2.1
Fix
- fixed issue: couldn't pass Int32 variables to the shader
v2.2.0
New Feature
- sample Texture Usage
Fix
- fixed MTLTexture creation