This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Changes from the original tutorial by Sohail Mehra: | |
// - updated to work with the async API: loading assets using Promises | |
// - renamed some variables and broke down the blur calculation in smaller steps: | |
// - "blend_color" becomes "colorAccumulator" | |
// - "blurUV" becomes "sampleUV" | |
// - "pixelWH" becomes "clusterSize" | |
// - added "clusterWidth" and "clusterHeight" | |
// - added "sampleOffset" and "averageColor" | |
const S = require('Shaders'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const S = require('Shaders'); | |
const M = require('Materials'); | |
const T = require('Textures'); | |
const R = require('Reactive'); | |
const Time = require('Time'); | |
async function main() | |
{ | |
// CPU code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to load in Modules | |
const M = require('Materials'); | |
const S = require('Shaders'); | |
const T = require('Textures'); | |
const R = require('Reactive'); | |
const Time = require('Time'); | |
// Use export keyword to make a symbol available in scripting debug mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Materials = require('Materials'); | |
const Textures = require('Textures'); | |
const Shaders = require('Shaders'); | |
const Time = require('Time'); | |
const Reactive = require('Reactive'); | |
async function main() | |
{ | |
const myMaterial = await Materials.findFirst('material0'); | |
const myCameraTexture = await Textures.findFirst('cameraTexture0'); |