Shadow Mapping and Tessellation

Hi again! I created this thread because I would like to receive feedback on a performance issue that I am having. I used tessellation for hair rendering in order to generate new strands on the fly (from a growth mesh using guide strands). In order to create the shadow map for the hairstyle, I wanted to try Variance Shadow Mapping. Here is what I did:

  1. Created a depth pass that fills in a depth texture from the light’s point of view. Since we want to capture every single strand, this depth shaders need tessellation.

  2. Another render pass that has as input the depth texture and outputs the variance shadow map. Tessellation needs to be re-applied.

  3. Final shading pass that computes the lighting model and the amount of shadow based on the variance map. Since it’s the main pass, tessellation needs to happen.

By that logic, tessellation happens 3 times per frame, which is quite expensive, especially in a lower-end PC that I run my tests. I could save some performance by ignoring the gl_TessLevelOuter[1] and setting it to 1, since I don’t care if the line doesn’t look smooth in the depth texture. However, gl_TessLevelOuter[0] needs to remain consistent since this quantity declares the amount of additional hair.

Is there a way to get away with using tessellation so many times for just one light, or is this something that cannot be avoided?