Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@luma.gl/shadertools

Package Overview
Dependencies
Maintainers
6
Versions
245
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@luma.gl/shadertools - npm Package Compare versions

Comparing version 9.1.0-alpha.19 to 9.1.0-beta.1

dist/index.js.map

39

dist/index.d.ts

@@ -43,41 +43,2 @@ /**

export { pbrMaterial } from "./modules/lighting/pbr-material/pbr-material.js";
export type { BrightnessContrastProps, BrightnessContrastUniforms } from "./passes/postprocessing/image-adjust-filters/brightnesscontrast.js";
export { brightnessContrast } from "./passes/postprocessing/image-adjust-filters/brightnesscontrast.js";
export type { DenoiseProps, DenoiseUniforms } from "./passes/postprocessing/image-adjust-filters/denoise.js";
export { denoise } from "./passes/postprocessing/image-adjust-filters/denoise.js";
export type { HueSaturationProps, HueSaturationUniforms } from "./passes/postprocessing/image-adjust-filters/huesaturation.js";
export { hueSaturation } from "./passes/postprocessing/image-adjust-filters/huesaturation.js";
export type { NoiseProps, NoiseUniforms } from "./passes/postprocessing/image-adjust-filters/noise.js";
export { noise } from "./passes/postprocessing/image-adjust-filters/noise.js";
export type { SepiaProps, SepiaUniforms } from "./passes/postprocessing/image-adjust-filters/sepia.js";
export { sepia } from "./passes/postprocessing/image-adjust-filters/sepia.js";
export type { VibranceProps, VibranceUniforms } from "./passes/postprocessing/image-adjust-filters/vibrance.js";
export { vibrance } from "./passes/postprocessing/image-adjust-filters/vibrance.js";
export type { VignetteProps, VignetteUniforms } from "./passes/postprocessing/image-adjust-filters/vignette.js";
export { vignette } from "./passes/postprocessing/image-adjust-filters/vignette.js";
export type { TiltShiftProps, TiltShiftUniforms } from "./passes/postprocessing/image-blur-filters/tiltshift.js";
export { tiltShift } from "./passes/postprocessing/image-blur-filters/tiltshift.js";
export type { TriangleBlurProps, TriangleBlurUniforms } from "./passes/postprocessing/image-blur-filters/triangleblur.js";
export { triangleBlur } from "./passes/postprocessing/image-blur-filters/triangleblur.js";
export type { ZoomBlurProps, ZoomBlurUniforms } from "./passes/postprocessing/image-blur-filters/zoomblur.js";
export { zoomBlur } from "./passes/postprocessing/image-blur-filters/zoomblur.js";
export type { ColorHalftoneProps, ColorHalftoneUniforms } from "./passes/postprocessing/image-fun-filters/colorhalftone.js";
export { colorHalftone } from "./passes/postprocessing/image-fun-filters/colorhalftone.js";
export type { DotScreenProps, DotScreenUniforms } from "./passes/postprocessing/image-fun-filters/dotscreen.js";
export { dotScreen } from "./passes/postprocessing/image-fun-filters/dotscreen.js";
export type { EdgeWorkProps, EdgeWorkUniforms } from "./passes/postprocessing/image-fun-filters/edgework.js";
export { edgeWork } from "./passes/postprocessing/image-fun-filters/edgework.js";
export type { HexagonalPixelateProps, HexagonalPixelateUniforms } from "./passes/postprocessing/image-fun-filters/hexagonalpixelate.js";
export { hexagonalPixelate } from "./passes/postprocessing/image-fun-filters/hexagonalpixelate.js";
export type { InkProps, InkUniforms } from "./passes/postprocessing/image-fun-filters/ink.js";
export { ink } from "./passes/postprocessing/image-fun-filters/ink.js";
export type { MagnifyProps, MagnifyUniforms } from "./passes/postprocessing/image-fun-filters/magnify.js";
export { magnify } from "./passes/postprocessing/image-fun-filters/magnify.js";
export type { BulgePinchProps, BulgePinchUniforms } from "./passes/postprocessing/image-warp-filters/bulgepinch.js";
export { bulgePinch } from "./passes/postprocessing/image-warp-filters/bulgepinch.js";
export type { SwirlProps, SwirlUniforms } from "./passes/postprocessing/image-warp-filters/swirl.js";
export { swirl } from "./passes/postprocessing/image-warp-filters/swirl.js";
export { fxaa } from "./passes/postprocessing/fxaa/fxaa.js";
export type { WarpProps, WarpUniforms } from "./passes/postprocessing/image-warp-filters/warp.js";
export { warp as _warp } from "./passes/postprocessing/image-warp-filters/warp.js";
export { fp64, fp64arithmetic } from "./modules-webgl1/math/fp64/fp64.js";

@@ -84,0 +45,0 @@ export { geometry as geometry1 } from "./modules-webgl1/geometry/geometry.js";

23

dist/index.js

@@ -37,24 +37,2 @@ // luma.gl

export { pbrMaterial } from "./modules/lighting/pbr-material/pbr-material.js";
export { brightnessContrast } from "./passes/postprocessing/image-adjust-filters/brightnesscontrast.js";
export { denoise } from "./passes/postprocessing/image-adjust-filters/denoise.js";
export { hueSaturation } from "./passes/postprocessing/image-adjust-filters/huesaturation.js";
export { noise } from "./passes/postprocessing/image-adjust-filters/noise.js";
export { sepia } from "./passes/postprocessing/image-adjust-filters/sepia.js";
export { vibrance } from "./passes/postprocessing/image-adjust-filters/vibrance.js";
export { vignette } from "./passes/postprocessing/image-adjust-filters/vignette.js";
export { tiltShift } from "./passes/postprocessing/image-blur-filters/tiltshift.js";
export { triangleBlur } from "./passes/postprocessing/image-blur-filters/triangleblur.js";
export { zoomBlur } from "./passes/postprocessing/image-blur-filters/zoomblur.js";
export { colorHalftone } from "./passes/postprocessing/image-fun-filters/colorhalftone.js";
export { dotScreen } from "./passes/postprocessing/image-fun-filters/dotscreen.js";
export { edgeWork } from "./passes/postprocessing/image-fun-filters/edgework.js";
export { hexagonalPixelate } from "./passes/postprocessing/image-fun-filters/hexagonalpixelate.js";
export { ink } from "./passes/postprocessing/image-fun-filters/ink.js";
export { magnify } from "./passes/postprocessing/image-fun-filters/magnify.js";
export { bulgePinch } from "./passes/postprocessing/image-warp-filters/bulgepinch.js";
export { swirl } from "./passes/postprocessing/image-warp-filters/swirl.js";
// Postprocessing modules
// export type {FXAAProps, FXAAUniforms} from './passes/postprocessing/fxaa/fxaa';
export { fxaa } from "./passes/postprocessing/fxaa/fxaa.js";
export { warp as _warp } from "./passes/postprocessing/image-warp-filters/warp.js";
// DEPRECATED - v8 legacy shader modules (non-uniform buffer)

@@ -70,1 +48,2 @@ // math libraries

export { pbr } from "./modules-webgl1/lighting/pbr/pbr.js";
//# sourceMappingURL=index.js.map

@@ -96,1 +96,2 @@ // luma.gl

}
//# sourceMappingURL=prop-types.js.map

@@ -33,1 +33,2 @@ // luma.gl

}
//# sourceMappingURL=get-shader-info.js.map

@@ -92,1 +92,2 @@ // luma.gl

}
//# sourceMappingURL=shader-utils.js.map

@@ -27,1 +27,2 @@ // luma.gl

}
//# sourceMappingURL=preprocessor.js.map

@@ -119,1 +119,2 @@ // luma.gl

}
//# sourceMappingURL=shader-assembler.js.map

@@ -164,3 +164,3 @@ // luma.gl

function assembleShaderGLSL(platformInfo, options) {
const { id, source, stage, language = 'glsl', modules, defines = {}, hookFunctions = [], inject = {}, prologue = true, log } = options;
const { source, stage, language = 'glsl', modules, defines = {}, hookFunctions = [], inject = {}, prologue = true, log } = options;
assert(typeof source === 'string', 'shader source must be a string');

@@ -192,3 +192,2 @@ const sourceVersion = language === 'glsl' ? getShaderInfo(source).version : -1;

// ----- PROLOGUE -------------------------
${getShaderNameDefine({ id, source, stage })}
${`#define SHADER_TYPE_${stage.toUpperCase()}`}

@@ -293,14 +292,20 @@

/**
* NOTE: Removed as id injection defeated caching of shaders
*
* Generate "glslify-compatible" SHADER_NAME defines
* These are understood by the GLSL error parsing function
* If id is provided and no SHADER_NAME constant is present in source, create one
*/
function getShaderNameDefine(options) {
const { id, source, stage } = options;
const injectShaderName = id && source.indexOf('SHADER_NAME') === -1;
return injectShaderName
? `
unction getShaderNameDefine(options: {
id?: string;
source: string;
stage: 'vertex' | 'fragment';
}): string {
const {id, source, stage} = options;
const injectShaderName = id && source.indexOf('SHADER_NAME') === -1;
return injectShaderName
? `
#define SHADER_NAME ${id}_${stage}`
: '';
: '';
}
*/
/** Generates application defines from an object of key value pairs */

@@ -406,1 +411,2 @@ function getApplicationDefines(defines = {}) {

*/
//# sourceMappingURL=assemble-shaders.js.map

@@ -52,1 +52,2 @@ // luma.gl

}
//# sourceMappingURL=platform-defines.js.map

@@ -5,1 +5,2 @@ // luma.gl

export {};
//# sourceMappingURL=platform-info.js.map

@@ -61,1 +61,2 @@ // luma.gl

}
//# sourceMappingURL=shader-hooks.js.map

@@ -126,1 +126,2 @@ // luma.gl

}
//# sourceMappingURL=shader-injections.js.map

@@ -15,1 +15,2 @@ // luma.gl

}
//# sourceMappingURL=generate-shader.js.map

@@ -76,1 +76,2 @@ // luma.gl

}
//# sourceMappingURL=generate-glsl.js.map

@@ -12,1 +12,2 @@ // luma.gl

}
//# sourceMappingURL=capitalize.js.map

@@ -20,1 +20,2 @@ // luma.gl

}
//# sourceMappingURL=generate-wgsl.js.map

@@ -90,1 +90,2 @@ // luma.gl

}
//# sourceMappingURL=shader-module-dependencies.js.map

@@ -100,1 +100,2 @@ // luma.gl

}
//# sourceMappingURL=shader-module.js.map

@@ -5,1 +5,2 @@ // luma.gl

export {};
//# sourceMappingURL=shader-pass.js.map

@@ -69,1 +69,2 @@ // luma.gl

}
//# sourceMappingURL=transpile-glsl-shader.js.map

@@ -11,1 +11,2 @@ // luma.gl

}
//# sourceMappingURL=assert.js.map
export {};
//# sourceMappingURL=uniform-types.js.map

@@ -32,8 +32,24 @@ // luma.gl

name: uniform.name,
group: uniform.group,
location: uniform.binding,
// @ts-expect-error
group: uniform.group,
// @ts-expect-error TODO - unused for now but needs fixing
members
});
}
for (const texture of parsedWGSL.textures) {
shaderLayout.bindings.push({
type: 'texture',
name: texture.name,
group: texture.group,
location: texture.binding
});
}
for (const sampler of parsedWGSL.samplers) {
shaderLayout.bindings.push({
type: 'sampler',
name: sampler.name,
group: sampler.group,
location: sampler.binding
});
}
const vertex = parsedWGSL.entry.vertex[0]; // "main"

@@ -78,1 +94,2 @@ // Vertex shader inputs

}
//# sourceMappingURL=get-shader-layout-wgsl.js.map

@@ -31,1 +31,2 @@ // luma.gl

`;
//# sourceMappingURL=module-injectors.js.map

@@ -39,1 +39,2 @@ // import {ShaderModule} from '../../types';

};
//# sourceMappingURL=geometry.js.map

@@ -38,1 +38,2 @@ // luma.gl

};
//# sourceMappingURL=dirlight.js.map

@@ -40,1 +40,2 @@ // luma.gl

`;
//# sourceMappingURL=lights-glsl.js.map

@@ -93,1 +93,2 @@ // luma.gl

};
//# sourceMappingURL=lights.js.map

@@ -393,1 +393,2 @@ // luma.gl

`;
//# sourceMappingURL=pbr-fragment-glsl.js.map

@@ -43,1 +43,2 @@ // luma.gl

`;
//# sourceMappingURL=pbr-vertex-glsl.js.map

@@ -21,1 +21,2 @@ // luma.gl

};
//# sourceMappingURL=pbr.js.map

@@ -79,1 +79,2 @@ // luma.gl

`;
//# sourceMappingURL=phong-lighting-glsl.js.map

@@ -44,1 +44,2 @@ // luma.gl

};
//# sourceMappingURL=phong-lighting.js.map

@@ -171,1 +171,2 @@ // luma.gl

`;
//# sourceMappingURL=fp64-arithmetic-glsl.js.map

@@ -675,1 +675,2 @@ // luma.gl

`;
//# sourceMappingURL=fp64-functions-glsl.js.map

@@ -38,1 +38,2 @@ // luma.gl

};
//# sourceMappingURL=fp64.js.map

@@ -114,1 +114,2 @@ // luma.gl

};
//# sourceMappingURL=project.js.map

@@ -42,1 +42,2 @@ // luma.gl

};
//# sourceMappingURL=geometry.js.map

@@ -197,1 +197,2 @@ // luma.gl

}
//# sourceMappingURL=picking.js.map

@@ -127,1 +127,2 @@ // luma.gl

};
//# sourceMappingURL=project.js.map

@@ -49,1 +49,2 @@ // luma.gl

};
//# sourceMappingURL=transform.js.map

@@ -37,1 +37,2 @@ // luma.gl

};
//# sourceMappingURL=gouraud-material.js.map

@@ -80,1 +80,2 @@ // luma.gl

`;
//# sourceMappingURL=lighting-uniforms-glsl.js.map

@@ -57,1 +57,2 @@ // luma.gl

`;
//# sourceMappingURL=lighting-uniforms-wgsl.js.map

@@ -155,1 +155,2 @@ // luma.gl

}
//# sourceMappingURL=lighting.js.map

@@ -1,4 +0,4 @@

import type { Vector3Like } from '@math.gl/core';
import type { NumberArray3 } from '@math.gl/core';
export type DirlightProps = {
lightDirection?: Vector3Like;
lightDirection?: NumberArray3;
};

@@ -5,0 +5,0 @@ export type DirlightUniforms = DirlightProps;

@@ -85,1 +85,2 @@ // luma.gl

}
//# sourceMappingURL=dirlight.js.map

@@ -412,1 +412,2 @@ // luma.gl

`;
//# sourceMappingURL=pbr-fragment-glsl.js.map

@@ -57,1 +57,2 @@ // luma.gl

};
//# sourceMappingURL=pbr-material.js.map

@@ -25,1 +25,2 @@ // luma.gl

};
//# sourceMappingURL=pbr-projection.js.map

@@ -67,1 +67,2 @@ // luma.gl

`;
//# sourceMappingURL=pbr-uniforms-glsl.js.map

@@ -39,1 +39,2 @@ // luma.gl

`;
//# sourceMappingURL=pbr-vertex-glsl.js.map

@@ -38,1 +38,2 @@ // luma.gl

};
//# sourceMappingURL=phong-material.js.map

@@ -59,1 +59,2 @@ // luma.gl

`;
//# sourceMappingURL=phong-shaders-glsl.js.map

@@ -131,1 +131,2 @@ // luma.gl

*/
//# sourceMappingURL=phong-shaders-wgsl.js.map

@@ -117,1 +117,2 @@ // luma.gl

}
//# sourceMappingURL=fp16-utils.js.map

@@ -164,1 +164,2 @@ // luma.gl

};
//# sourceMappingURL=fp32.js.map

@@ -42,1 +42,2 @@ // luma.gl

}
//# sourceMappingURL=fp64-utils.js.map

@@ -15,1 +15,2 @@ // luma.gl

};
//# sourceMappingURL=random.js.map

@@ -31,1 +31,2 @@ // luma.gl

`;
//# sourceMappingURL=module-injectors.js.map

@@ -5,1 +5,2 @@ // luma.gl

export {};
//# sourceMappingURL=types.js.map
{
"name": "@luma.gl/shadertools",
"version": "9.1.0-alpha.19",
"version": "9.1.0-beta.1",
"description": "Shader module system for luma.gl",

@@ -49,10 +49,10 @@ "type": "module",

"peerDependencies": {
"@luma.gl/core": "9.1.0-alpha.17"
"@luma.gl/core": "9.1.0-alpha.19"
},
"dependencies": {
"@math.gl/core": "4.1.0-alpha.3",
"@math.gl/types": "4.1.0-alpha.3",
"@math.gl/core": "^4.1.0",
"@math.gl/types": "^4.1.0",
"wgsl_reflect": "^1.0.1"
},
"gitHead": "c836c09a5105e2515a036abff4a1b926d245a152"
"gitHead": "e04bfb138f96d690992f0e0a67b358cbe23bd59f"
}

@@ -93,98 +93,2 @@ // luma.gl

// POST PROCESSING / SHADER PASS MODULES
// glfx image adjustment shader modules
export type {
BrightnessContrastProps,
BrightnessContrastUniforms
} from './passes/postprocessing/image-adjust-filters/brightnesscontrast';
export {brightnessContrast} from './passes/postprocessing/image-adjust-filters/brightnesscontrast';
export type {
DenoiseProps,
DenoiseUniforms
} from './passes/postprocessing/image-adjust-filters/denoise';
export {denoise} from './passes/postprocessing/image-adjust-filters/denoise';
export type {
HueSaturationProps,
HueSaturationUniforms
} from './passes/postprocessing/image-adjust-filters/huesaturation';
export {hueSaturation} from './passes/postprocessing/image-adjust-filters/huesaturation';
export type {NoiseProps, NoiseUniforms} from './passes/postprocessing/image-adjust-filters/noise';
export {noise} from './passes/postprocessing/image-adjust-filters/noise';
export type {SepiaProps, SepiaUniforms} from './passes/postprocessing/image-adjust-filters/sepia';
export {sepia} from './passes/postprocessing/image-adjust-filters/sepia';
export type {
VibranceProps,
VibranceUniforms
} from './passes/postprocessing/image-adjust-filters/vibrance';
export {vibrance} from './passes/postprocessing/image-adjust-filters/vibrance';
export type {
VignetteProps,
VignetteUniforms
} from './passes/postprocessing/image-adjust-filters/vignette';
export {vignette} from './passes/postprocessing/image-adjust-filters/vignette';
// glfx BLUR shader modules
export type {
TiltShiftProps,
TiltShiftUniforms
} from './passes/postprocessing/image-blur-filters/tiltshift';
export {tiltShift} from './passes/postprocessing/image-blur-filters/tiltshift';
export type {
TriangleBlurProps,
TriangleBlurUniforms
} from './passes/postprocessing/image-blur-filters/triangleblur';
export {triangleBlur} from './passes/postprocessing/image-blur-filters/triangleblur';
export type {
ZoomBlurProps,
ZoomBlurUniforms
} from './passes/postprocessing/image-blur-filters/zoomblur';
export {zoomBlur} from './passes/postprocessing/image-blur-filters/zoomblur';
// glfx FUN shader modules
export type {
ColorHalftoneProps,
ColorHalftoneUniforms
} from './passes/postprocessing/image-fun-filters/colorhalftone';
export {colorHalftone} from './passes/postprocessing/image-fun-filters/colorhalftone';
export type {
DotScreenProps,
DotScreenUniforms
} from './passes/postprocessing/image-fun-filters/dotscreen';
export {dotScreen} from './passes/postprocessing/image-fun-filters/dotscreen';
export type {
EdgeWorkProps,
EdgeWorkUniforms
} from './passes/postprocessing/image-fun-filters/edgework';
export {edgeWork} from './passes/postprocessing/image-fun-filters/edgework';
export type {
HexagonalPixelateProps,
HexagonalPixelateUniforms
} from './passes/postprocessing/image-fun-filters/hexagonalpixelate';
export {hexagonalPixelate} from './passes/postprocessing/image-fun-filters/hexagonalpixelate';
export type {InkProps, InkUniforms} from './passes/postprocessing/image-fun-filters/ink';
export {ink} from './passes/postprocessing/image-fun-filters/ink';
export type {
MagnifyProps,
MagnifyUniforms
} from './passes/postprocessing/image-fun-filters/magnify';
export {magnify} from './passes/postprocessing/image-fun-filters/magnify';
// glfx WARP shader modules
export type {
BulgePinchProps,
BulgePinchUniforms
} from './passes/postprocessing/image-warp-filters/bulgepinch';
export {bulgePinch} from './passes/postprocessing/image-warp-filters/bulgepinch';
export type {SwirlProps, SwirlUniforms} from './passes/postprocessing/image-warp-filters/swirl';
export {swirl} from './passes/postprocessing/image-warp-filters/swirl';
// Postprocessing modules
// export type {FXAAProps, FXAAUniforms} from './passes/postprocessing/fxaa/fxaa';
export {fxaa} from './passes/postprocessing/fxaa/fxaa';
// experimental modules
export type {WarpProps, WarpUniforms} from './passes/postprocessing/image-warp-filters/warp';
export {warp as _warp} from './passes/postprocessing/image-warp-filters/warp';
// DEPRECATED - v8 legacy shader modules (non-uniform buffer)

@@ -191,0 +95,0 @@

@@ -291,3 +291,2 @@ // luma.gl

const {
id,
source,

@@ -335,3 +334,2 @@ stage,

// ----- PROLOGUE -------------------------
${getShaderNameDefine({id, source, stage})}
${`#define SHADER_TYPE_${stage.toUpperCase()}`}

@@ -448,7 +446,8 @@

/**
* NOTE: Removed as id injection defeated caching of shaders
*
* Generate "glslify-compatible" SHADER_NAME defines
* These are understood by the GLSL error parsing function
* If id is provided and no SHADER_NAME constant is present in source, create one
*/
function getShaderNameDefine(options: {
unction getShaderNameDefine(options: {
id?: string;

@@ -465,2 +464,3 @@ source: string;

}
*/

@@ -467,0 +467,0 @@ /** Generates application defines from an object of key value pairs */

@@ -36,5 +36,5 @@ // luma.gl

name: uniform.name,
group: uniform.group,
location: uniform.binding,
// @ts-expect-error
group: uniform.group,
// @ts-expect-error TODO - unused for now but needs fixing
members

@@ -44,2 +44,20 @@ });

for (const texture of parsedWGSL.textures) {
shaderLayout.bindings.push({
type: 'texture',
name: texture.name,
group: texture.group,
location: texture.binding
});
}
for (const sampler of parsedWGSL.samplers) {
shaderLayout.bindings.push({
type: 'sampler',
name: sampler.name,
group: sampler.group,
location: sampler.binding
});
}
const vertex = parsedWGSL.entry.vertex[0]; // "main"

@@ -46,0 +64,0 @@

@@ -5,7 +5,7 @@ // luma.gl

import type {Vector3Like} from '@math.gl/core';
import type {NumberArray3} from '@math.gl/core';
import {ShaderModule} from '../../../lib/shader-module/shader-module';
export type DirlightProps = {
lightDirection?: Vector3Like;
lightDirection?: NumberArray3;
};

@@ -12,0 +12,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc