Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Dependencies
Cpp
mirrage
Commits
2af99e9f
Commit
2af99e9f
authored
Sep 24, 2018
by
Florian Oetke
Browse files
low-level API to render non-entities
parent
b0c50f7e
Pipeline
#2274
passed with stage
in 4 minutes and 19 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mirrage/renderer/include/mirrage/renderer/deferred_renderer.hpp
View file @
2af99e9f
...
...
@@ -216,6 +216,7 @@ namespace mirrage::renderer {
queue
.
insert
(
queue
.
end
(),
lines
.
begin
(),
lines
.
end
());
}
}
auto
low_level_draw_queue
()
->
auto
&
{
return
_frame_data
.
geometry_queue
;
}
auto
profiler
()
const
noexcept
->
auto
&
{
return
_profiler
;
}
...
...
src/mirrage/renderer/src/pass/animation_pass.cpp
View file @
2af99e9f
...
...
@@ -179,9 +179,12 @@ namespace mirrage::renderer {
if
(
!
geo
.
model
->
rigged
())
continue
;
auto
offset
=
gsl
::
narrow
<
std
::
uint32_t
>
(
required_size
);
auto
entity_mb
=
_ecs
.
get
(
geo
.
entity
);
if
(
entity_mb
.
is_nothing
())
continue
;
auto
entity
=
_ecs
.
get
(
geo
.
entity
).
get_or_throw
(
"Invalid entity in render queue"
);
auto
entity
=
entity_mb
.
get_or_throw
();
auto
offset
=
gsl
::
narrow
<
std
::
uint32_t
>
(
required_size
);
auto
upload_required
=
entity
.
get
<
Shared_pose_comp
>
().
process
(
true
,
[
&
](
auto
&
sp
)
{
auto
pose_offset
=
util
::
find_maybe
(
_animation_uniform_offsets
,
sp
.
pose_owner
);
...
...
src/mirrage/renderer/src/pass/deferred_geometry_subpass.cpp
View file @
2af99e9f
...
...
@@ -141,11 +141,12 @@ namespace mirrage::renderer {
dpc
.
model
=
_renderer
.
global_uniforms
().
view_mat
*
dpc
.
model
;
if
(
sub_mesh
.
material
->
substance_id
()
==
"emissive"
_strid
)
{
auto
emissive_color
=
_ecs
.
get
(
geo
.
entity
)
.
get_or_throw
()
.
template
get
<
Material_property_comp
>()
.
process
(
glm
::
vec3
(
200
,
200
,
200
),
[](
auto
&
m
)
{
return
m
.
emissive_color
;
});
auto
emissive_color
=
glm
::
vec3
(
1000
,
1000
,
1000
);
if
(
auto
entity
=
_ecs
.
get
(
geo
.
entity
);
entity
.
is_some
())
{
emissive_color
=
entity
.
get_or_throw
().
template
get
<
Material_property_comp
>().
process
(
emissive_color
,
[](
auto
&
m
)
{
return
m
.
emissive_color
;
});
}
dpc
.
light_data
=
glm
::
vec4
(
emissive_color
/
10000.0
f
,
1.
f
);
}
...
...
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