Bug report and files:
There are a few differences between the original (correct) shader and the variant (incorrect), which should not affect the semantics of the two. They are:
Added multiplication by "injectionSwitch.y" (evaluates to 1.0) Added addition with "injectionSwitch.x" (evaluated to 0.0) Wrapped a float literal into a ternary operator with pre-determined runtime control-flow based on set input Added an unreachable "return" statement
Operating system version.
GK110 (GeForce GTX Titan), driver version 370.28
We have provided the fragment shader at the above link.
Description of single steps to reproduce the problem.
Render provided “variant.frag”. Custom built software used to identify this issue available for download at https://github.com/paulthomson/get-image/releases/tag/v-feb357fccce0694585b02484defc825778733751.
Description of the expected result.
Image visually identical to the original image.