message: Trying to add emissive texture support
diff: @@ -682,8 +682,9 @@ namespace ospray {
  static auto nMat = 0;
  auto matName = mat.name + "_" + pad(std::to_string(nMat++));
  // DEBUG << pad("", '.', 3) << "material." + matName << "\n";
  - //DEBUG << pad("", '.', 3) << " .alphaMode:" << mat.alphaMode << "\n";
  - //DEBUG << pad("", '.', 3) << " .alphaCutoff:" << (float)mat.alphaCutoff
  + // DEBUG << pad("", '.', 3) << " .alphaMode:" << mat.alphaMode <<
  + // "\n"; DEBUG << pad("", '.', 3) << " .alphaCutoff:" <<
  + // (float)mat.alphaCutoff
  // << "\n";
  auto &pbr = mat.pbrMetallicRoughness;
  @@ -758,7 +759,7 @@ namespace ospray {
  if (emissiveColor != vec3f(0.f)) {
  WARN << "Material has emissiveFactor = " << emissiveColor << "\n";
  ospMat->createChild("color", "vec3f") = emissiveColor;
  - ospMat->createChild("intensity", "float") = 10.f;
  + ospMat->createChild("intensity", "float") = 100.f;
  }
  if (mat.emissiveTexture.texCoord != 0) {
  @@ -767,7 +768,8 @@ namespace ospray {
  }
  if (mat.emissiveTexture.index != -1 && mat.emissiveTexture.texCoord == 0) {
  - setOSPTexture(ospMat, "emissive", mat.emissiveTexture.index);
  + // EmissiveTextureInfo() : index(-1), texCoord(0) {}
  + setOSPTexture(ospMat, "color", mat.emissiveTexture.index, false);
  WARN << "Material has emissiveTexture #" << mat.emissiveTexture.index
  << "\n";
  }
  @@ -800,8 +802,9 @@ namespace ospray {
  // DEBUG << pad("", '.', 9) << "image bits: " << img.bits << "\n";
  // if (img.uri.length() < 256) // The uri can be a stream of data!
  // DEBUG << pad("", '.', 9) << "image uri: " << img.uri << "\n";
  - //DEBUG << pad("", '.', 9) << "image bufferView: " << img.bufferView << "\n";
  - //DEBUG << pad("", '.', 9) << "image data: " << img.image.size() << "\n";
  + // DEBUG << pad("", '.', 9) << "image bufferView: " << img.bufferView <<
  + // "\n"; DEBUG << pad("", '.', 9) << "image data: " << img.image.size() <<
  + // "\n";
  // XXX Only handle pre-loaded images for now
  if (img.image.empty()) {
  @@ -822,7 +825,8 @@ namespace ospray {
  if (ospTex.depth != 1)
  ERROR << "Not yet handled pixel depth: " << ospTex.depth << std::endl;
  if (ospTex.channels != 4)
  - ERROR << "Not yet handled number of channels: " << ospTex.channels << std::endl;
  + ERROR << "Not yet handled number of channels: " << ospTex.channels
  + << std::endl;
  // XXX better way to do this?!
  std::vector<vec4uc> data(ospTex.size.x * ospTex.size.y);
  