static ShadowUtils()
 {
     m_ShadowmapFormat = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.Shadowmap)
         ? RenderTextureFormat.Shadowmap
         : RenderTextureFormat.Depth;
     m_ForceShadowPointSampling = SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal &&
                                  GraphicsSettings.HasShaderDefine(Graphics.activeTier, BuiltinShaderDefine.UNITY_METAL_SHADOWS_USE_POINT_FILTERING);
 }
Example #2
0
    public static int HasShaderDefine_s(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 1)
            {
                BuiltinShaderDefine defineHash;
                LuaObject.checkEnum <BuiltinShaderDefine>(l, 1, out defineHash);
                bool b = GraphicsSettings.HasShaderDefine(defineHash);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, b);
                result = 2;
            }
            else if (num == 2)
            {
                GraphicsTier tier;
                LuaObject.checkEnum <GraphicsTier>(l, 1, out tier);
                BuiltinShaderDefine defineHash2;
                LuaObject.checkEnum <BuiltinShaderDefine>(l, 2, out defineHash2);
                bool b2 = GraphicsSettings.HasShaderDefine(tier, defineHash2);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, b2);
                result = 2;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function HasShaderDefine to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #3
0
 static ShadowUtils()
 {
     m_ForceShadowPointSampling = SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal &&
                                  GraphicsSettings.HasShaderDefine(Graphics.activeTier, BuiltinShaderDefine.UNITY_METAL_SHADOWS_USE_POINT_FILTERING);
 }