[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38159] trunk/blender/source/blender/ render/intern/source/rendercore.c: The material index did not work when FSAA was turned on.
Diego B
bdiego at gmail.com
Thu Jul 7 00:27:12 CEST 2011
Hi Jeroen:
I was checking this (old) new feature here at the studio and we notice
that the index mat is not working.
I go through the original patch (the one ask for Plumiferos) and I
found that the commit that you did skip
a couple of things:
1 )
The original revision:
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38090
If you check the to "rendercore.c" you use:
*fp= (float)shi->mat->index;
but is:
*fp= (float)shi->vlr->mat->index;
2)
There is a missing function on zbuf.c "add_transp_matindex", and you
replace this with
"add_transp_obindex".
3)
In this commit you also use shi->mat->index when it's shi->vlr->mat->index.
I have done the changes here (I apply the old patch) and is working fine.
On Wed, Jul 6, 2011 at 1:08 PM, Jeroen Bakker <j.bakker at atmind.nl> wrote:
>
> Revision: 38159
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38159
> Author: jbakker
> Date: 2011-07-06 16:08:24 +0000 (Wed, 06 Jul 2011)
> Log Message:
> -----------
> The material index did not work when FSAA was turned on.
> 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.
>
> Modified Paths:
> --------------
> trunk/blender/source/blender/render/intern/source/rendercore.c
>
> Modified: trunk/blender/source/blender/render/intern/source/rendercore.c
> ===================================================================
> --- trunk/blender/source/blender/render/intern/source/rendercore.c 2011-07-06 15:20:49 UTC (rev 38158)
> +++ trunk/blender/source/blender/render/intern/source/rendercore.c 2011-07-06 16:08:24 UTC (rev 38159)
> @@ -627,6 +627,12 @@
> *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;
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
More information about the Bf-committers
mailing list