Skip to content

Commit

Permalink
Replaced ShaderCache transpilation function with transpile
Browse files Browse the repository at this point in the history
  • Loading branch information
Laxystem committed Jan 23, 2025
1 parent a2588fc commit a8a9ef4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/commonMain/kotlin/Shaders.kt
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ public fun <Vertex : Any> wgslVertexShaderOf(
*/
public fun ShaderCache(transpiler: Shader.Transpiler<*, *>): Cache<Shader, Shader?> =
object : Cache<Shader, Shader?> {
private val transpiledShaders =
ManualCache<Shader, Shader?> { transpiler(it)?.takeIf(Shader::isCarryingRequiredMetadata) }
private val transpiledShaders = ManualCache<Shader, Shader?>(transpiler::transpile)

/**
* @author Laxystem
Expand Down

0 comments on commit a8a9ef4

Please sign in to comment.