I have a scene with custom shaders applied to a material and I use canvas texture to pass it inside the fragment as a uniform. I want to export the same scene.
What type of exporter should I use or how should the export be done? I have searched for the solutions in the forums but looks like it’s not possible using custom shaders. Any ideas?
I cannot remove the custom shaders as I have an algorithm that calculates the uv coordinates and to avoid texture stretching I have put logic inside fragment shader that avoids stretching issue. But it looks like exporting is not possible.
This is the code I use in the fragment shader.
bool inXBounds = uv[0] < 1.0 && uv[0] >= 0.0;
bool inYBounds = uv[1] < 1.0 && uv[1] >= 0.0;
if(inXBounds && inYBounds) {
gl_FragColor = vec4(outgoingLight, diffuseColor.a) * texture2D(c_texture, uv);
} else {
gl_FragColor = vec4(0);
}
For more context this is what exported image looks like if I do not use the fragment shader.