This is caused by inconsistent backface culling between the various render passes that comprise SAO.
Backfaces are culled for SAO depth, normal and blend render passes, but are enabled selectively for objects in the normal draw pass.
The screenshot below shows the issue, where our viewpoint is inside a wall, looking out. The SAO shadows for objects on the other side of the wall are rendered on the interior surface of the wall.
Solution
Solution is to make backface culling consistent between the various renderers involved in SAO.
At the same time, we'll make backfaces invisible by default on PerformanceModel, since that's desirable for performance anyway.
We'll be able to make backfaces visible on PerformanceModels if needed, however, eg.
const model = xktLoader.load({
id: "myModel",
src: "./models/xkt/duplex/duplex.xkt",
backfaces: true // <<---- Show backfaces on this model
});
Description
This is caused by inconsistent backface culling between the various render passes that comprise SAO.
Backfaces are culled for SAO depth, normal and blend render passes, but are enabled selectively for objects in the normal draw pass.
The screenshot below shows the issue, where our viewpoint is inside a wall, looking out. The SAO shadows for objects on the other side of the wall are rendered on the interior surface of the wall.
Solution
Solution is to make backface culling consistent between the various renderers involved in SAO.
At the same time, we'll make backfaces invisible by default on
PerformanceModel
, since that's desirable for performance anyway.We'll be able to make backfaces visible on
PerformanceModel
s if needed, however, eg.