Skip to content

Releases: yukiny0811/EasyMetalShader

v3.3.1

06 Feb 13:41
fc4810f
Compare
Choose a tag to compare

New Feature

  • Added AI Documentation (url is in README)
  • Fixed ShaderCore access

v3.3.0

06 Feb 09:02
Compare
Choose a tag to compare

New Feature

  • MTLCommandBuffer extension

Bug fix

  • fixed swift-syntax dependency version

v3.2.1

25 Aug 17:01
Compare
Choose a tag to compare

fix

  • fixed package dependencies

v3.2.0

31 Jul 18:04
a53491d
Compare
Choose a tag to compare

New Feature

  • array support
  • double support

Fix

  • small fix for ComputeShader3D

v3.1.1

03 Feb 10:31
d482c6d
Compare
Choose a tag to compare

Bug Fix

Fixed compilation error when using public modifier with macro.

v3.1.0

12 Jan 16:46
b256285
Compare
Choose a tag to compare

3D Texture Support

@EMComputeShader3D
class MyCompute {
    ...
}

v3.0.0

12 Jan 12:01
f407bca
Compare
Choose a tag to compare

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

09 Jan 20:03
d562540
Compare
Choose a tag to compare

Fix

  • fixed ios example
  • fixed sample code on README

v2.2.1

09 Jan 18:37
Compare
Choose a tag to compare

Fix

  • fixed issue: couldn't pass Int32 variables to the shader

v2.2.0

09 Jan 18:23
41278e9
Compare
Choose a tag to compare

New Feature

  • sample Texture Usage

Fix

  • fixed MTLTexture creation