import '../../../../../globals.js';
import { combineOptions } from '../../../../../phet-core/js/optionize.js';
import { alpenglow, DIRECT_MODULE_DEFAULTS, DirectModule, MAIN_TWO_PASS_TILE_DEFAULTS, mainTwoPassTileWGSL } from '../../../imports.js';
export const MAIN_TWO_PASS_TILE_MODULE_DEFAULTS = {
    // eslint-disable-next-line phet/no-object-spread-on-non-literals
    ...DIRECT_MODULE_DEFAULTS,
    // eslint-disable-next-line phet/no-object-spread-on-non-literals
    ...MAIN_TWO_PASS_TILE_DEFAULTS
};
// inputSize: number - numRenderableFaces * numTiles
export default class MainTwoPassTileModule extends DirectModule {
    constructor(providedOptions) {
        const options = combineOptions({
            main: mainTwoPassTileWGSL(providedOptions),
            setDispatchSize: (dispatchSize, numRenderableFaceTiles) => {
                dispatchSize.x = Math.ceil(numRenderableFaceTiles / 256);
            }
        }, providedOptions);
        super(options);
        this.config = options.config;
        this.initialRenderableFaces = options.initialRenderableFaces;
        this.initialEdges = options.initialEdges;
        this.coarseRenderableFaces = options.coarseRenderableFaces;
        this.coarseEdges = options.coarseEdges;
        this.addresses = options.addresses;
    }
}
alpenglow.register('MainTwoPassTileModule', MainTwoPassTileModule);
//# sourceMappingURL=MainTwoPassTileModule.js.map