Version: 2019.3
public static bool invertCulling ;

説明

バックフェースかリングを反転させるかどうかを選択する

このフラグはすべてのレンダリングされたオブジェクトのカリングモードを "反転" することができます。主要な仕様例。鏡や水などの反射のレンダリング。反射をレンダリングするために仮想カメラが鏡像なのでカリングの順序を反転する必要があります。エフェクトの標準的なパッケージの Water スクリプトがどのように実行するか確認することができます。

// When attached to the camera, this script
// will make all rendering be flipped "inside out",
// i.e. back faces of objects will be rendered instead
// of front faces.
using UnityEngine;

[ExecuteInEditMode] public class ExampleScript : MonoBehaviour { private bool oldCulling; public void OnPreRender() { oldCulling = GL.invertCulling; GL.invertCulling = true; }

public void OnPostRender() { GL.invertCulling = oldCulling; } }