setup cameras for the builtin deferred rendering

Co-Authored-By: leonardozimbres <3225893+leonardozimbres@users.noreply.github.com>
This commit is contained in:
BlackMATov
2023-02-11 02:12:48 +07:00
parent 3e24f79892
commit e8f5414de0

View File

@@ -231,6 +231,12 @@ namespace FTRuntime {
_controllers.Remove(controller);
}
void SetupCameras() {
foreach ( var camera in Camera.allCameras ) {
camera.clearStencilAfterLightingPass = true;
}
}
void GrabEnabledClips() {
var clips = FindObjectsOfType<SwfClip>();
for ( int i = 0, e = clips.Length; i < e; ++i ) {
@@ -294,6 +300,7 @@ namespace FTRuntime {
// ---------------------------------------------------------------------
void OnEnable() {
SetupCameras();
GrabEnabledClips();
GrabEnabledControllers();
}