Object Info node random output always returns zero for lights with GPU render (Cycles)
Open, NormalPublic

Description

System Information:
CPU: Ryzen 5 2600
GPU: RX 570
OS: Windows 10 Homes

Blender Version:
Broken:
blender-2.79-1b974563b17 (2nd November 2018)
blender-2.80-b4dfe00fd60 (5th of November 2018)
Worked: In theory Blender 2.79b worked, but that's because Random dosn't output anything but zero on CPU or GPU.

Short description of error:
When a light object (Point, Spot, Sun, Hemi, Area) has a material that uses the Random output of the Object Info node, the output will always be zero if rendered using the GPU (Only tested on OpenCL).

Here's a few images:

  1. Node tree for lights

  1. CPU Render

  1. GPU Render

  1. CPU + GPU Rendering


Here's a file for Blender 2.8 to test it out yourself:

Exact steps for others to reproduce the error:

  1. Start Blender
  2. Change the render engine to Cycles if it isn't already
  3. Create a light source and give it a node based "material"
  4. In the node editor for the light, add an object info node and attach the random out to something that controls the light (I used the Random output for the hue input in Hue Saturation Value node with a base of red to select the colour of the light)
  5. Duplicate the light source and place them around your scene so you have multiple randoms to compare
  6. Render the scene in the viewport with the CPU
  7. Render the scene in the viewport with the GPU and you'll find that the random output is always zero

Details

Type
Bug