mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2025-12-14 12:11:45 +07:00
setup cameras for the builtin deferred rendering
Co-Authored-By: leonardozimbres <3225893+leonardozimbres@users.noreply.github.com>
This commit is contained in:
@@ -231,6 +231,12 @@ namespace FTRuntime {
|
|||||||
_controllers.Remove(controller);
|
_controllers.Remove(controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetupCameras() {
|
||||||
|
foreach ( var camera in Camera.allCameras ) {
|
||||||
|
camera.clearStencilAfterLightingPass = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GrabEnabledClips() {
|
void GrabEnabledClips() {
|
||||||
var clips = FindObjectsOfType<SwfClip>();
|
var clips = FindObjectsOfType<SwfClip>();
|
||||||
for ( int i = 0, e = clips.Length; i < e; ++i ) {
|
for ( int i = 0, e = clips.Length; i < e; ++i ) {
|
||||||
@@ -294,6 +300,7 @@ namespace FTRuntime {
|
|||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
|
||||||
void OnEnable() {
|
void OnEnable() {
|
||||||
|
SetupCameras();
|
||||||
GrabEnabledClips();
|
GrabEnabledClips();
|
||||||
GrabEnabledControllers();
|
GrabEnabledControllers();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user