refactor shaders
This commit is contained in:
@@ -71,7 +71,7 @@ void Skybox::drawBackground(
|
||||
backShader->uniformMatrix("u_view", camera.getView(false));
|
||||
backShader->uniform1f("u_zoom", camera.zoom*camera.getFov()/(M_PI*0.5f));
|
||||
backShader->uniform1f("u_ar", float(width)/float(height));
|
||||
backShader->uniform1i("u_cubemap", 1);
|
||||
backShader->uniform1i("u_skybox", 1);
|
||||
bind();
|
||||
mesh->draw();
|
||||
unbind();
|
||||
|
||||
@@ -132,7 +132,7 @@ void WorldRenderer::setupWorldShader(
|
||||
shader.uniform1f("u_dayTime", level.getWorld()->getInfo().daytime);
|
||||
shader.uniform2f("u_lightDir", skybox->getLightDir());
|
||||
shader.uniform3f("u_cameraPos", camera.position);
|
||||
shader.uniform1i("u_cubemap", 1);
|
||||
shader.uniform1i("u_skybox", 1);
|
||||
shader.uniform1i("u_enableShadows", gbufferPipeline);
|
||||
|
||||
if (gbufferPipeline) {
|
||||
|
||||
Reference in New Issue
Block a user