Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
RoboGuide
scigl_render
Commits
92c9c91f
Commit
92c9c91f
authored
Mar 01, 2019
by
Tim Übelhör
Browse files
Setting camera position in shader for specular lighting
parent
840720ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scene/cv_camera.cpp
View file @
92c9c91f
...
...
@@ -78,10 +78,11 @@ void CvCamera::resize_intrinsics(int width, int height)
void
CvCamera
::
set_in_shader
(
const
Shader
&
shader
)
const
{
shader
.
activate
();
shader
.
setMat4
(
"projection_matrix"
,
get_projection_matrix
());
shader
.
setMat4
(
"view_matrix"
,
get_view_matrix
());
shader
.
setVec3
(
"camera_position"
,
this
->
pose
.
position
);
shader
.
setArray
(
"dist_coeffs"
,
this
->
intrinsics
.
dist_coeffs
,
sizeof
(
this
->
intrinsics
.
dist_coeffs
));
shader
.
setMat4
(
"projection_matrix"
,
get_projection_matrix
());
shader
.
setMat4
(
"view_matrix"
,
get_view_matrix
());
}
CameraIntrinsics
CvCamera
::
get_intrinsics
()
const
...
...
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