Details
Description
Currently the fragment shader for generated materials (default, custom, principaled, specularglossy) will generate lighting code for each punctual light in the scene. That means that each time the number of lights in the scene changes, a new shader is needed. Shader generation at runtime can cause frame drops while the shader compilation occurs. On many devices this could be avoided by just using a for loop to iterate over the light structure and apply lighting for each light available with the same shader.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-106954 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
432443,35 | WIP: Support light count independent shader code | dev | qt/qtquick3d | Status: NEW | -2 | 0 |