| 36 | } |
| 37 | |
| 38 | ShaderPtr createDepthShader(GenContext& context, |
| 39 | DocumentPtr stdLib, |
| 40 | const string& shaderName) |
| 41 | { |
| 42 | // Construct a dummy nodegraph. |
| 43 | DocumentPtr doc = createDocument(); |
| 44 | doc->setDataLibrary(stdLib); |
| 45 | NodeGraphPtr nodeGraph = doc->addNodeGraph(); |
| 46 | NodePtr constant = nodeGraph->addNode("constant"); |
| 47 | OutputPtr output = nodeGraph->addOutput(); |
| 48 | output->setConnectedNode(constant); |
| 49 | |
| 50 | // Generate the shader |
| 51 | GenContext depthContext = context; |
| 52 | depthContext.getOptions().hwWriteDepthMoments = true; |
| 53 | ShaderPtr shader = createShader(shaderName, depthContext, output); |
| 54 | |
| 55 | return shader; |
| 56 | } |
| 57 | |
| 58 | ShaderPtr createAlbedoTableShader(GenContext& context, |
| 59 | DocumentPtr stdLib, |
no test coverage detected