Skip to content

TSL: Slow compilation time #31674

@SeeleyLogan

Description

@SeeleyLogan

Description

Description

Large TSL shaders appear to have slow compilation time, as mentioned by Ben Houston

This pull request is creating 40 TSL shaders on init, which takes ~8 seconds to compile after first render call.
(Ryzen 9 5900X - RTX 4060 Ti)

The compilation time is certainly a combination of TSL converting into WGSL and WGSL being compiled for the GPU. How much of the blocking is caused by TSL? How much by WebGPU? Could we get timings for that?

Reproduction steps

  1. Create a TSL shader with a large* number of nodes
  2. Create an array of objects and apply the shader to them

*refer to pull request

Code

TSL Shader: Line 7 - Line 255
Array of objects: Line 162 - Line 173

Live example

Githack

Screenshots

No response

Version

r179

Device

Desktop

Browser

No response

OS

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    TSLThree.js Shading Language

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions