Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mitsuba-shapenet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hardik Jain
mitsuba-shapenet
Commits
23efb01b
Commit
23efb01b
authored
10 years ago
by
johannes hanika
Committed by
Wenzel Jakob
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
hslt: always use a consistent edge direction in the bidirectional abstraction layer
parent
7e705a62
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/mitsuba/bidir/edge.h
+2
-0
2 additions, 0 deletions
include/mitsuba/bidir/edge.h
src/libbidir/edge.cpp
+14
-1
14 additions, 1 deletion
src/libbidir/edge.cpp
with
16 additions
and
1 deletion
include/mitsuba/bidir/edge.h
+
2
−
0
View file @
23efb01b
...
...
@@ -53,6 +53,8 @@ struct MTS_EXPORT_BIDIR PathEdge {
/**
* \brief Normalized direction vector associated with this edge
*
* The direction always points along the light path (from the light)
*/
Vector
d
;
...
...
This diff is collapsed.
Click to expand it.
src/libbidir/edge.cpp
+
14
−
1
View file @
23efb01b
...
...
@@ -63,6 +63,9 @@ bool PathEdge::sampleNext(const Scene *scene, Sampler *sampler,
weight
[
1
-
mode
]
=
mRec
.
transmittance
/
pdf
[
1
-
mode
];
}
d
=
ray
.
d
;
/* Direction always points along the light path (from the light source along the path) */
if
(
mode
==
ERadiance
)
d
=
-
d
;
return
true
;
}
...
...
@@ -105,6 +108,9 @@ bool PathEdge::perturbDirection(const Scene *scene,
return
false
;
}
d
=
ray
.
d
;
/* Direction always points along the light path (from the light source along the path) */
if
(
mode
==
ERadiance
)
d
=
-
d
;
if
(
length
==
0
)
return
false
;
...
...
@@ -274,6 +280,9 @@ bool PathEdge::connect(const Scene *scene,
}
}
/* Direction always points along the light path (from the light source along the path) */
d
=
-
d
;
return
true
;
}
...
...
@@ -330,7 +339,8 @@ bool PathEdge::pathConnect(const Scene *scene, const PathEdge *predEdge,
result
.
append
(
edge
);
edge
->
length
=
std
::
min
(
its
.
t
,
remaining
);
edge
->
medium
=
medium
;
edge
->
d
=
d
;
/* Direction always points along the light path (from the light source along the path) */
edge
->
d
=
-
d
;
if
(
medium
)
{
MediumSamplingRecord
mRec
;
...
...
@@ -557,6 +567,9 @@ bool PathEdge::pathConnectAndCollapse(const Scene *scene, const PathEdge *predEd
}
}
/* Direction always points along the light path (from the light source along the path) */
d
=
-
d
;
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment