A scene the image holds by handle and changes; the host draws it. Each drawable carries its own vertex and fragment stages, its own attribute layout, named uniforms, buffers, a transform and a visibility flag -- described as objects rather than staged globals. A value says what it should do, ramp or oscillate, rather than what it is each frame: nothing crosses per frame, since the image has no business in the frame path any more than in the audio callback. Both renderers work it out on the clock that draws it.
13 lines
296 B
Swift
13 lines
296 B
Swift
import SwiftUI
|
|
|
|
struct WelcomeBackdrop: View {
|
|
@Environment(\.colorScheme) private var colorScheme
|
|
|
|
var body: some View {
|
|
ShaderEffectView(
|
|
program: .builtIn(function: "welcomeBackdropFragment"),
|
|
scheme: colorScheme == .light ? 1.0 : 0.0
|
|
)
|
|
}
|
|
}
|