mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
Migrated changes to WebGPU
This commit is contained in:
@@ -107,6 +107,7 @@ export default ({ config, device, timeBuffer }) => {
|
||||
bloomStrength: config.bloomStrength,
|
||||
ditherMagnitude: config.ditherMagnitude,
|
||||
backgroundColor: config.backgroundColor,
|
||||
cursorColor: config.cursorColor,
|
||||
});
|
||||
|
||||
const paletteUniforms = paletteShaderUniforms.Palette;
|
||||
|
||||
@@ -6,11 +6,6 @@ const rippleTypes = {
|
||||
circle: 1,
|
||||
};
|
||||
|
||||
const cycleStyles = {
|
||||
cycleFasterWhenDimmed: 0,
|
||||
cycleRandomly: 1,
|
||||
};
|
||||
|
||||
const numVerticesPerQuad = 2 * 3;
|
||||
|
||||
const makeConfigBuffer = (device, configUniforms, config, density, gridSize) => {
|
||||
@@ -19,7 +14,6 @@ const makeConfigBuffer = (device, configUniforms, config, density, gridSize) =>
|
||||
gridSize,
|
||||
density,
|
||||
showDebugView: config.effect === "none",
|
||||
cycleStyle: config.cycleStyleName in cycleStyles ? cycleStyles[config.cycleStyleName] : 0,
|
||||
rippleType: config.rippleTypeName in rippleTypes ? rippleTypes[config.rippleTypeName] : -1,
|
||||
slantScale: 1 / (Math.abs(Math.sin(2 * config.slant)) * (Math.sqrt(2) - 1) + 1),
|
||||
slantVec: [Math.cos(config.slant), Math.sin(config.slant)],
|
||||
|
||||
@@ -78,6 +78,7 @@ export default ({ config, device, timeBuffer }) => {
|
||||
bloomStrength: config.bloomStrength,
|
||||
ditherMagnitude: config.ditherMagnitude,
|
||||
backgroundColor: config.backgroundColor,
|
||||
cursorColor: config.cursorColor,
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user