important fix, texture manager
This commit is contained in:
@@ -119,7 +119,7 @@ void Renderer::reloadShaders() {
|
||||
shader_fxaa = nullptr;
|
||||
if (tone_proc.shader_sum) delete tone_proc.shader_sum;
|
||||
tone_proc.shader_sum = nullptr;
|
||||
QString dir = ":/shaders/";
|
||||
QString dir = "./shaders/";
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
loadShadersMulti(shaders[it.key()], dir + it.value(), true, shader_defines.value(it.key()));
|
||||
@@ -409,21 +409,22 @@ void Renderer::renderScene() {
|
||||
fbo_out.bindColorTexture(obrSolidSpot, 2);
|
||||
fbo_out.bindColorTexture(obrTransparentOmni, 3);
|
||||
fbo_out.bindColorTexture(obrTransparentSpot, 4);
|
||||
fbo_out.setWriteBuffer(obrGeneral0);
|
||||
fbo_out.setWriteBuffer(obrLighting);
|
||||
renderQuad(prog, quad);
|
||||
}
|
||||
phase.end();
|
||||
|
||||
cur_write_plane = obrGeneral0;
|
||||
fbo_out.bind();
|
||||
cur_write_plane = obrLighting;
|
||||
|
||||
/// tonemapping
|
||||
phase.begin("tonemap");
|
||||
tone_proc.process();
|
||||
auto free = getFreePlanes(0);
|
||||
if (bindShader(srTonemapPass, &prog)) {
|
||||
fbo_out.bind();
|
||||
prog->setUniformValue("gamma", gamma_);
|
||||
prog->setUniformValue("frame_max", tone_proc.frameMax());
|
||||
// qDebug() << tone_proc.frameMax();
|
||||
fbo_out.bindColorTexture(prev_write_plane, 0);
|
||||
renderQuad(prog, quad);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user