The parser rejected valid HLSL like `float2 var = (float2(x,y)) * scalar`
with "expected ';'" errors. When parsing a parenthesized expression, the
loop would break before consuming the closing paren, so subsequent binary
operators were never seen.
Moves end-char consumption into the else block and checks for operators
after consuming the paren, continuing the loop if one is found.
Fixes#940
Had to simulate it with the "x * exp2(exp)" expression in GLSL, as GLSL only supports integer types as exponents in its native ldexp implementation, while HLSL solely uses floats.
The HLSLMacro struct is manually malloc'd, not using new/delete, so the std::string destructor is never called on the instance stored in the class.
Fixed by using a char* allocated by HLSLTree, which will then properly take care of deleting it after parsing is complete.
Fixed a transpile issue with a hack used by some preset authors to set a texture sampler to a different filter/wrap mode, removing the "sampler_state" block entirely now as there's no GLSL equivalent (samplers are solely configured on the application side).
Also consolidated a few vertex types into RenderItem and fixed a few old-school effects like DarkenCenter.