Compare commits

...

2 Commits

Author SHA1 Message Date
Brett 819549b8c8 almost done readme 2023-04-05 00:47:58 -04:00
Brett 587f7909fa working on readme 2023-04-04 22:02:11 -04:00
267 changed files with 909 additions and 82 deletions

View File

@ -15,8 +15,9 @@ void main() {
//out_color = vec4(uv_, 0.0, 1.0); //out_color = vec4(uv_, 0.0, 1.0);
out_color = texture(texture_array, vec3(uv_, index)); out_color = texture(texture_array, vec3(uv_, index));
if (out_color.a < 0.1) // discard disables early depth testing!
discard; //if (out_color.a < 0.1)
// discard;
} }
")"; ")";

View File

@ -11,21 +11,13 @@ in vec4 pos_[];
out vec2 uv_; out vec2 uv_;
out float index; out float index;
const vec3 vertices[] = {
vec3(0.5f, 0.5f, 0.0f),
vec3(0.5f, -0.5f, 0.0f),
vec3(-0.5f, -0.5f, 0.0f),
vec3(-0.5f, 0.5f, 0.0f)
};
uniform mat4 pvm; uniform mat4 pvm;
uniform vec4 up; uniform vec4 up;
uniform vec4 right; uniform vec4 right;
void emitTransformed(vec3 pos){ void transform(vec3 pos){
// passthough index // passthough index
index = pos_[0].w; index = pos_[0].w;
//gl_Position = pvm * vec4(pos_[0].xyz + vertices[0], 1.0);
gl_Position = pvm * vec4(pos, 1.0); gl_Position = pvm * vec4(pos, 1.0);
} }
@ -33,19 +25,20 @@ void main() {
const float quad_size = 0.5; const float quad_size = 0.5;
vec3 pos = pos_[0].xyz; vec3 pos = pos_[0].xyz;
emitTransformed(pos + up.xyz * quad_size + right.xyz * quad_size); // using the up and right vectors to generate the verticies for this particle ensures that the particle always faces the camera
transform(pos + up.xyz * quad_size + right.xyz * quad_size);
uv_ = vec2(0, 0); uv_ = vec2(0, 0);
EmitVertex(); EmitVertex();
emitTransformed(pos + up.xyz * quad_size - right.xyz * quad_size); transform(pos + up.xyz * quad_size - right.xyz * quad_size);
uv_ = vec2(0, 1); uv_ = vec2(0, 1);
EmitVertex(); EmitVertex();
emitTransformed(pos - up.xyz * quad_size + right.xyz * quad_size); transform(pos - up.xyz * quad_size + right.xyz * quad_size);
uv_ = vec2(1, 0); uv_ = vec2(1, 0);
EmitVertex(); EmitVertex();
emitTransformed(pos - up.xyz * quad_size - right.xyz * quad_size); transform(pos - up.xyz * quad_size - right.xyz * quad_size);
uv_ = vec2(1, 1); uv_ = vec2(1, 1);
EmitVertex(); EmitVertex();

View File

@ -17,11 +17,12 @@ const float SPEED = 1.0f;
const float SPEED_FACTOR = 25.0f; const float SPEED_FACTOR = 25.0f;
const float BOUNCE_FACTOR = 0.75f; const float BOUNCE_FACTOR = 0.75f;
const float SPREAD = 4.5f; const float SPREAD = 4.5f;
const float particle_lifetime = 120.0f; const float particle_lifetime = 25.0f;
const vec2 p_min = vec2(-50, -50);
const vec2 p_max = vec2(50, 50);
const vec3 inital_pos = vec3(0.0f, 1.0f, 0.0f); const vec3 inital_pos = vec3(0.0f, 1.0f, 0.0f);
const vec4 inital_dir = vec4(0.0f, 1.0f, 0.0f, 0.0f); const vec4 inital_dir = vec4(0.0f, 1.0f, 0.0f, 0.0f);
const vec2 p_min = vec2(-50, -50);
const vec2 p_max = vec2(50, 50);
const vec4 GRAVITY = vec4(0.0, -9.8, 0.0, 0.0); const vec4 GRAVITY = vec4(0.0, -9.8, 0.0, 0.0);
@ -60,7 +61,7 @@ void main() {
pos += vec4(dir.xyz * SPEED * deltaSeconds, 0.0); pos += vec4(dir.xyz * SPEED * deltaSeconds, 0.0);
dir += vec4(GRAVITY.xyz * deltaSeconds, 0.0); dir += vec4(GRAVITY.xyz * deltaSeconds, 0.0);
if (pos.y < 0 && checkBounds(pos.xy)) { if (pos.y < 0 && checkBounds(pos.xz)) {
dir.y = -dir.y * BOUNCE_FACTOR; dir.y = -dir.y * BOUNCE_FACTOR;
pos.y = 0; pos.y = 0;
} }

View File

@ -0,0 +1,13 @@
#ifdef __cplusplus
#include <string>
std::string shader_sort = R"("
#version 460
layout (local_size_x = 128, local_size_y = 1, local_size_z = 1) in;
void main() {
}
")";
#endif

View File

@ -12,7 +12,7 @@
#include <blt/math/vectors.h> #include <blt/math/vectors.h>
#include <type_traits> #include <type_traits>
const std::string WINDOW_TITLE = "Assignment 3: They said WHAT?!"; const std::string WINDOW_TITLE = "Assignment 3: The Power Of Love";
static constexpr int TARGET_FPS = 60; static constexpr int TARGET_FPS = 60;
static constexpr float FOV = 90; static constexpr float FOV = 90;

31
readme/references.bib Normal file
View File

@ -0,0 +1,31 @@
@misc{computeshader,
title="{OpenGL Compute Shaders}",
author="Mike Bailey",
year="2021",
howpublished={\url{"https://web.engr.oregonstate.edu/~mjb/cs519/Handouts/compute.shader.2pp.pdf"}},
note={Accessed: 2023-04-01}
},
@misc{glref,
title="{OpenGL Reference Manual}",
author="Krnonos Group",
year="2014",
howpublished={\url{"https://registry.khronos.org/OpenGL-Refpages/gl4/"}},
},
@misc{gpuparticles,
title="{Compute-Based GPU Particle Systems}",
author="Gareth Thomas",
year="2014",
howpublished={\url{"https://ubm-twvideo01.s3.amazonaws.com/o1/vault/GDC2014/Presentations/Gareth_Thomas_Compute-based_GPU_Particle.pdf"}},
},
@misc{geometry,
title="{Particle Billboarding with the Geometry Shader}",
author="JeGX",
year="2014",
howpublished={\url{"https://www.geeks3d.com/20140815/particle-billboarding-with-the-geometry-shader-glsl/"}},
},
@misc{amdprogram,
title="{ATI Radeon HD 2000 programming guide}",
author="Emil Persson",
year="2007",
howpublished={\url{"https://web.archive.org/web/20160722164341/http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/ATI_Radeon_HD_2000_programming_guide.pdf"}},
}

BIN
readme/screenshot001.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 KiB

BIN
readme/screenshot002.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 KiB

BIN
readme/screenshot003.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 KiB

BIN
readme/screenshot004.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
readme/screenshot005.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

View File

@ -0,0 +1,67 @@
\relax
\providecommand\hyper@newdestlabel[2]{}
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
\global\let\oldnewlabel\newlabel
\gdef\newlabel#1#2{\newlabelxx{#1}#2}
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\ifx\hyper@anchor\@undefined
\let\newlabel\oldnewlabel
\fi}
\fi}
\global\let\hyper@last\relax
\gdef\HyperFirstAtBeginDocument#1{#1}
\providecommand\HyField@AuxAddToFields[1]{}
\providecommand\HyField@AuxAddToCoFields[2]{}
\@writefile{toc}{\contentsline {chapter}{\numberline {1}Introduction}{2}{chapter.1}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{toc}{\contentsline {section}{\numberline {1.1}Description}{2}{section.1.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.1}Extra Features}{2}{subsection.1.1.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.2}Missing Features}{2}{subsection.1.1.2}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {1.2}Building}{2}{section.1.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.1}Caveats}{3}{subsection.1.2.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.2}Build Commands}{3}{subsection.1.2.2}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {1.1}{\ignorespaces Linux build commands.}}{3}{figure.1.1}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {1.3}Usage}{3}{section.1.3}\protected@file@percent }
\@writefile{toc}{\contentsline {chapter}{\numberline {2}Performance Mode}{4}{chapter.2}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:hp}{{2}{4}{Performance Mode}{chapter.2}{}}
\@writefile{toc}{\contentsline {section}{\numberline {2.1}Design}{4}{section.2.1}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2.2}Renderer}{4}{section.2.2}\protected@file@percent }
\citation{amdprogram}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.1}Rendering Pipeline}{5}{subsection.2.2.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{Vertex Shader}{5}{subsubsection*.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{Geometry Shader}{5}{subsubsection*.3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{Fragment Shader}{5}{subsubsection*.4}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2.3}Compute Shader}{5}{section.2.3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{Direction Offseting}{5}{subsubsection*.5}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2.4}Usage}{6}{section.2.4}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4.1}Building}{6}{subsection.2.4.1}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {2.1}{\ignorespaces Linux build commands.}}{6}{figure.2.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4.2}Running}{6}{subsection.2.4.2}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2.5}Future Plans}{6}{section.2.5}\protected@file@percent }
\newlabel{sec:fp}{{2.5}{6}{Future Plans}{section.2.5}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.5.1}Lists}{6}{subsection.2.5.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.5.2}Bitonic Sort}{7}{subsection.2.5.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.5.3}Tiling}{7}{subsection.2.5.3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.5.4}Occlusion Queries}{7}{subsection.2.5.4}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2.6}Figures}{7}{section.2.6}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {2.2}{\ignorespaces }}{7}{figure.2.2}\protected@file@percent }
\newlabel{fig:screenshot002}{{2.2}{7}{}{figure.2.2}{}}
\citation{*}
\bibstyle{plain}
\bibdata{references.bib}
\@writefile{lof}{\contentsline {figure}{\numberline {2.3}{\ignorespaces 20 million particles on the new renderer}}{8}{figure.2.3}\protected@file@percent }
\newlabel{fig:newrender}{{2.3}{8}{20 million particles on the new renderer}{figure.2.3}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {2.4}{\ignorespaces 6.4 million particles, fillrate (not compute) limited.}}{9}{figure.2.4}\protected@file@percent }
\newlabel{fig:phyiscsrend}{{2.4}{9}{6.4 million particles, fillrate (not compute) limited}{figure.2.4}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {2.5}{\ignorespaces 6.4 million particles, zoomed out, showing fillrate as the limiting factor in speed.}}{10}{figure.2.5}\protected@file@percent }
\newlabel{fig:phyiscsrendfill}{{2.5}{10}{6.4 million particles, zoomed out, showing fillrate as the limiting factor in speed}{figure.2.5}{}}
\bibcite{computeshader}{1}
\bibcite{glref}{2}
\bibcite{geometry}{3}
\bibcite{amdprogram}{4}
\bibcite{gpuparticles}{5}
\gdef \@abspage@last{13}

View File

@ -0,0 +1,37 @@
\begin{thebibliography}{1}
\bibitem{computeshader}
Mike Bailey.
\newblock {OpenGL Compute Shaders}.
\newblock
\url{"https://web.engr.oregonstate.edu/~mjb/cs519/Handouts/compute.shader.2pp.pdf"},
2021.
\newblock Accessed: 2023-04-01.
\bibitem{glref}
Krnonos Group.
\newblock {OpenGL Reference Manual}.
\newblock \url{"https://registry.khronos.org/OpenGL-Refpages/gl4/"}, 2014.
\bibitem{geometry}
JeGX.
\newblock {Particle Billboarding with the Geometry Shader}.
\newblock
\url{"https://www.geeks3d.com/20140815/particle-billboarding-with-the-geometry-shader-glsl/"},
2014.
\bibitem{amdprogram}
Emil Persson.
\newblock {ATI Radeon HD 2000 programming guide}.
\newblock
\url{"https://web.archive.org/web/20160722164341/http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/ATI_Radeon_HD_2000_programming_guide.pdf"},
2007.
\bibitem{gpuparticles}
Gareth Thomas.
\newblock {Compute-Based GPU Particle Systems}.
\newblock
\url{"https://ubm-twvideo01.s3.amazonaws.com/o1/vault/GDC2014/Presentations/Gareth_Thomas_Compute-based_GPU_Particle.pdf"},
2014.
\end{thebibliography}

View File

@ -0,0 +1,46 @@
This is BibTeX, Version 0.99d (TeX Live 2022/Debian)
Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
The top-level auxiliary file: template_Report.aux
The style file: plain.bst
Database file #1: references.bib
You've used 5 entries,
2118 wiz_defined-function locations,
521 strings with 4830 characters,
and the built_in function-call counts, 1069 in all, are:
= -- 102
> -- 35
< -- 0
+ -- 15
- -- 10
* -- 32
:= -- 186
add.period$ -- 16
call.type$ -- 5
change.case$ -- 20
chr.to.int$ -- 0
cite$ -- 5
duplicate$ -- 35
empty$ -- 111
format.name$ -- 10
if$ -- 233
int.to.chr$ -- 0
int.to.str$ -- 5
missing$ -- 0
newline$ -- 29
num.names$ -- 10
pop$ -- 40
preamble$ -- 1
purify$ -- 15
quote$ -- 0
skip$ -- 34
stack$ -- 0
substring$ -- 25
swap$ -- 5
text.length$ -- 0
text.prefix$ -- 0
top$ -- 0
type$ -- 20
warning$ -- 0
while$ -- 10
width$ -- 6
write$ -- 54

475
readme/template_Report.log Normal file
View File

@ -0,0 +1,475 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022/Debian) (preloaded format=pdflatex 2023.2.25) 5 APR 2023 00:44
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**template_Report.tex
(./template_Report.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-01-16>
(/usr/share/texlive/texmf-dist/tex/latex/base/report.cls
Document Class: report 2022/07/02 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2022/07/02 v1.4n Standard LaTeX file (size option)
)
\c@part=\count185
\c@chapter=\count186
\c@section=\count187
\c@subsection=\count188
\c@subsubsection=\count189
\c@paragraph=\count190
\c@subparagraph=\count191
\c@figure=\count192
\c@table=\count193
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
(/usr/share/texlive/texmf-dist/tex/latex/blindtext/blindtext.sty
Package: blindtext 2012/01/06 V2.0 blindtext-Package
(/usr/share/texlive/texmf-dist/tex/latex/tools/xspace.sty
Package: xspace 2014/10/28 v1.13 Space after command names (DPC,MH)
)
\c@blindtext=\count194
\c@Blindtext=\count195
\c@blind@countparstart=\count196
\blind@countxx=\count197
\blindtext@numBlindtext=\count198
\blind@countyy=\count199
\c@blindlist=\count266
\c@blindlistlevel=\count267
\c@blindlist@level=\count268
\blind@listitem=\count269
\c@blind@listcount=\count270
\c@blind@levelcount=\count271
\blind@mathformula=\count272
\blind@Mathformula=\count273
\c@blind@randomcount=\count274
\c@blind@randommax=\count275
\c@blind@pangramcount=\count276
\c@blind@pangrammax=\count277
)
(/usr/share/texlive/texmf-dist/tex/latex/titlepic/titlepic.sty
Package: titlepic 2017/03/14 1.2 Package to display a picture on the title page
)
(/usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty
Package: titlesec 2021/07/05 v2.14 Sectioning titles
\ttl@box=\box51
\beforetitleunit=\skip50
\aftertitleunit=\skip51
\ttl@plus=\dimen141
\ttl@minus=\dimen142
\ttl@toksa=\toks16
\titlewidth=\dimen143
\titlewidthlast=\dimen144
\titlewidthfirst=\dimen145
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks17
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 107.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex
))
\Gin@req@height=\dimen146
\Gin@req@width=\dimen147
)
(/usr/share/texlive/texmf-dist/tex/latex/float/float.sty
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count278
\float@exts=\toks18
\float@box=\box52
\@float@everytoks=\toks19
\@floatcapt=\box53
)
(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty
\lst@mode=\count279
\lst@gtempboxa=\box54
\lst@token=\toks20
\lst@length=\count280
\lst@currlwidth=\dimen148
\lst@column=\count281
\lst@pos=\count282
\lst@lostspace=\dimen149
\lst@width=\dimen150
\lst@newlines=\count283
\lst@lineno=\count284
\lst@maxwidth=\dimen151
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty
File: lstmisc.sty 2020/03/24 1.8d (Carsten Heinz)
\c@lstnumber=\count285
\lst@skipnumbers=\count286
\lst@framebox=\box55
)
(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg
File: listings.cfg 2020/03/24 1.8d listings configuration
))
Package: listings 2020/03/24 1.8d (Carsten Heinz)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
Package: hyperref 2022-11-13 v7.00u Hypertext links for LaTeX
(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
)
(/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty
Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty
Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
Package: letltxmacro 2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty
Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2022-05-17 v2.50 Cross-referencing by name of section
(/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty
Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO)
(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty
Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO)
))
\c@section@level=\count287
)
\@linkdim=\dimen152
\Hy@linkcounter=\count288
\Hy@pagecounter=\count289
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def
File: pd1enc.def 2022-11-13 v7.00u Hyperref: PDFDocEncoding definition (HO)
Now handling font encoding PD1 ...
... no UTF-8 mapping file for font encoding PD1
)
(/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty
Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty
Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
)
\Hy@SavedSpaceFactor=\count290
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def
File: puenc.def 2022-11-13 v7.00u Hyperref: PDF Unicode definition (HO)
Now handling font encoding PU ...
... no UTF-8 mapping file for font encoding PU
)
Package hyperref Info: Option `colorlinks' set `true' on input line 4045.
Package hyperref Info: Hyper figures OFF on input line 4162.
Package hyperref Info: Link nesting OFF on input line 4167.
Package hyperref Info: Hyper index ON on input line 4170.
Package hyperref Info: Plain pages OFF on input line 4177.
Package hyperref Info: Backreferencing OFF on input line 4182.
Package hyperref Info: Implicit mode ON; LaTeX internals redefined.
Package hyperref Info: Bookmarks ON on input line 4410.
\c@Hy@tempcnt=\count291
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip16
Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line 4748.
\XeTeXLinkMargin=\dimen153
(/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty
Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO)
(/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO
)
))
\Fld@menulength=\count292
\Field@Width=\dimen154
\Fld@charsize=\dimen155
Package hyperref Info: Hyper figures OFF on input line 6027.
Package hyperref Info: Link nesting OFF on input line 6032.
Package hyperref Info: Hyper index ON on input line 6035.
Package hyperref Info: backreferencing OFF on input line 6042.
Package hyperref Info: Link coloring ON on input line 6045.
Package hyperref Info: Link coloring with OCG OFF on input line 6052.
Package hyperref Info: PDF/A mode OFF on input line 6057.
(/usr/share/texlive/texmf-dist/tex/latex/base/atbegshi-ltx.sty
Package: atbegshi-ltx 2021/01/10 v1.0c Emulation of the original atbegshi
package with kernel methods
)
\Hy@abspage=\count293
\c@Item=\count294
\c@Hfootnote=\count295
)
Package hyperref Info: Driver (autodetected): hpdftex.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
File: hpdftex.def 2022-11-13 v7.00u Hyperref driver for pdfTeX
(/usr/share/texlive/texmf-dist/tex/latex/base/atveryend-ltx.sty
Package: atveryend-ltx 2020/08/19 v1.0a Emulation of the original atveryend pac
kage
with kernel methods
)
\Fld@listcount=\count296
\c@bookmark@seq@number=\count297
(/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
Package: rerunfilecheck 2022-07-10 v1.10 Rerun checks for auxiliary files (HO)
(/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO)
)
Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2
85.
)
\Hy@SectionHShift=\skip52
)
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2023-01-16 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count298
\l__pdf_internal_box=\box56
)
(./template_Report.aux)
\openout1 = `template_Report.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 34.
LaTeX Font Info: ... okay on input line 34.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 34.
LaTeX Font Info: ... okay on input line 34.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 34.
LaTeX Font Info: ... okay on input line 34.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 34.
LaTeX Font Info: ... okay on input line 34.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 34.
LaTeX Font Info: ... okay on input line 34.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 34.
LaTeX Font Info: ... okay on input line 34.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 34.
LaTeX Font Info: ... okay on input line 34.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 34.
LaTeX Font Info: ... okay on input line 34.
LaTeX Font Info: Checking defaults for PU/pdf/m/n on input line 34.
LaTeX Font Info: ... okay on input line 34.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count299
\scratchdimen=\dimen156
\scratchbox=\box57
\nofMPsegments=\count300
\nofMParguments=\count301
\everyMPshowfont=\toks21
\MPscratchCnt=\count302
\MPscratchDim=\dimen157
\MPnumerator=\count303
\makeMPintoPDFobject=\count304
\everyMPtoPDFconversion=\toks22
) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
85.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
\c@lstlisting=\count305
(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty
Package: color 2022/01/06 v1.3d Standard LaTeX Color (DPC)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package color Info: Driver file: pdftex.def on input line 149.
(/usr/share/texlive/texmf-dist/tex/latex/graphics/mathcolor.ltx))
Package hyperref Info: Link coloring ON on input line 34.
(./template_Report.out) (./template_Report.out)
\@outlinefile=\write3
\openout3 = `template_Report.out'.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 36.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 36.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 36.
<screenshot001.png, id=92, 733.23938pt x 640.64343pt>
File: screenshot001.png Graphic file (type png)
<use screenshot001.png>
Package pdftex.def Info: screenshot001.png used on input line 36.
(pdftex.def) Requested size: 345.0pt x 301.43481pt.
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} <./screenshot001.png>]
pdfTeX warning (ext4): destination with the same identifier (name{page.1}) has
been already used, duplicate ignored
<to be read again>
\relax
l.39 \end{abstract}
[1] (./template_Report.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line 2.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 2.
)
\tf@toc=\write4
\openout4 = `template_Report.toc'.
pdfTeX warning (ext4): destination with the same identifier (name{page.1}) has
been already used, duplicate ignored
<to be read again>
\relax
l.43 \chapter
{Introduction} [1
]
Chapter 1.
[2
] [3]
Chapter 2.
[4
] [5]
<screenshot002.png, id=174, 1275.26437pt x 776.14969pt>
File: screenshot002.png Graphic file (type png)
<use screenshot002.png>
Package pdftex.def Info: screenshot002.png used on input line 117.
(pdftex.def) Requested size: 552.0021pt x 335.95251pt.
[6]
<screenshot003.png, id=180, 1084.05pt x 562.35094pt>
File: screenshot003.png Graphic file (type png)
<use screenshot003.png>
Package pdftex.def Info: screenshot003.png used on input line 123.
(pdftex.def) Requested size: 552.0021pt x 286.35756pt.
[7 <./screenshot002.png (PNG copy)>]
<screenshot004.png, id=185, 1084.80281pt x 562.35094pt>
File: screenshot004.png Graphic file (type png)
<use screenshot004.png>
Package pdftex.def Info: screenshot004.png used on input line 130.
(pdftex.def) Requested size: 552.0021pt x 286.1602pt.
<screenshot005.png, id=186, 1085.55562pt x 563.10374pt>
File: screenshot005.png Graphic file (type png)
<use screenshot005.png>
Package pdftex.def Info: screenshot005.png used on input line 137.
(pdftex.def) Requested size: 552.0021pt x 286.34566pt.
(./template_Report.bbl
[8 <./screenshot003.png (PNG copy)>] [9 <./screenshot004.png (PNG copy)>]
[10 <./screenshot005.png (PNG copy)>]
Underfull \hbox (badness 3954) in paragraph at lines 4--10
[]\OT1/cmr/m/n/10 Mike Bai-ley. OpenGL Com-pute Shaders. [][]$\OT1/cmtt/m/n/1
0 "https : / / web . engr .
[]
Underfull \hbox (badness 10000) in paragraph at lines 4--10
\OT1/cmtt/m/n/10 oregonstate . edu / []mjb / cs519 / Handouts / compute . shade
r . 2pp . pdf"$[][]\OT1/cmr/m/n/10 ,
[]
Underfull \hbox (badness 1107) in paragraph at lines 12--15
[]\OT1/cmr/m/n/10 Krnonos Group. OpenGL Ref-er-ence Man-ual. [][]$\OT1/cmtt/m
/n/10 "https : / / registry .
[]
Underfull \hbox (badness 10000) in paragraph at lines 17--22
[]\OT1/cmr/m/n/10 JeGX. Par-ti-cle Bill-board-ing with the Ge-om-e-
[]
Underfull \hbox (badness 10000) in paragraph at lines 17--22
\OT1/cmr/m/n/10 try Shader. [][]$\OT1/cmtt/m/n/10 "https : / / www . geeks3d .
com / 20140815 /
[]
Underfull \hbox (badness 10000) in paragraph at lines 24--29
\OT1/cmtt/m/n/10 / / web . archive . org / web / 20160722164341 / http : / / am
d-[]dev . wpengine .
[]
Underfull \hbox (badness 10000) in paragraph at lines 24--29
\OT1/cmtt/m/n/10 netdna-[]cdn . com / wordpress / media / 2012 / 10 / ATI _ Rad
eon _ HD _ 2000 _
[]
Underfull \hbox (badness 10000) in paragraph at lines 31--36
\OT1/cmtt/m/n/10 ubm-[]twvideo01 . s3 . amazonaws . com / o1 / vault / GDC2014
/ Presentations /
[]
) [11
] (./template_Report.aux)
Package rerunfilecheck Info: File `template_Report.out' has not changed.
(rerunfilecheck) Checksum: 07FA6F01F76508B7028734DCD8C73298;2423.
)
Here is how much of TeX's memory you used:
10301 strings out of 477975
162272 string characters out of 5839281
1858330 words of memory out of 5000000
30270 multiletter control sequences out of 15000+600000
517651 words of font info for 50 fonts, out of 8000000 for 9000
59 hyphenation exceptions out of 8191
75i,6n,76p,1346b,460s stack positions out of 10000i,1000n,20000p,200000b,200000s
</home/brett/.texlive2022/texmf-var/fonts/pk/ljfour/jknappen/ec/tcrm1000.600
pk></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></u
sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/sha
re/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texl
ive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share/texlive/tex
mf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb></usr/share/texlive/texmf-dist
/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on template_Report.pdf (13 pages, 4340620 bytes).
PDF statistics:
268 PDF objects out of 1000 (max. 8388607)
231 compressed objects within 3 object streams
51 named destinations out of 1000 (max. 500000)
202 words of extra memory for PDF output out of 10000 (max. 10000000)

View File

@ -0,0 +1,22 @@
\BOOKMARK [0][-]{chapter.1}{\376\377\000I\000n\000t\000r\000o\000d\000u\000c\000t\000i\000o\000n}{}% 1
\BOOKMARK [1][-]{section.1.1}{\376\377\000D\000e\000s\000c\000r\000i\000p\000t\000i\000o\000n}{chapter.1}% 2
\BOOKMARK [2][-]{subsection.1.1.1}{\376\377\000E\000x\000t\000r\000a\000\040\000F\000e\000a\000t\000u\000r\000e\000s}{section.1.1}% 3
\BOOKMARK [2][-]{subsection.1.1.2}{\376\377\000M\000i\000s\000s\000i\000n\000g\000\040\000F\000e\000a\000t\000u\000r\000e\000s}{section.1.1}% 4
\BOOKMARK [1][-]{section.1.2}{\376\377\000B\000u\000i\000l\000d\000i\000n\000g}{chapter.1}% 5
\BOOKMARK [2][-]{subsection.1.2.1}{\376\377\000C\000a\000v\000e\000a\000t\000s}{section.1.2}% 6
\BOOKMARK [2][-]{subsection.1.2.2}{\376\377\000B\000u\000i\000l\000d\000\040\000C\000o\000m\000m\000a\000n\000d\000s}{section.1.2}% 7
\BOOKMARK [1][-]{section.1.3}{\376\377\000U\000s\000a\000g\000e}{chapter.1}% 8
\BOOKMARK [0][-]{chapter.2}{\376\377\000P\000e\000r\000f\000o\000r\000m\000a\000n\000c\000e\000\040\000M\000o\000d\000e}{}% 9
\BOOKMARK [1][-]{section.2.1}{\376\377\000D\000e\000s\000i\000g\000n}{chapter.2}% 10
\BOOKMARK [1][-]{section.2.2}{\376\377\000R\000e\000n\000d\000e\000r\000e\000r}{chapter.2}% 11
\BOOKMARK [2][-]{subsection.2.2.1}{\376\377\000R\000e\000n\000d\000e\000r\000i\000n\000g\000\040\000P\000i\000p\000e\000l\000i\000n\000e}{section.2.2}% 12
\BOOKMARK [1][-]{section.2.3}{\376\377\000C\000o\000m\000p\000u\000t\000e\000\040\000S\000h\000a\000d\000e\000r}{chapter.2}% 13
\BOOKMARK [1][-]{section.2.4}{\376\377\000U\000s\000a\000g\000e}{chapter.2}% 14
\BOOKMARK [2][-]{subsection.2.4.1}{\376\377\000B\000u\000i\000l\000d\000i\000n\000g}{section.2.4}% 15
\BOOKMARK [2][-]{subsection.2.4.2}{\376\377\000R\000u\000n\000n\000i\000n\000g}{section.2.4}% 16
\BOOKMARK [1][-]{section.2.5}{\376\377\000F\000u\000t\000u\000r\000e\000\040\000P\000l\000a\000n\000s}{chapter.2}% 17
\BOOKMARK [2][-]{subsection.2.5.1}{\376\377\000L\000i\000s\000t\000s}{section.2.5}% 18
\BOOKMARK [2][-]{subsection.2.5.2}{\376\377\000B\000i\000t\000o\000n\000i\000c\000\040\000S\000o\000r\000t}{section.2.5}% 19
\BOOKMARK [2][-]{subsection.2.5.3}{\376\377\000T\000i\000l\000i\000n\000g}{section.2.5}% 20
\BOOKMARK [2][-]{subsection.2.5.4}{\376\377\000O\000c\000c\000l\000u\000s\000i\000o\000n\000\040\000Q\000u\000e\000r\000i\000e\000s}{section.2.5}% 21
\BOOKMARK [1][-]{section.2.6}{\376\377\000F\000i\000g\000u\000r\000e\000s}{chapter.2}% 22

BIN
readme/template_Report.pdf Normal file

Binary file not shown.

Binary file not shown.

149
readme/template_Report.tex Normal file
View File

@ -0,0 +1,149 @@
\documentclass[]{report}
\usepackage{blindtext}
\usepackage{titlepic}
\usepackage{titlesec}
\usepackage{graphicx}
\usepackage{float}
\usepackage{titlesec}
\usepackage{listings}
\usepackage[%
colorlinks=true,
pdfborder={0 0 0},
linkcolor=red
]{hyperref}
\makeatletter
\renewcommand{\@makechapterhead}[1]{%
\vspace*{50 pt}%
{\setlength{\parindent}{0pt} \raggedright \normalfont
\bfseries\Huge
#1\par\nobreak\vspace{40 pt}}}
\makeatother
% Title Page
\title{COSC 3P98 Assignment 3}
\author{Brett Terpstra - 6920201 - bt19ex@brocku.ca}
\titlepic{\includegraphics[width=\textwidth]{screenshot001.png}}
\renewcommand*\contentsname{Table Of Contents}
\begin{document}
\maketitle
\begin{abstract}
Particle systems are the cornerstone of all modern game engines as they allow effects such as smoke which are otherwise impossible with static meshes. Ergo a good particle system should be flexible while maintaining stable performance. This document serves as an informal report on the design and implementaion of two particle systems; a basic but flexible engine and a high performance extendable "modern" GPU powered particle system.
\end{abstract}
\tableofcontents
\chapter{Introduction}
\section{Description}
Over the course of working on this assignment I began to wonder how far I could push my hardware and \autoref{chap:hp} "Performance Mode" will go furher into this. As for the main assignment requirements, they are met simply by running the CMake project. On my hardware the simple particle fountain can reach 30k particles and features sorted transparency.
\subsection{Extra Features}
\begin{itemize}
\item Ordered Alpha Blending
\item "Spray" Mode (12)
\item Textured Particles/Plane/Cube (16)
\item Particles with Different Textures (18)
\item Extra Feature - "Performance Mode" (23)
\end{itemize}
\subsection{Missing Features}
Random spin mode was left out intentionally for two reasons. One, I specifically designed the particle strucutre to fit in 32 bytes, half the width of a cache line. Two, the potential marks was not worth disturbing the particle data structure and further altering the particle system. There is likely little benefit to ensuring the particles fit nicely inside a cache line as most of the CPU time is spent on OpenGL API calls. See \autoref{chap:hp} "Performance Mode" for more information.
\section{Building}
As of writing this report, I have yet to build and test on Windows. The Visual Studio project will build without issues, however, since this assignment was primarily designed and tested on Debain 12 "Bookworm" (Linux 6.1.0-6-amd64) using AMD/Intel hardware (Mesa 22.3.6), I reccomend using CMake.
\subsection{Caveats}
The assignment makes use of a non-standard OpenGL extention during texture loading. "GL\_TEXTURE\_MAX\_ANISOTROPY\_EXT" should work on all modern Intel/AMD/Nvidia hardware, if it doesn't work on your hardware consider removing the line from texture.h and high\_perf.cpp
\subsection{Build Commands}
\begin{figure}[H]
\centering
\begin{verbatim}
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make -j 16
./assign3
\end{verbatim}
\caption{Linux build commands.}
\end{figure}
\section{Usage}
Keybindings and usage instructions are printed at program startup.
\chapter{Performance Mode}\label{chap:hp}
\section{Design}
The high performance mode is the result of a weekend hack-a-ton where I wanted to see how easy it would be to implement a million particle+ renderer. If I had more time I would encapsulate the high\_perf.cpp file into the particle system class, allowing for multiple *and customizable* particle systems. If you wish to change settings, most are constants in shaders/physics.comp or high\_perf/high\_perf.cpp. The rendering engine itself can handle around 20 million particles at about 60fps (\autoref{fig:screenshot002}). With phyiscs enabled, the engine can handle about 6 million particles (\autoref{fig:phyiscsrend}) but as \autoref{fig:phyiscsrendfill} shows, the renderer is clearly fillrate limited. Solutions to increase the number of rendered particles are discussed in \autoref{sec:fp}. It should be noted that (\autoref{fig:screenshot002}) used a previous renderer which made use of a instanced "GL\_TRIANGLES" approach and did not have textures or billboarding. The new renderer (\autoref{fig:newrender}) makes use of "GL\_POINTS" with a geometry shader to generate the vertices and features billboarding/texturing. A compute shader is used before rendering to update the particle positions and directions on the GPU. This way there is no need to copy the data to and from the graphics card.
\section{Renderer}
The legacy OpenGL renderer uses display lists to speedup rendering of the particles. Although this method is faster than using the same draw commands inline, it is highly limited by driver overhead. Modern GPUs are deisgned to process massive amounts of data all at once and benfit from reducing the amount of synchronization between the GPU and CPU. As mentioned earlier the current renderer uses an vertex buffer object to store all particle positions and directions in one giant array. It then uses those points to render all particles in a single draw call, thereby reducing driver overhead.
\subsection{Rendering Pipeline}
\subsubsection{Vertex Shader}
The vertex shader is purely used to passthough the particle position to the geometry shader. Since the vertex shader does not have the ability to output multiple vertices (not easily at least), we have to use a geometry shader.
\subsubsection{Geometry Shader}
The geometry shader uses the up and right vectors from the inverse view matrix to generate a quad facing the camera. It takes in the particle position and outputs a triangle strip. This is a highly efficent opperation as according to AMD there is dedicated hardware to handle this particular geometry shader case\cite[p.~9]{amdprogram}.
\subsubsection{Fragment Shader}
The fragment shader is run once per pixel and is responsible for texturing the particles. I use a texture array as it can be bound once before rendering, therefore particles do not need to be sperated by texture. Using an array has the downside of every texture needs to be the same size, to solve this I resize the texture as it is loaded. Unforunately this will lead to some textures being distorted but the performance gain is worth it. The modern renderer is constrained by the lack of 'advanced' programming techniques, some of which are discussed in \autoref{sec:fp}.
\section{Compute Shader}
Compute shaders are very useful for embaressingly parallel tasks like updating particles. The compute shader is a very simple (nearly 1:1) translation of the CPU version of the particle system's update function. It handles 'dead' particles by reseting them to the inital position / direction. As a result particles are intialized with a random lifetime between 0 and the max lifetime to ensure even distribution. If you change the particle lifetime, please modify both constants!
\subsubsection{Direction Offseting}
Because generating random numbers on the GPU is hard (there is no dedicated hardware random number generator), I generate a random set of offsets at startup and upload these randoms to the GPU. The particle index is then used to access this buffer when the particle is reset; the result is a convincing distribution of particles. The large the number of particles the larger the offset buffer should be. Up to 6 million 8192 should be fine. If things look off consider increasing the value to some larger power of two. Make sure you update both constants here as well!
\section{Usage}
\subsection{Building}
Add "-DEXTRAS=ON" to the CMake command.
\begin{figure}[H]
\centering
\begin{verbatim}
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DEXTRAS=ON ../
make -j 16
./assign3
\end{verbatim}
\caption{Linux build commands.}
\end{figure}
\subsection{Running}
All particles exist from the begining, which means all particles start at the inital position and slowly spread out. After starting the program but before moving around, you should press 'p' to allow the compute shader to run, once the particles spread out it is safe to move. The slow performance of all the particles in the same spot has to do with overdraw accessing and writing the same location of the depth texture (hard to do in parallel). Fillrate is a common issue with this particle renderer. See the future plans section for possible resolutions.
\section{Future Plans}\label{sec:fp}
Unfortunately because this is exam season, I do not have time to do anything more with this assignment. Furthermore I do not think the effort I've put in so far will be reflected in the value of the mark and any further improvements would be a waste. Below is a list of features I began looking into but as I have no experience with, they would require far too much experimentation and research to implement myself in a reasonable amount of time. As it is it took a weekend to implement something I was already somewhat familar with.
\subsection{Lists}
I would like to make it so all particles are not rendered all the time. Basically add a dead / alive particles list. This would prevent the issue of all particles starting in the same place, the low performance that causes and would be helpful in sorting.
\subsection{Bitonic Sort}
\subsection{Tiling}
\subsection{Occlusion Queries}
\section{Figures}
\begin{figure}[H]
\centerline{\includegraphics[width=1.6\linewidth]{screenshot002}}
\caption[]{20 million particles distributed in a 50x25x50 cube with load monitors}
\label{fig:screenshot002}
\end{figure}
\begin{figure}[H]
\centerline{\includegraphics[width=1.6\linewidth]{screenshot003}}
\caption{20 million particles on the new renderer}
\label{fig:newrender}
\end{figure}
\begin{figure}
\centering
\centerline{\includegraphics[width=1.6\linewidth]{screenshot004}}
\caption{6.4 million particles, fillrate (not compute) limited.}
\label{fig:phyiscsrend}
\end{figure}
\begin{figure}
\centering
\centerline{\includegraphics[width=1.6\linewidth]{screenshot005}}
\caption{6.4 million particles, zoomed out, showing fillrate as the limiting factor in speed.}
\label{fig:phyiscsrendfill}
\end{figure}
\nocite{*}
\bibliographystyle{plain}
\bibliography{references.bib}
\end{document}

View File

@ -0,0 +1,26 @@
\contentsline {chapter}{\numberline {1}Introduction}{2}{chapter.1}%
\contentsline {section}{\numberline {1.1}Description}{2}{section.1.1}%
\contentsline {subsection}{\numberline {1.1.1}Extra Features}{2}{subsection.1.1.1}%
\contentsline {subsection}{\numberline {1.1.2}Missing Features}{2}{subsection.1.1.2}%
\contentsline {section}{\numberline {1.2}Building}{2}{section.1.2}%
\contentsline {subsection}{\numberline {1.2.1}Caveats}{3}{subsection.1.2.1}%
\contentsline {subsection}{\numberline {1.2.2}Build Commands}{3}{subsection.1.2.2}%
\contentsline {section}{\numberline {1.3}Usage}{3}{section.1.3}%
\contentsline {chapter}{\numberline {2}Performance Mode}{4}{chapter.2}%
\contentsline {section}{\numberline {2.1}Design}{4}{section.2.1}%
\contentsline {section}{\numberline {2.2}Renderer}{4}{section.2.2}%
\contentsline {subsection}{\numberline {2.2.1}Rendering Pipeline}{5}{subsection.2.2.1}%
\contentsline {subsubsection}{Vertex Shader}{5}{subsubsection*.2}%
\contentsline {subsubsection}{Geometry Shader}{5}{subsubsection*.3}%
\contentsline {subsubsection}{Fragment Shader}{5}{subsubsection*.4}%
\contentsline {section}{\numberline {2.3}Compute Shader}{5}{section.2.3}%
\contentsline {subsubsection}{Direction Offseting}{5}{subsubsection*.5}%
\contentsline {section}{\numberline {2.4}Usage}{6}{section.2.4}%
\contentsline {subsection}{\numberline {2.4.1}Building}{6}{subsection.2.4.1}%
\contentsline {subsection}{\numberline {2.4.2}Running}{6}{subsection.2.4.2}%
\contentsline {section}{\numberline {2.5}Future Plans}{6}{section.2.5}%
\contentsline {subsection}{\numberline {2.5.1}Lists}{6}{subsection.2.5.1}%
\contentsline {subsection}{\numberline {2.5.2}Bitonic Sort}{7}{subsection.2.5.2}%
\contentsline {subsection}{\numberline {2.5.3}Tiling}{7}{subsection.2.5.3}%
\contentsline {subsection}{\numberline {2.5.4}Occlusion Queries}{7}{subsection.2.5.4}%
\contentsline {section}{\numberline {2.6}Figures}{7}{section.2.6}%

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Some files were not shown because too many files have changed in this diff Show More