Jump to content

Raw indirect from illuminance loop?


Recommended Posts

I have a simple shader to export separated indirect and direct image planes.


#pragma hint clr color
#pragma hint direct hidden
#pragma hint indirect hidden

surface
sep_lighting(vector clr = 1;
export vector direct = 0;
export vector indirect = 0)
{
vector nn = frontface(normalize(N),I);
Cf = 0;
illuminance(P, nn, "categories", "direct")
{
shadow(Cl);
direct += Cl * clr * dot(nn,normalize(L));
}
illuminance(P, nn, "categories", "indirect")
{
indirect += Cl * clr;
}
Cf = direct;
}
[/CODE]

But its indirect pass contents direct lighting ([i]/out/mantra1[/i] ROP in attached file):

post-5934-0-72110700-1363344482_thumb.jp

Another shader with Irradiance in Material VOP works perfectly ([i]/out/mantra2[/i] ROP):

post-5934-0-06904200-1363344432_thumb.jp

Mantra also prints warnings about constant and plastic but this shaders are not used here. I even checked the ifd.

Where I was wrong?

sep_lighting.hipnc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...