Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1215)

Issue 206064: hair sidedness bug (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by ckulla
Modified:
14 years, 2 months ago
Reviewers:
dev-osl, osl-dev, aconty
Base URL:
http://openshadinglanguage.googlecode.com/svn/trunk/
Visibility:
Public.

Description

I forgot one important case in the get_light_side function - some closures receive light from both sides simultaneously (like hair). This patch makes the 4 cases explicit: None: surface doesn't need eval Front: surface is sensitive to light on the same side as the viewer Back: surface is sensitive to light on the opposite side of the viewer Both: surface is sensitive to light on both sides This fixes backlighting on hair - previously only eval_reflect was being called because get_light_side was filtering out lights coming from behind.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -23 lines) Patch
src/include/oslclosure.h View 2 chunks +12 lines, -12 lines 0 comments Download
src/liboslexec/bsdf_diffuse.cpp View 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_hair.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
src/liboslexec/bsdf_microfacet.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
src/liboslexec/bsdf_reflection.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
src/liboslexec/bsdf_refraction.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
src/liboslexec/bsdf_transparent.cpp View 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/closure_test.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11
ckulla
14 years, 2 months ago (2010-02-10 18:00:10 UTC) #1
aconty
Now it looks clear. The only thing I don't like is using eval_sidedness of None ...
14 years, 2 months ago (2010-02-10 19:57:21 UTC) #2
ckulla
I'm not sure I understand - we were already returning None from get_light_side() for singular ...
14 years, 2 months ago (2010-02-10 19:59:37 UTC) #3
aconty
It breaks with my other review, so nothing that you could actually reproduce now. But ...
14 years, 2 months ago (2010-02-10 21:07:38 UTC) #4
ckulla
But the behavior for singular closures does not change in this review. So it sounds ...
14 years, 2 months ago (2010-02-10 21:23:15 UTC) #5
aconty
Is not broken now, because we don't use the sidedness to discard lights from the ...
14 years, 2 months ago (2010-02-10 21:32:10 UTC) #6
ckulla
Right - what I meant is that its already broken in your other review, regardless ...
14 years, 2 months ago (2010-02-10 21:39:00 UTC) #7
aconty
That's right, but if you commit that how are we going to fix it?
14 years, 2 months ago (2010-02-10 21:49:56 UTC) #8
aconty
No, wait a minute. Singular had already been taken out of MIS for optimization. This ...
14 years, 2 months ago (2010-02-10 21:55:28 UTC) #9
ckulla
On 2010/02/10 21:49:56, aconty wrote: > That's right, but if you commit that how are ...
14 years, 2 months ago (2010-02-10 21:57:56 UTC) #10
aconty
14 years, 2 months ago (2010-02-10 22:03:23 UTC) #11
> Whatever we come up with needs to be coordinated to your other fix. This
change
> is only about fixing the hair.

No problem, go ahead. As I said in the previous reply we moved singular out of
the light loop some time ago, so my code won't break anything.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b