+1
Under review

SF automatically puts checkmark in write to Z Buffer option

behealed fa 8 anys updated by Dave Levy fa 8 anys 9

This... feature... has been going on for a long time, at least a year. Ever since I've had SF anyway. Seen it happen hundreds of times. On shaders that are set to Opaque & Geometry Queue, if you close SF and reopen the shader in SF, about 10% of the time, you'll see it put a checkmark in the "Write to Z buffer" option, even though you had it unchecked when you closed SF. Seems like SF figures you must have forgotten to check it. Of course, you can uncheck it, but it'll just put the checkmark back.. eventually. To this day I still haven't figured out exactly what triggers it to put the checkmark back. If you intentionally shut down SF and reopen it just to "see it happen", almost certainly it won't. It only does it when you least expect it... like when you make a shader for a client, and he or she opens it... definitely it'll do it then. For sure. And since, doubtless, it's a post-processing shader that MUST NEVER write to the Z buffer, an outry from that client is definitely incoming.


Of course you can simply set the shader to Transparent, and then it'll never put the checkmark there. But sometimes, I don't wanna do that. Anyhoo, I know I'm just talking to myself here. It's not like anyone else is bothered by this. Only me.

Under review

Have you managed to find a repro case?

Okay so I ran a test.


Looked through all my shaders to see if any of them were "doing it", and found one that was. Only, it *was* set to both geometry order and opaque mode... but get this... it was turning the checkmark OFF every time, rather than turning it on.


Anyway and I of course closed and reopened it several times, and I kept turning it on, and each time I'd open it, it would be turned off again.


So after 3 times of testing it, I tried turning not only it on, but also turned on the checkbox above it "ignore projectors". So then, both were on. And I closed the shader, and reopened it... and bingo, both stayed on. It didn't turn off the Z order checkbox anymore.


So then, I unchecked both, and opened it, and that worked too... both were off.


So then, I checked the Z order box, but not the "ignore projectors" box, and closed the shader, and reopened it, and wala, it worked... the Z order was checked, and the "ignore projectors" was unchecked.


So it was bugged at first, but then i seem to have "snapped it out of it" by checking the "ignore projectors" box, and now that it's been snapped out of it, it is working.


But sorry, this only explains how to snap it out of it, and doesn't explain how to get it broken in the first place. I've snapped LOTS of shaders out of this particular glitch... but I've never pinpointed what gets the glitch started. Sorry. Only thing I can say is, it's only the Z order checkbox that does it, as far as I am aware anyway.

Well, except for the checkboxes where you can select other platforms for the shader to work on. Those checkboxes NEVER save. :)

Hey guys.

So any news about this issue?

It's driving us up the walls :) We're working on a big project with ten or hundreds of shaders, often opening a shader just to copy a structure or two to a new one, and the Depth Buffer just turns on or off seemingly at random.

It's very difficult to find all these shaders later.

Well, just like you, I'm struggling to find how this can happen! On the code side, the depth buffer seems to only be modified whenever auto sort is ticked, otherwise it shouldn't happen. I've tried several cases now, and yet it all works fine on my end :(
Let me know if you can find a repro case

:\

Well, I was going to send you the recent shader that's been consistently turning it's z writing off when I open it, but apparently it's acting properly come judgement day.

I'll try to catch the next one and send it.

I'm starting to suspect I've written some sort of quantum serialization

So you're saying I shouldn't simply not look at the checkbox and leave it superimposed?

Wouldn't reading from the z buffer collapse the wave function as well? :P

Any news on this?

It's driving all of us nuts :)