Replies: 1 comment
-
Hi, console.log(geoSrc)
console.log(colorSrc) at the end of your shader, which will print glsl to the console. import {
sculptToGLSL,
baseUniforms,
uniformsToGLSL
usePBRHeader,
useHemisphereLight,
sculptureStarterCode,
minimalHeader,
minimalVertexSource,
fragFooter,
} from 'shader-park-core'
...
function generateFullFragment(source) {
const generatedGLSL = sculptToGLSL(source);
const fullFrag =
minimalHeader
+ usePBRHeader
+ useHemisphereLight
+ uniformsToGLSL(generatedGLSL.uniforms)
+ 'const float STEP_SIZE_CONSTANT = ' + generatedGLSL.stepSizeConstant + ';\n'
+ 'const int MAX_ITERATIONS = ' + generatedGLSL.maxIterations + ';\n'
+ sculptureStarterCode
+ generatedGLSL.geoGLSL
+ '\n'
+ generatedGLSL.colorGLSL
+ '\n'
+ fragFooter;
return fullFrag;
} Where all glsl pieces are generated and assembled into a final fragment shader. |
Beta Was this translation helpful? Give feedback.
-
Hello
Is it possible to get access to the glsl shader code generated in shaderpark for rendering. For exemple to use this shader in another software ?
Thanks a lot for this great job/
Beta Was this translation helpful? Give feedback.
All reactions