The material index did not work when FSAA was turned on.
authorJeroen Bakker <j.bakker@atmind.nl>
Wed, 6 Jul 2011 16:08:24 +0000 (16:08 +0000)
committerJeroen Bakker <j.bakker@atmind.nl>
Wed, 6 Jul 2011 16:08:24 +0000 (16:08 +0000)
The information was written in the temp exr files, but was not read back.
After checking I saw that the pass was not merged back in the rendercore.

After adding this it worked. tested with all FSAA settings.

source/blender/render/intern/source/rendercore.c

index 2fa6bed5aae4141957958863027c804099187812..3aca334cffe096d74a57fd6a6d8e45a15f2972ee 100644 (file)
@@ -627,6 +627,12 @@ static void add_passes(RenderLayer *rl, int offset, ShadeInput *shi, ShadeResult
                                        *fp= (float)shi->obr->ob->index;
                                }
                                break;
                                        *fp= (float)shi->obr->ob->index;
                                }
                                break;
+                       case SCE_PASS_INDEXMA:
+                               if(shi->vlr) {
+                                       fp= rpass->rect + offset;
+                                       *fp= (float)shi->mat->index;
+                               }
+                               break;
                        case SCE_PASS_MIST:
                                fp= rpass->rect + offset;
                                *fp= shr->mist;
                        case SCE_PASS_MIST:
                                fp= rpass->rect + offset;
                                *fp= shr->mist;