mc-imperial / shader-compiler-bugs

A collection of shader compiler bugs.
MIT License
49 stars 9 forks source link

Adding zero to vector causes black image to be rendered #41

Open afd opened 7 years ago

afd commented 7 years ago

[Shaders, screenshots, error log, reproduction steps, etc.] [ZIP]

WebGL links for easy reproduction:

Recipient:

recipient image

Variant:

variant image

The difference is that:

return ObjUnion(obj0(p), obj1(p));

is changed to:

return ObjUnion(obj0(p + vec3(0.0, injectionSwitch.x, 0.0)), obj1(p));

Since injectionSwitch.x is zero, this should have no (or very minimal) effect. The fact that it makes the image come out black suggests a bug.

afd commented 7 years ago

Reported to Intel here:

https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/704902