mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
refactor & fix random deleting texture
This commit is contained in:
parent
e158b384fa
commit
8bb03a004f
7 changed files with 65 additions and 64 deletions
|
|
@ -135,20 +135,21 @@ void PostProcessing::render(
|
|||
const auto& vp = context.getViewport();
|
||||
refreshFbos(vp.x, vp.y);
|
||||
|
||||
glActiveTexture(GL_TEXTURE4);
|
||||
glBindTexture(GL_TEXTURE_2D, shadowMap);
|
||||
|
||||
if (gbuffer) {
|
||||
gbuffer->bindBuffers();
|
||||
|
||||
glActiveTexture(GL_TEXTURE3);
|
||||
glBindTexture(GL_TEXTURE_2D, noiseTexture);
|
||||
|
||||
glActiveTexture(GL_TEXTURE4);
|
||||
glBindTexture(GL_TEXTURE_2D, shadowMap);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
} else {
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
fbo->getTexture()->bind();
|
||||
}
|
||||
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
|
||||
if (totalPasses == 0) {
|
||||
auto& effect = assets.require<PostEffect>("default");
|
||||
auto& shader = effect.use();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue