                                              const float shininess,
                                              curandState* curand_state) {
   float3 perfect = ComputePerfectReflectionDirection(normal, incident);
+  if (iszerof(shininess)) return perfect;
   return ComputeRandomCosineWeightedDirection(perfect, incident, shininess,
                                               curand_state);
 }


    float3 diffusion = triangle.material.diffuse_color;
    float3 reflection = triangle.material.specular_color;
    float3 refraction = make_float3(1 - triangle.material.dissolve);

    float shininess = triangle.material.shininess;
    float eta = 1.0;

      ray.color *= triangle.material.specular_color;
      ray.direction = ComputeReflectionDirection(normal, ray.direction,
                                                 shininess, curand_state);
    } else if (random <= threshold[2]) { /* Transmission */
      ray.color *= (1 - triangle.material.dissolve);
      ray.direction = ComputeTransmissionDirection(normal, ray.direction, eta,
                                                   curand_state);
