Open GoogleCodeExporter opened 9 years ago
This appears to be a bug in the HLSL compiler.
We could work around it by rewriting it as (t=a*0.5, c=t.xyz), but that's not a
trivial transformation in a high level language. Perhaps the traverser to
unfold short-circuiting operations is a good starting point...
Anyway, are you able to work around this for now? It looks like a pretty rare
case to run into.
Original comment by nico...@transgaming.com
on 15 Aug 2013 at 5:58
So it's an HLSL compiler problem.
It's kinda sad how buggy shader languages are with respect to the comma
operator.
GLSL has a similar problem, but it seems to only occur in variable
declarations, when using the comma operator inside the initialization.
We're currently working on a project that generates GLSL from another
languages. For us, the comma operator would be a great help, as it would
simplify many of the code transformations.
We might be able to find workarounds, but that would make the whole code
generation more complicated.
It probably makes more sense to report these issues to the GLSL and HLSL
compilers.
Original comment by lach...@gmail.com
on 16 Aug 2013 at 9:36
Original issue reported on code.google.com by
lach...@gmail.com
on 14 Aug 2013 at 10:28