MCPcopy Create free account
hub / github.com/microsoft/SandDance / processAttributeDefinition

Function processAttributeDefinition

docs/app/js/sanddance-app.js:77957–77979  ·  view source on GitHub ↗
(line, textureMap)

Source from the content-addressed store, hash-verified

77955 return qualaiferDetails.name === varying ? qualaiferDetails.type : null;
77956}
77957function processAttributeDefinition(line, textureMap) {
77958 var samplerTextureMap = {};
77959 var attributeData = getAttributeDefinition(line);
77960 if (!attributeData) return null;
77961 var type = attributeData.type, name = attributeData.name;
77962 if (name && textureMap[name]) {
77963 var updatedLine = "// ".concat(line, " => Replaced by Transform with a sampler");
77964 var _getSamplerDecleratio = getSamplerDeclerations(name), samplerName = _getSamplerDecleratio.samplerName, sizeName = _getSamplerDecleratio.sizeName, uniformDeclerations = _getSamplerDecleratio.uniformDeclerations;
77965 var channels = (0, _shadertools.typeToChannelSuffix)(type);
77966 var sampleInstruction = " ".concat(type, " ").concat(name, " = transform_getInput(").concat(samplerName, ", ").concat(sizeName, ").").concat(channels, ";\n");
77967 samplerTextureMap[samplerName] = name;
77968 var inject = {
77969 "vs:#decl": uniformDeclerations,
77970 "vs:#main-start": sampleInstruction
77971 };
77972 return {
77973 updatedLine: updatedLine,
77974 inject: inject,
77975 samplerTextureMap: samplerTextureMap
77976 };
77977 }
77978 return null;
77979}
77980
77981},{"@luma.gl/webgl":"caucX","@luma.gl/shadertools":"8wgxL","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"2TGkH":[function(require,module,exports) {
77982var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");

Callers 1

updateForTexturesFunction · 0.70

Calls 2

getAttributeDefinitionFunction · 0.70
getSamplerDeclerationsFunction · 0.70

Tested by

no test coverage detected