UNPKG

1.34 kBSource Map (JSON)View Raw
1{"version":3,"file":"getMaxFragmentPrecision.js","sources":["../../../src/shader/utils/getMaxFragmentPrecision.ts"],"sourcesContent":["import { PRECISION } from '@pixi/constants';\nimport { getTestContext } from './getTestContext';\n\nlet maxFragmentPrecision: PRECISION;\n\nexport function getMaxFragmentPrecision(): PRECISION\n{\n if (!maxFragmentPrecision)\n {\n maxFragmentPrecision = PRECISION.MEDIUM;\n const gl = getTestContext();\n\n if (gl)\n {\n if (gl.getShaderPrecisionFormat)\n {\n const shaderFragment = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT);\n\n maxFragmentPrecision = shaderFragment.precision ? PRECISION.HIGH : PRECISION.MEDIUM;\n }\n }\n }\n\n return maxFragmentPrecision;\n}\n"],"names":["PRECISION","getTestContext"],"mappings":";;;;;;;AAGA,IAAI,oBAAA,CAAA;AAGJ,SAAA,uBAAA,GAAA;AACI,EAAA,IAAI,CAAC,oBACL,EAAA;AACI,IAAA,oBAAA,GAAuBA,mBAAU,CAAA,MAAA,CAAA;AACjC,IAAA,MAAM,KAAKC,6BAAe,EAAA,CAAA;AAE1B,IAAA,IAAI,EACJ,EAAA;AACI,MAAA,IAAI,GAAG,wBACP,EAAA;AACI,QAAA,MAAM,iBAAiB,EAAG,CAAA,wBAAA,CAAyB,EAAG,CAAA,eAAA,EAAiB,GAAG,UAAU,CAAA,CAAA;AAEpF,QAAA,oBAAA,GAAuB,cAAe,CAAA,SAAA,GAAYD,mBAAU,CAAA,IAAA,GAAOA,mBAAU,CAAA,MAAA,CAAA;AAAA,OACjF;AAAA,KACJ;AAAA,GACJ;AAEA,EAAO,OAAA,oBAAA,CAAA;AACX;;;;"}
\No newline at end of file