bloomSource function

BloomSource? bloomSource(
  1. ShaderBindings b
)

What the three bloom stages share: the source texture and its texel size.

Implementation

BloomSource? bloomSource(ShaderBindings b) {
  final source = b.textures['source_texture'];
  if (source == null) return null;
  final params = b.vec4('BloomInfo', 'params', Vector4.zero());
  return BloomSource(
    source: source,
    tx: params.x,
    ty: params.y,
    params: params,
  );
}