Skip to content

Commit

Permalink
[Jetlagged] Only read time in drawWithCache (#1210)
Browse files Browse the repository at this point in the history
  • Loading branch information
riggaroo authored Nov 16, 2023
2 parents 0af7175 + 2f8a126 commit 30ff90a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ fun Modifier.yellowBackground(): Modifier = this.composed {
val shader = RuntimeShader(SHADER)
val shaderBrush = ShaderBrush(shader)
shader.setFloatUniform("iResolution", size.width, size.height)
shader.setFloatUniform("iTime", time)
// Pass the color to support color space automatically
shader.setColorUniform(
"iColor",
Color.valueOf(Yellow.red, Yellow.green, Yellow.blue, Yellow.alpha)
)
onDrawBehind {
shader.setFloatUniform("iTime", time)
drawRect(shaderBrush)
}
}
Expand Down

0 comments on commit 30ff90a

Please sign in to comment.