Hi all,
I'm trying to use BaseShader::BakeShaderIntoBaseBitmap() to get a 2D representation of the shader. However, I couldn't get the correct result.
BaseDocument* bd = GetActiveDocument();
InitRenderStruct irs{ bd };
BaseBitmap* bit = BaseBitmap::Alloc();
BaseShader* shader = mat->GetChannel(CHANNEL_DIFFUSION)->GetShader();
shader->BakeShaderIntoBaseBitmap(*bit, *bd, irs.thread, false, irs.document_colorprofile, irs.linear_workflow, true, 0, 1000, 0, 1000)
ShowBitmap(bit);
I have read 'BaseShader Manual', but I'm not sure where to get a parentThread, so I used irs.thread...
Any ideas or examples?