This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How Vertex Buffer And VTF affect VertexShader LS?

Hell Arm,

Recently I use Malioc to analyze UE4 Niaggara Particle System Related Shader on ES31,  and I have some confuse aboout how vertex attritubes affect VertexShader LS.

The Vertex Shader which used for Niaggara Particle Sprite have too many texelFetch on VS which cause T Bounded and stack spiling on Mali-G71, The VS code is here,     

Malioc Reports,

So, I make a litte test which I use generic Read Particle Data from Vertex Buffer replacing of VTF.  Modied code is here,

 Malioc Reports It's better than VTF version,

But VS just has 7 layout in_Attributes and LS seems larger than expected. So I did more test , then I found when I delete the 

CalculateHeightFog part code, the LS became better. Position Variant LS also became 7 from 14 which I confuse that CalculateHeightFog is not affect Position Variant.
whiout CalculateHeightFog  VS Code and Malioc Reposrts,

So, I just want to ask

1. why calculate heigh fog affect LS even if the Position Variant?

2. "if.. else.." Branching seems like do not affect vertex buffer Loading but can braching TexelFetch(), Is it possible that I can slot some optional data like "custom facing", "custom aligning" using TexBuffer to optimize the shortest path?

0