VoxelEngine
 
Loading...
Searching...
No Matches
UtilityShaders.h
1#pragma once
2
3#include <LWGL/GLTypes.h>
4#include <memory>
5
6namespace gl {
7 class Texture2D;
8 class FBO;
9} // namespace gl
10
11namespace engine {
12
13 class Material;
14
15 // extern std::unique_ptr<Material> s_gaussianBlurMat;
16
17 enum class BlurType {
18 Gaussian,
19 LinearSampling
20 };
21
22 void initUtilityShaders();
23
24 void applyGaussianBlur(
25 const gl::FBO& source,
26 gl::FBOAttachment::Attachment sourceAttachment,
27 gl::FBOAttachment::Attachment tempAttachment,
28 int width,
29 int height,
30 const gl::FBO* temp = nullptr
31 );
32
33 void applyLinearSamplingBlur(
34 const gl::FBO& source,
35 gl::FBOAttachment::Attachment sourceAttachment,
36 gl::FBOAttachment::Attachment tempAttachment,
37 int width,
38 int height,
39 const gl::FBO* temp = nullptr
40 );
41
42 void applyBlur(
43 std::unique_ptr<Material>& blurMat,
44 const gl::FBO& source,
45 gl::FBOAttachment::Attachment sourceAttachment,
46 gl::FBOAttachment::Attachment tempAttachment,
47 int width,
48 int height,
49 const gl::FBO* temp = nullptr
50 );
51} // namespace engine