ncannasse / hxsl

Haxe Shader Language, a high level 3D shader language for Haxe
86 stars 10 forks source link

Build.hx small speedup #8

Closed profelis closed 11 years ago

profelis commented 11 years ago

I got little speed up in Builder.hx in buildShaderInfos method. I introduced local variables like here

https://github.com/profelis/dd/blob/master/dd/src/hxsl/Build.hx#L72

or here

https://github.com/profelis/dd/blob/master/dd/src/hxsl/Build.hx#L105

In my stress test I got 48-49 fps versus old 45 fps.

Btw, getVertexConstants and getFragmentConstants can be inlined for small speedup too

ncannasse commented 11 years ago

The Build.hx has been removed in HxSL v2, it's now ShaderMacros