Piotr Prus
01/17/2023, 9:34 AMBox(modifier = Modifier.fillMaxSize()) {
Image(
painter = painterResource(id = R.drawable.picture1),
contentDescription = "",
modifier = Modifier.fillMaxSize(),
contentScale = ContentScale.FillHeight
)
Box(modifier = Modifier
.fillMaxWidth()
.fillMaxHeight()
.align(Alignment.Center)
.graphicsLayer {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
val blur = RenderEffect.createBlurEffect(30f, 30f, Shader.TileMode.CLAMP)
val shader = RenderEffect.createRuntimeShaderEffect(FROSTED_GLASS_SHADER, "inputShader")
renderEffect = RenderEffect.createChainEffect(blur, shader).asComposeRenderEffect()
}
}
)
}
Zoltan Demant
01/17/2023, 9:40 AMPiotr Prus
01/17/2023, 9:52 AMZoltan Demant
01/17/2023, 10:06 AMModifier.blur
then? It has some code that reminds me of yours, might be useful 😃mgrazianodecastro
01/17/2023, 6:14 PMPiotr Prus
01/18/2023, 8:40 AMModifier.blur
works for the composable that use that modifier. It not affects the composable underneath. That is why you need to use rendereffect, but I have troubles applying it in composable 😞