Fix textureview
This commit is contained in:
parent
6bf5c13bde
commit
f4e0437106
@ -314,22 +314,22 @@ void PostProcessing::renderGaussian3Blur(FrameBuffer &in_fbo, FrameBuffer &auxil
|
||||
}
|
||||
}
|
||||
|
||||
static GLuint LayerTex = 0;
|
||||
|
||||
void PostProcessing::renderGaussian6BlurLayer(FrameBuffer &in_fbo)
|
||||
{
|
||||
if (!LayerTex)
|
||||
glGenTextures(1, &LayerTex);
|
||||
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
{
|
||||
// Used as temp
|
||||
irr_driver->getFBO(FBO_BLOOM_1024).Bind();
|
||||
GLuint LayerTex;
|
||||
glGenTextures(1, &LayerTex);
|
||||
glTextureView(LayerTex, GL_TEXTURE_2D, in_fbo.getRTT()[0], GL_R32F, 0, 1, i, 1);
|
||||
FullScreenShader::Gaussian6VBlurShader::getInstance()->SetTextureUnits(LayerTex);
|
||||
DrawFullScreenEffect<FullScreenShader::Gaussian6VBlurShader>(core::vector2df(1. / 1024., 1. / 1024.));
|
||||
in_fbo.BindLayer(i);
|
||||
FullScreenShader::Gaussian6HBlurShader::getInstance()->SetTextureUnits(irr_driver->getFBO(FBO_BLOOM_1024).getRTT()[0]);
|
||||
DrawFullScreenEffect<FullScreenShader::Gaussian6HBlurShader>(core::vector2df(1. / 1024., 1. / 1024.));
|
||||
glDeleteTextures(1, &LayerTex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,8 +223,8 @@ RTT::RTT(size_t width, size_t height)
|
||||
|
||||
if (UserConfigParams::m_shadows && !irr_driver->needUBOWorkaround())
|
||||
{
|
||||
shadowColorTex = generateRTT3D(GL_TEXTURE_2D_ARRAY, 1024, 1024, 4, GL_R32F, GL_RED, GL_FLOAT, 10);
|
||||
shadowDepthTex = generateRTT3D(GL_TEXTURE_2D_ARRAY, 1024, 1024, 4, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 10);
|
||||
shadowColorTex = generateRTT3D(GL_TEXTURE_2D_ARRAY, 1024, 1024, 4, GL_R32F, GL_RED, GL_FLOAT, 1);
|
||||
shadowDepthTex = generateRTT3D(GL_TEXTURE_2D_ARRAY, 1024, 1024, 4, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 1);
|
||||
|
||||
somevector.clear();
|
||||
somevector.push_back(shadowColorTex);
|
||||
|
Loading…
Reference in New Issue
Block a user