Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glow-samples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yanjiang He
glow-samples
Commits
0774e578
Commit
0774e578
authored
5 years ago
by
Aaron Grabowy
Browse files
Options
Downloads
Patches
Plain Diff
Added known issues test scenes
parent
6a9b54ed
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
samples/basic/viewer/main.cc
+44
-0
44 additions, 0 deletions
samples/basic/viewer/main.cc
with
44 additions
and
0 deletions
samples/basic/viewer/main.cc
+
44
−
0
View file @
0774e578
...
...
@@ -625,6 +625,47 @@ void subtle_cases(pm::vertex_attribute<tg::pos3> const& pos)
gv
::
view
(
pos
,
tg
::
scaling
(
2.0
,
2.0
,
2.0
),
"double transform"
);
}
void
known_issues
(
pm
::
vertex_attribute
<
tg
::
pos3
>
const
&
pos
)
{
pm
::
Mesh
mLine
;
const
auto
v0
=
mLine
.
vertices
().
add
();
const
auto
v1
=
mLine
.
vertices
().
add
();
const
auto
_
=
mLine
.
edges
().
add_or_get
(
v0
,
v1
);
const
auto
line
=
mLine
.
vertices
().
make_attribute_from_data
<
tg
::
pos3
>
({{
0
,
0
,
0
},
{
1
,
0
,
0
}});
const
auto
lineColors
=
mLine
.
vertices
().
make_attribute_from_data
<
glow
::
colors
::
color
>
({{
0.7
f
,
0.2
f
,
0.2
f
},
{
0.2
f
,
0.7
f
,
0.2
f
}});
// Intersection of screen space camera facing lines and viewer grid creates artifacts
// Also the round caps of large screen space camera facing lines are not smoothly connecting to the straight line part
{
auto
v
=
glow
::
viewer
::
view
();
gv
::
view
(
gv
::
lines
(
line
).
camera_facing
().
line_width_px
(
500.0
f
),
tg
::
color3
::
red
,
"ground shadow intersects red screen space camera facing line"
);
// It is fine for the green world space because the bounding box of world space moves the object up
gv
::
view
(
gv
::
lines
(
line
).
camera_facing
().
line_width_world
(
0.25
f
),
tg
::
color3
::
green
,
tg
::
translation
(
0.0
f
,
0.0
f
,
1.0
f
));
}
// When setting a custom camera target view, the camera jumps the first time it is dragged with the left or right mouse button
{
gv
::
view
(
pos
,
gv
::
camera_transform
(
tg
::
pos3
(
1
,
1
,
1
),
tg
::
pos3
(
0
,
0
,
0
)),
"explicit start position and target creates jumping camera upon first drag"
);
// gv::camera_orientation works fine
gv
::
view
(
pos
,
gv
::
camera_orientation
(
125
_deg
,
-
15
_deg
,
1.7
f
),
"explicit camera azimuth/altitude/distance works fine"
);
}
// Artifacts on grazing angles
// When the camera is outside of the capsule but close to the line spanned by its axis, all sorts of artifacts occur
{
gv
::
view
(
gv
::
lines
(
line
).
line_width_px
(
250.0
f
),
lineColors
,
"artifacts on grazing angles (screen space)"
);
gv
::
view
(
gv
::
lines
(
line
).
line_width_world
(
1.5
f
),
lineColors
,
tg
::
translation
(
0.
f
,
0.
f
,
5.
f
),
"artifacts on grazing angles (screen space)"
);
// Screen space camera facing lines seem fine
// gv::view(gv::lines(line).line_width_px(250.0f).camera_facing(), lineColors, tg::translation(0.0f, 0.0f, -25.f));
}
// Camera facing points are always black
{
gv
::
view
(
gv
::
points
(
pos
).
square
(),
tg
::
color3
::
cyan
,
"camera facing points are black even though color configured"
);
// gv::no_shading makes no difference
}
}
int
main
()
{
// create a rendering context
...
...
@@ -671,5 +712,8 @@ int main()
headless_screenshot
(
pos
);
}
// known issues
known_issues
(
pos
);
return
EXIT_SUCCESS
;
}
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