public void readShaderJobFileToImageJob(File shaderJobFile, ImageJob imageJob) throws IOException { assertIsShaderJobFile(shaderJobFile); imageJob.setName(FilenameUtils.removeExtension(shaderJobFile.getName())); String shaderFileNoExtension = FilenameUtils.removeExtension(shaderJobFile.toString()); final File infoFile = new File(shaderFileNoExtension + ".json"); //noinspection deprecation: fine inside this class. final File fragmentFile = getUnderlyingShaderFile(shaderJobFile, ShaderKind.FRAGMENT); //noinspection deprecation: fine inside this class. final File vertexFile = getUnderlyingShaderFile(shaderJobFile, ShaderKind.VERTEX); final File primitivesFile = new File(shaderFileNoExtension + ".primitives"); final File computeFile = new File(shaderFileNoExtension + ".comp"); // Special case: compute shader job. if (isFile(computeFile)) { imageJob.setComputeSource(readFileToString(computeFile)); imageJob.setComputeInfo(readFileToString(infoFile)); return; } imageJob.setUniformsInfo(readFileToString(infoFile)); if (isFile(fragmentFile)) { imageJob.setFragmentSource(readFileToString(fragmentFile)); } if (isFile(vertexFile)) { imageJob.setVertexSource(readFileToString(vertexFile)); } if (primitivesFile.isFile()) { setPrimitives(imageJob, primitivesFile); } }
unsetUniformsInfo(); } else { setUniformsInfo((java.lang.String)value);