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
Johannes Braun
glare
Commits
5bb79eab
Commit
5bb79eab
authored
Sep 11, 2017
by
Johannes Braun
Browse files
I have no clue
parent
4d3d14d0
Changes
4
Hide whitespace changes
Inline
Side-by-side
assets/imgui/config.ini
View file @
5bb79eab
...
...
@@ -4,7 +4,7 @@ Size=353,64
Collapsed
=
0
[Scene]
Pos
=
4,6
6
Pos
=
4,6
7
Size
=
352,837
Collapsed
=
0
...
...
assets/shaders/pathtracer/data/mesh_linespace.glsl
View file @
5bb79eab
...
...
@@ -124,11 +124,6 @@ uint lineIndex(const in Ray ray, const in Mesh mesh, int ls_index, float tmin, f
uint
start
=
(
entry_info
.
patch_index
.
y
+
entry_info
.
patch_index
.
x
*
start_height
)
*
end_width
*
end_height
;
uint
end
=
(
exit_info
.
patch_index
.
y
+
exit_info
.
patch_index
.
x
*
end_height
);
uint
cunt
=
linespace
.
line_count
;
if
((
offset
+
start
+
end
)
*
2
+
1
>
cunt
)
return
0
;
return
offset
+
start
+
end
;
}
...
...
@@ -152,7 +147,7 @@ bool traverseLineSpace(const in Mesh mesh, int index, const in Ray local_ray, co
bool
swapped
=
false
;
uint
line_id
=
lineIndex
(
loc
,
mesh
,
index
,
tmin
,
tmax
,
face_tmin
,
face_tmax
,
swapped
);
Line
line_near
=
mesh
.
linespaces
[
index
].
lines
[
line_id
*
2
];
Line
line_far
=
mesh
.
linespaces
[
index
].
lines
[
line_id
*
2
+
1
];
...
...
assets/shaders/pathtracer/pathtracer.comp
View file @
5bb79eab
...
...
@@ -228,11 +228,12 @@ void main()
bounce.bounce_amount = int[num_effects](0,0,0,0);
bounce.color = vec3(0);
bounce.radiance = vec3(1);
bounce.shade();
// Nifty for-loop trick. :P
// Will execute the bounce.shade() method at the very beginning (to shade the primary ray) and then
// continue with first-trace-then-shade until either shade returns false (not hitting something or constribution too low)
// or we exceed the global bounce limit.
if(false)
for (bounce.count = 1; bounce.shade() && bounce.count <= u_render_config.num_bounces; ++bounce.count) {
bounce.trace();
}
...
...
src/libraries/raytrace/data/local_collector.cpp
View file @
5bb79eab
...
...
@@ -57,7 +57,7 @@ namespace glare::raytrace
m_vertex_buffer
->
makeResident
(
gl
::
Access
::
eReadOnly
);
m_triangle_buffer
->
makeResident
(
gl
::
Access
::
eReadOnly
);
int
subdiv_grid
=
1
;
int
subdiv_grid
=
2
;
auto
subdiv
=
m_bounds
.
computeSubdivision
(
subdiv_grid
);
int
count
=
subdiv
.
resolution
.
x
*
subdiv
.
resolution
.
y
*
subdiv
.
resolution
.
z
;
...
...
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