aras-p/hlsl2glslfork — pull request #13 by zeux (2012-09-06 19:10:09+00:00)
Title: Fix built-in varying outputs with less than 4 components, fix lit function

1. Attempting to output a float2 uv: TEXCOORD0 from a vertex shader
produces invalid code, unless UseUserVaryings is in effect:

gl_TexCoord0 = vec2(...)

The code now treats all default output varyings as vec4 (don't touch user varyings) to avoid this.

2. Lit function was incorrect (I mean, it matched DXSDK docs - but the docs are wrong!). I've changed it to the code that actually works (modulo the case where m=0 - I'm not sure what is the guaranteed result for HLSL lit in this case).

Tell me if you want me to split the request in two.