This does remove the acne, but the problem is it introduces a new issue. There are artefacts that pop up at certain points in the texture of the model. Barring the use of a custom shader, is there a way to fix shadow acne without incurring these artefacts?
In that case, it might help to see your light/shadow-related code: it may be that there’s something that in there that’s producing such persistent shadow-acne.
You shouldn’t set the depth offset on everything. Set it only on the light initial state. Do it similar to the setDepthWrite code you’ve shown in the earlier comment, except with setDepthOffset.
Without seeing these artefacts, I am somewhat guessing here, but my guess is that they’re not actually “texture” artefacts, as such. Rather, I would guess that you’re seeing depth-fighting, in which two or more surfaces are rendered at very similar depths. This causes one surface to render “in front” in some pixels and the other surface to render “in front” in other pixels, and which is rendered where to change as the view shifts.
But yes, as rdb says, setting a depth-offset on the entire scene is likely not an ideal solution. Hence my focussing on the shadow issue: I’d rather that be solved in a way that doesn’t then cause further problems.
Well, scouring the forum showed that what was being recommended to fix shadow acne was the command in my original post. I should say, that this is a rather obscure way of fixing the issue and since shadow acne is so common, it’d be nice if the manual were updated to reflect this solution.
Thank you so much to the both of you, but now, who should I credit with solving this? You both contributed to solving it…
EDIT:
This is the marked solution, but with full credit to @Thaumaturge and @rdb for solving it.
I would say to mark your own most-recent post just above as the solution–after all, it is the one that demonstrates the fix, and thus seems likely to be the most useful to other devs who may come after.