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

Function getPassthroughFS

docs/app/js/sanddance-app.js:68704–68714  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68702 };
68703}
68704function getPassthroughFS() {
68705 var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, _ref$version = _ref.version, version = _ref$version === void 0 ? 100 : _ref$version, input = _ref.input, inputType = _ref.inputType, output = _ref.output;
68706 if (!input) {
68707 if (version === 300) return FS300;
68708 else if (version > 300) return "#version ".concat(version, "\n").concat(FS_GLES);
68709 return FS100;
68710 }
68711 var outputValue = convertToVec4(input, inputType);
68712 if (version >= 300) return "#version ".concat(version, " ").concat(version === 300 ? "es" : "", "\nin ").concat(inputType, " ").concat(input, ";\nout vec4 ").concat(output, ";\nvoid main() {\n ").concat(output, " = ").concat(outputValue, ";\n}");
68713 return "varying ".concat(inputType, " ").concat(input, ";\nvoid main() {\n gl_FragColor = ").concat(outputValue, ";\n}");
68714}
68715function typeToChannelSuffix(type) {
68716 switch(type){
68717 case "float":

Callers

nothing calls this directly

Calls 1

convertToVec4Function · 0.70

Tested by

no test coverage detected