Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
alta
alta
Commits
5b06ca04
Commit
5b06ca04
authored
Oct 22, 2013
by
Laurent Belcour
Browse files
Working BRDF slice data plugin
parent
a2365479
Changes
3
Hide whitespace changes
Inline
Side-by-side
sources/core/params.cpp
View file @
5b06ca04
...
...
@@ -87,7 +87,7 @@ void params::to_cartesian(const double* invec, params::input intype,
break
;
case
params
::
RUSIN_TH_TD
:
half_to_cartesian
(
invec
[
0
],
0.0
,
invec
[
1
],
0.
0
,
outvec
);
half_to_cartesian
(
invec
[
0
],
0.0
,
invec
[
1
],
0.
5
*
M_PI
,
outvec
);
break
;
// 3D Parametrization
...
...
sources/plugins/data_brdf_slice/data.cpp
View file @
5b06ca04
...
...
@@ -50,8 +50,8 @@ vec data_brdf_slice::get(int id) const
const
int
i
=
id
%
width
;
const
int
j
=
id
/
width
;
res
[
0
]
=
0.5
*
M_PI
*
i
/
double
(
width
);
res
[
1
]
=
0.5
*
M_PI
*
j
/
double
(
height
);
res
[
0
]
=
0.5
*
M_PI
*
(
i
+
0.5
)
/
double
(
width
);
res
[
1
]
=
0.5
*
M_PI
*
(
j
+
0.5
)
/
double
(
height
);
res
[
2
]
=
_data
[
3
*
id
+
0
];
res
[
3
]
=
_data
[
3
*
id
+
1
];
...
...
sources/plugins/data_merl/data.cpp
View file @
5b06ca04
...
...
@@ -311,9 +311,9 @@ vec data_merl::get(int i) const
vec
res
(
6
)
;
res
[
2
]
=
phid_ind
*
M_PI
/
(
BRDF_SAMPLING_RES_PHI_D
/
2
);
res
[
1
]
=
thed_ind
*
0.5
*
M_PI
/
(
BRDF_SAMPLING_RES_THETA_D
);
res
[
0
]
=
theh_ind
*
0.5
*
M_PI
/
(
BRDF_SAMPLING_RES_THETA_H
);
res
[
2
]
=
(
phid_ind
+
0.5
)
*
M_PI
/
(
BRDF_SAMPLING_RES_PHI_D
/
2
);
res
[
1
]
=
(
thed_ind
+
0.5
)
*
0.5
*
M_PI
/
(
BRDF_SAMPLING_RES_THETA_D
);
res
[
0
]
=
(
theh_ind
+
0.5
)
*
0.5
*
M_PI
/
(
BRDF_SAMPLING_RES_THETA_H
);
res
[
3
]
=
brdf
[
i
]
*
RED_SCALE
;
res
[
4
]
=
brdf
[
i
+
BRDF_SAMPLING_RES_THETA_H
*
BRDF_SAMPLING_RES_THETA_D
*
BRDF_SAMPLING_RES_PHI_D
/
2
]
*
GREEN_SCALE
;
res
[
5
]
=
brdf
[
i
+
BRDF_SAMPLING_RES_THETA_H
*
BRDF_SAMPLING_RES_THETA_D
*
BRDF_SAMPLING_RES_PHI_D
]
*
BLUE_SCALE
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment