FilmPass constructor
FilmPass(
- dynamic noiseIntensity,
- dynamic scanlinesIntensity,
- dynamic scanlinesCount,
- dynamic grayscale,
Implementation
FilmPass(
noiseIntensity,
scanlinesIntensity,
scanlinesCount,
grayscale,
) : super() {
var shader = filmShader;
uniforms = UniformsUtils.clone(Map<String, dynamic>.from(shader["uniforms"]));
material = ShaderMaterial({
"uniforms": uniforms,
"vertexShader": shader["vertexShader"],
"fragmentShader": shader["fragmentShader"],
});
if (grayscale != null) uniforms["grayscale"]["value"] = grayscale;
if (noiseIntensity != null) {
uniforms["nIntensity"]["value"] = noiseIntensity;
}
if (scanlinesIntensity != null) {
uniforms["sIntensity"]["value"] = scanlinesIntensity;
}
if (scanlinesCount != null) {
uniforms["sCount"]["value"] = scanlinesCount;
}
fsQuad = FullScreenQuad(material);
}