Update StarClientApplication.cpp
This commit is contained in:
parent
8937f0d816
commit
b0d3c88834
@ -400,6 +400,17 @@ void ClientApplication::render() {
|
||||
});
|
||||
LogMap::set("client_render_world_painter", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - paintStart));
|
||||
LogMap::set("client_render_world_total", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - totalStart));
|
||||
|
||||
auto size = Vec2F(renderer->screenSize());
|
||||
auto quad = renderFlatRect(RectF::withSize(size/-2, size), Vec4B(0.0f,0.0f,0.0f,0.0f), 0.0f);
|
||||
for (auto& layer : m_postProcessLayers) {
|
||||
for(unsigned i = 0; i < layer.passes; i++) {
|
||||
for (auto& effect : layer.effects) {
|
||||
renderer->switchEffectConfig(effect);
|
||||
renderer->render(quad);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
renderer->switchEffectConfig("interface");
|
||||
auto start = Time::monotonicMicroseconds();
|
||||
@ -451,6 +462,18 @@ void ClientApplication::renderReload() {
|
||||
renderer->loadConfig(assets->json("/rendering/opengl.config"));
|
||||
|
||||
loadEffectConfig("world");
|
||||
|
||||
m_postProcessLayers.clear();
|
||||
auto postProcessLayers = assets->json("/client.config:postProcessLayers").toArray();
|
||||
for (auto& layer : postProcessLayers) {
|
||||
List<String> effects;
|
||||
for (auto& effect : layer.getArray("effects")) {
|
||||
auto effectStr = effect.toString();
|
||||
loadEffectConfig(effectStr);
|
||||
effects.append(effectStr);
|
||||
}
|
||||
m_postProcessLayers.append(PostProcessLayer{effects,layer.getUInt("passes",1)});
|
||||
}
|
||||
loadEffectConfig("interface");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user