Merge branch 'MihailRis:main' into main
This commit is contained in:
commit
979d448fd8
@ -86,7 +86,7 @@ void Skybox::refresh(float t, float mie, uint quality) {
|
||||
|
||||
shader->uniform1i("u_quality", quality);
|
||||
shader->uniform1f("u_mie", mie);
|
||||
shader->uniform3f("u_lightDir", glm::normalize(vec3(sin(t), -cos(t), 0.7f)));
|
||||
shader->uniform3f("u_lightDir", glm::normalize(vec3(sin(t), -cos(t), -0.7f)));
|
||||
for (uint face = 0; face < 6; face++) {
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, cubemap, 0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
@ -178,7 +178,9 @@ void Window::pushScissor(vec4 area) {
|
||||
if (area.z < 0.0f || area.w < 0.0f) {
|
||||
glScissor(0, 0, 0, 0);
|
||||
} else {
|
||||
glScissor(area.x, Window::height-area.w, area.z-area.x, area.w-area.y);
|
||||
glScissor(area.x, Window::height-area.w,
|
||||
std::max(0, int(area.z-area.x)),
|
||||
std::max(0, int(area.w-area.y)));
|
||||
}
|
||||
scissorArea = area;
|
||||
}
|
||||
@ -193,7 +195,9 @@ void Window::popScissor() {
|
||||
if (area.z < 0.0f || area.w < 0.0f) {
|
||||
glScissor(0, 0, 0, 0);
|
||||
} else {
|
||||
glScissor(area.x, Window::height-area.w, area.z-area.x, area.w-area.y);
|
||||
glScissor(area.x, Window::height-area.w,
|
||||
std::max(0, int(area.z-area.x)),
|
||||
std::max(0, int(area.w-area.y)));
|
||||
}
|
||||
if (scissorStack.empty()) {
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user