When I use the hybrid backend to render the matbal of the 63_tutorial I got rusted textures correctly used, but when I render the same scene with the northstar backend texture aren't displayed on the matbal.
CHECK(rprContextCreateImageFromFile(g_context, "../resources/renderer/textures/amd.png", &uberMat3_img));
rpr_material_node uberMat3_imgTexture = nullptr;
CHECK(rprMaterialSystemCreateNode(g_matsys, RPR_MATERIAL_NODE_IMAGE_TEXTURE, &uberMat3_imgTexture));
CHECK(rprMaterialNodeSetInputImageDataByKey(uberMat3_imgTexture, RPR_MATERIAL_INPUT_DATA, uberMat3_img));
rpr_material_node uberMat3 = nullptr;
CHECK(rprMaterialSystemCreateNode(g_matsys, RPR_MATERIAL_NODE_UBERV2, &uberMat3));
CHECK(rprMaterialNodeSetInputNByKey(uberMat3, RPR_MATERIAL_INPUT_UBER_DIFFUSE_COLOR, uberMat3_imgTexture));
CHECK(rprShapeSetMaterial(planeShape, uberMat3));
//
// Create a new Uber material for the orb model.
//
rpr_image uberMat2_img1 = nullptr;
CHECK(rprContextCreateImageFromFile(g_context, "../resources/renderer/textures/lead_rusted_Base_Color.jpg", &uberMat2_img1));
rpr_image uberMat2_img2 = nullptr;
CHECK(rprContextCreateImageFromFile(g_context, "../resources/renderer/textures/lead_rusted_Normal.jpg", &uberMat2_img2));
rpr_material_node uberMat2_imgTexture1 = nullptr;
CHECK(rprMaterialSystemCreateNode(g_matsys, RPR_MATERIAL_NODE_IMAGE_TEXTURE, &uberMat2_imgTexture1));
CHECK(rprMaterialNodeSetInputImageDataByKey(uberMat2_imgTexture1, RPR_MATERIAL_INPUT_DATA, uberMat2_img1));
rpr_material_node uberMat2_imgTexture2 = nullptr;
CHECK(rprMaterialSystemCreateNode(g_matsys, RPR_MATERIAL_NODE_IMAGE_TEXTURE, &uberMat2_imgTexture2));
CHECK(rprMaterialNodeSetInputImageDataByKey(uberMat2_imgTexture2, RPR_MATERIAL_INPUT_DATA, uberMat2_img2));
rpr_material_node uberMat2 = nullptr;
CHECK(rprMaterialSystemCreateNode(g_matsys, RPR_MATERIAL_NODE_UBERV2, &uberMat2));
CHECK(rprMaterialNodeSetInputNByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_DIFFUSE_COLOR, uberMat2_imgTexture1));
CHECK(rprMaterialNodeSetInputNByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_DIFFUSE_NORMAL, uberMat2_imgTexture2));
CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_DIFFUSE_WEIGHT, 1, 1, 1, 1));
CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_COLOR, 1, 1, 1, 1));
CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_WEIGHT, 1, 1, 1, 1));
CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_ROUGHNESS, 0, 0, 0, 0));
CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_ANISOTROPY, 0, 0, 0, 0));
CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_ANISOTROPY_ROTATION, 0, 0, 0, 0));
CHECK(rprMaterialNodeSetInputUByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_MODE, RPR_UBER_MATERIAL_IOR_MODE_METALNESS));
CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_IOR, 1.36, 1.36, 1.36, 1.36));
// Apply this new Uber Material to the shapes
for (const auto& iShape : matBallShape)
{
CHECK(rprShapeSetMaterial(iShape, uberMat2));
}
Notice that the plane is rendered with the AMD texture with both backends.