bnpr / Malt

Render framework for NPR.
https://malt3d.com
Other
952 stars 75 forks source link

Custom Output number exceeding 8 outputs returns Shader Linker error #485

Closed dibli-goost closed 1 year ago

dibli-goost commented 1 year ago

Malt version

Node Groups

Blender version

Blender 3.4.1

OS

Windows 10

Hardware info

AMD Ryzen Threadripper 1920x 12-Core Processor, 3950 Mhz, 24 Logical Processors | 32GB RAM | Radeon RX 570 Series

Issue description and reproduction steps

Once the number of Custom Outputs on the Main Pass exceeds 8 outputs this error is returned:

MAIN_PASS : SHADER LINKER ERROR :
Vertex shader(s) failed to link, fragment shader(s) failed to link.
Vertex link error: INVALID_OPERATION.
ERROR: error(#268) Shader wrote to non-existant fragment color number
fragment link error: INVALID_OPERATION.
ERROR: error(#268) Shader wrote to non-existant fragment color number

Scene refuses to render until the number of outputs is reduced to 8 or below.

Log file was massive, like 84MB , kept repeating the same bit over again, trimmed it down so that I could upload it. image

Attachments

Custom Output Bug.zip malt 2023-02-26(23-05).log

pragma37 commented 1 year ago

This is a limitation on GPUs in general, shaders can't render to more than 8 targets.

I've updated Malt so it's not possible to create more outputs than what can be used.

Log file was massive, like 84MB , kept repeating the same bit over again, trimmed it down so that I could upload it.

There's a feature in place to avoid logging the same message more than once, however, if there's any scene update the addresses of the objects will change so the message will not be exactly the same. I'm not sure how to avoid this without ending up not logging relevant errors.