Skip to content

Instantly share code, notes, and snippets.

@tomaspietravallo
Created August 5, 2020 15:46
Show Gist options
  • Save tomaspietravallo/2fd8cdd58550dbf8872780d78cbf3990 to your computer and use it in GitHub Desktop.
Save tomaspietravallo/2fd8cdd58550dbf8872780d78cbf3990 to your computer and use it in GitHub Desktop.
const LightingEstimation = require("LightingEstimation"); // import the LightingEstimation module
const Patches = require("Patches"); // import the Patches module
// Patches.inputs.setScalar("brightness", theSecondArgument) sends the second argument (the one after the comma) to a 'from script' (number) variable called brightness
// (On patches select the script and create that variable (there's a menu on the right), then drag the script to the patch editor)
// LightingEstimation.frameBrightness gets a 0-1 value representing the frame brightness
Patches.inputs.setScalar('brightness', LightingEstimation.frameBrightness);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment