Class DepthOfField¶
Defined in File depthoffield.hpp
Inheritance Relationships¶
Base Type¶
public legion::rendering::PostProcessingEffect< DepthOfField >
(Template Class PostProcessingEffect)
Class Documentation¶
-
class
legion::rendering
::
DepthOfField
: public legion::rendering::PostProcessingEffect<DepthOfField>¶ Public Functions
-
virtual void
setup
(app::window &context) override¶ setup The setup function of the post processing effect.
- Parameters
context
: The current context that is being used inside of the effect.
-
void
renderPass
(framebuffer &fbo, RenderPipelineBase *pipeline, camera &cam, const camera::camera_input &camInput, time::span deltaTime)¶ renderPass The function that is called every frame.
- Parameters
fbo
: The framebuffer used for this particular effect.pipeline
: The pipeline used for this particular effect.cam
: The camera object holding the camera data.camInput
: The matrix data used to do everything 3D math-i.deltaTime
: Current delta time.
-
void
areaOfFocus
(texture_handle &color_texture, const camera::camera_input &camInput, texture_handle &position_texture)¶ areaOfFocus Calculates what is in focus and what is not.
- Parameters
color_texture
: The scene color texture collected from the framebuffer.camInput
: The matrix data used to do everything 3D math-i.position_texture
: The scene position texture collected from the framebuffer.
-
void
preFilter
(framebuffer &fbo, texture_handle &color_texture)¶ preFilter Pre-bokeh pass, also used to resize the color texture.
- Parameters
fbo
: The framebuffer used for this particular effect.color_texture
: The scene color texture collected from the framebuffer.
-
void
bokeh
(framebuffer &fbo, texture_handle &color_texture)¶ bokeh The bokeh blur pass, blurs all everything that is outside focus range.
- Parameters
fbo
: The framebuffer used for this particular effect.color_texture
: The scene color texture collected from the framebuffer.
-
void
postFilter
(framebuffer &fbo, texture_handle &color_texture)¶ postFilter The post filter pass blurs the bokeh effect to look like a more solid blur.
- Parameters
fbo
: The framebuffer used for this particular effect.color_texture
: The scene color texture collected from the framebuffer.
-
void
combine
(framebuffer &fbo, texture_handle &color_texture)¶ combine The combine pass combines the area of focus, bokeh and color texture.
- Parameters
fbo
: The framebuffer used for this particular effect.color_texture
: The scene color texture collected from the framebuffer.
-
void
renderResults
(framebuffer &fbo, texture_handle &texture, texture_handle &color_texture)¶ renderResults This pass is to properly display the right texture at the end.
- Parameters
fbo
: The framebuffer used for this particular effect.color_texture
: The scene color texture collected from the framebuffer.
-
std::tuple<bool, texture_handle, texture_handle>
getTextures
(framebuffer &fbo)¶ getTextures Gets all the necessary textures from the framebuffer.
- Return
Returns a tuple of a bool, stating if it managed to get the textures and the other 2 are getting the color and position texture.
- Parameters
fbo
: The framebuffer used for this particular effect.
-
virtual void