<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US><div class=WordSection1><p class=MsoNormal>I'm doing some work that involves mapping textures post-render, and I'm trying to figure out how to get anti-aliasing information out of the UV pass. From the UV pass EXR, it looks like for edges that overlap the background, we get a nice B value that indicates opacity. So, to find the actual UV position we would do U = R / B, V = G / B, and then do an alpha blend with what we want as the background using the B value.</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>However, when an object overlaps itself, the B value stays at 1, and instead we get the actual alpha blend of the top R,G with the bottom R,G. So when we're doing our mapping, this puts the UV at a completely wrong place.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>To properly represent the antialiasing at places that self-overlap, we need 5 values, bottom U, bottom V, top U, top V, top opacity.&nbsp;I don't know HDR formats very well, are these values already being captured somewhere in some kind of metadata field? If not, is there currently a way to do a separate pass to capture this information?<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>I've done a bit of poking around to the source, but I'm afraid I've been hindered by a lack of domain knowledge. It seems that the pass information is being read from<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>kernel_passes.h : kernel_write_data_passes -&gt; geom_primitive.h : primitive_uv -&gt; geom_attribute.h : find_attribute -&gt; kernel_compat_cpu.h: kernel_tex_fetch -&gt; KernelGlobals-&gt;__attributes_map.fetch(index)<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>but I'm having trouble figuring out where and when __attributes_map gets filled (and with what, and why :).<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>As a newcomer to graphics programming, it's a real pleasure to find such a great renderer that I can actual read the source to. So thanks to everyone involved.<o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>