Currently, there’s a special code path for PCF that:
- disable writing to the color buffer (
engine.setColorWrite(false);
) - does not clear the color buffer (
engine.clear(clearOne, false, true, false);
=> it’s the firstfalse
that does not clear the color buffer)
PCSS is different, it does not disable writing to the color buffer and does clear the color buffer.
However, as I understand it, PCSS algorithm does not use the color buffer either, so using the same code path than PCF should work: I tested it, and it seems to work.
Did I miss something or we can also optimize the PCSS case like the PCF one?
If yes, I can submit a PR for that.