MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / DeferredDOFPass

Method DeferredDOFPass

src/Nazara/Graphics/DeferredDOFPass.cpp:107–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 */
106
107 DeferredDOFPass::DeferredDOFPass()
108 {
109 m_dofShader = BuildDepthOfFieldShader();
110 m_dofShader->SendInteger(m_dofShader->GetUniformLocation("ColorTexture"), 0);
111 m_dofShader->SendInteger(m_dofShader->GetUniformLocation("BlurTexture"), 1);
112 m_dofShader->SendInteger(m_dofShader->GetUniformLocation("GBuffer1"), 2);
113
114 m_gaussianBlurShader = ShaderLibrary::Get("DeferredGaussianBlur");
115 m_gaussianBlurShaderFilterLocation = m_gaussianBlurShader->GetUniformLocation("Filter");
116
117 for (unsigned int i = 0; i < 2; ++i)
118 m_dofTextures[i] = Texture::New();
119
120 m_bilinearSampler.SetAnisotropyLevel(1);
121 m_bilinearSampler.SetFilterMode(SamplerFilter_Bilinear);
122 m_bilinearSampler.SetWrapMode(SamplerWrap_Clamp);
123
124 m_pointSampler.SetAnisotropyLevel(1);
125 m_pointSampler.SetFilterMode(SamplerFilter_Nearest);
126 m_pointSampler.SetWrapMode(SamplerWrap_Clamp);
127
128 m_states.depthBuffer = false;
129 }
130
131 DeferredDOFPass::~DeferredDOFPass() = default;
132

Callers

nothing calls this directly

Calls 6

BuildDepthOfFieldShaderFunction · 0.85
SendIntegerMethod · 0.80
GetUniformLocationMethod · 0.80
SetAnisotropyLevelMethod · 0.80
SetFilterModeMethod · 0.80
SetWrapModeMethod · 0.80

Tested by

no test coverage detected