Open DDR0 opened 2 years ago
And now, coming at it from the other end, we have Frogatto's maximal-clip-area-bug branch. It seems that tweaking the liquid shader's end_zorder is enough to fix or break clip_area.
identity_op
works too.
In level.cpp, commenting out shaders.emplace_back(e.shader);
in frameBufferEnterZorder()
stops the "fix" from working.
I think shaders are setting something elsewhere, as as far as I can tell the critical path for them is shader->setUniformValue(shader->getPVUniform(), glm::value_ptr(pvmat));
in DeviceOGL.cpp's DisplayDeviceOpenGL::render
.
I have applied a general hack around this for Frogatto. Search for the _add_shader_fix_for_clip_area_to_fix_anura_issue_340 in the FFL there.
To reproduce: Check out Frogatto's minimal-clip-area-bug branch. Run
./anura --level=test.cfg
.The coin on screen should turn invisible, but instead of just darkens as a result of the
set(brightness, 128)
call right before theset(clip_area, ...)
call.Notes: