I want to start a fresh topic about something that I discussed a bit as a digression from another topic. To recap: I am running into limits on GPU memory use, and a big part of it is the cube map texture used by a shadow node that can handle point lights. This is especially problematic when using PlanarReflections
, since each potential mirror creates a compositor workspace instance with its own shadow node.
I was hoping I could fix this by modifying ShadowNodeHelper::createShadowNodeWithSettings
to use a global texture (one of those guys with a name starting with "global_") for the cube map. But that doesn't work because a global texture isn't global enough, you still get a separate texture for each compositor workspace instance.
dark_sylinc wrote: ↑Tue Dec 17, 2024 10:10 pmModify the Compositor Node so that the Cubemap is provided by you via connect_output. That way you can share all those "tmpCubemap" with all the workspaces. It's eating all your VRAM.
If I'm doing it programmatically instead of in a script, I'm guessing that I'd be calling CompositorNode::connectExternalRT
on the shadow node. But I'm not clear on what to pass for the channel number, or whether I need to create the shadow node in some completely different way than using ShadowNodeHelper::createShadowNodeWithSettings
.