Example #1
0
 static StackObject *AssignFromStack_outlineShader_2(ref object o, ILIntepreter __intp, StackObject *ptr_of_this_method, IList <object> __mStack)
 {
     ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
     UnityEngine.Shader @outlineShader = (UnityEngine.Shader) typeof(UnityEngine.Shader).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
     ((global::OutlinePostEffectCmdBuffer)o).outlineShader = @outlineShader;
     return(ptr_of_this_method);
 }
Example #2
0
        /** constructor
         */
        public MaterialList()
        {
            //material_list
            this.material_list = new MaterialItem[(int)MaterialType.Max];

            for (int ii = 0; ii < this.material_list.Length; ii++)
            {
                this.material_list[ii] = null;
                ShaderItem t_shaderitem;
                if (Config.SHADER_LIST.TryGetValue((MaterialType)ii, out t_shaderitem) == true)
                {
                    UnityEngine.Shader   t_shader   = UnityEngine.Shader.Find(t_shaderitem.shader_name);
                    UnityEngine.Material t_material = null;
                    if (t_shader != null)
                    {
                        t_material = new UnityEngine.Material(t_shader);
                    }
                    else
                    {
                        Tool.LogError("Fee_Render2D_MaterialList::Shader.Find", t_shaderitem.shader_name);
                    }
                    this.material_list[ii] = new MaterialItem(t_material, t_shaderitem.property_list);
                }
            }
        }
 public static bool AddNewShaderToCollection(UnityEngine.Shader shader, UnityEngine.ShaderVariantCollection collection)
 {
     if (__AddNewShaderToCollection_0_2 == null)
     {
         __AddNewShaderToCollection_0_2 = (Func <UnityEngine.Shader, UnityEngine.ShaderVariantCollection, bool>)Delegate.CreateDelegate(typeof(Func <UnityEngine.Shader, UnityEngine.ShaderVariantCollection, bool>), null, UnityTypes.UnityEditor_ShaderUtil.GetMethod("AddNewShaderToCollection", R.StaticMembers, null, new Type[] { typeof(UnityEngine.Shader), typeof(UnityEngine.ShaderVariantCollection) }, null));
     }
     return(__AddNewShaderToCollection_0_2(shader, collection));
 }
Example #4
0
 public override void ReadFrom(object obj)
 {
     base.ReadFrom(obj);
     if (obj == null)
     {
         return;
     }
     UnityEngine.Shader o = (UnityEngine.Shader)obj;
     maximumLOD = o.maximumLOD;
 }
Example #5
0
 public Material(UnityEngine.Shader shader)
 {
     //Mock Data:
     m_functionCallCounts = new Dictionary <string, int>();
     if (!m_functionCallCounts.ContainsKey("Void .ctor(Shader)"))
     {
         m_functionCallCounts.Add("Void .ctor(Shader)", 0);
     }
     m_functionCallCounts["Void .ctor(Shader)"]++;
 }
Example #6
0
        public void OnApplicationStart()
        {
            DisorganizationManager.sceneLoaded        += OnSceneLoaded;
            DisorganizationManager.activeSceneChanged += delegate(ExampleOfBadOrganization arg0, ExampleOfBadOrganization arg1) { new Thot().AddComponent <WhyUnityYouPieceOfCrap>(); };
            CollectionOfTrash noDontDoThisPlease = CollectionOfTrash.LoadFromStream(Spaghetti.GetExecutingAssembly().GetManifestResourceStream("FunTimesMod.HowItFeelsToDoAcid"));

            if (noDontDoThisPlease != null)
            {
                youllRegretThis = noDontDoThisPlease.LoadAsset <ShadyBoi>("PartyTimeBois");
            }
        }
Example #7
0
 public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects)
 {
     obj = base.WriteTo(obj, objects);
     if (obj == null)
     {
         return(null);
     }
     UnityEngine.Shader o = (UnityEngine.Shader)obj;
     o.maximumLOD = maximumLOD;
     return(o);
 }
Example #8
0
        static int _g_get_renderQueue(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.Shader __cl_gen_to_be_invoked = (UnityEngine.Shader)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, __cl_gen_to_be_invoked.renderQueue);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
Example #9
0
        static int _s_set_maximumLOD(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.Shader __cl_gen_to_be_invoked = (UnityEngine.Shader)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.maximumLOD = LuaAPI.xlua_tointeger(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Example #10
0
 public void SetReplacementShader(UnityEngine.Shader shader, System.String replacementTag)
 {
     //Mock Data:
     if (m_functionCallCounts == null)
     {
         m_functionCallCounts = new Dictionary <string, int>();
     }
     if (!m_functionCallCounts.ContainsKey("Void SetReplacementShader(UnityEngine.Shader, System.String)"))
     {
         m_functionCallCounts.Add("Void SetReplacementShader(UnityEngine.Shader, System.String)", 0);
     }
     m_functionCallCounts["Void SetReplacementShader(UnityEngine.Shader, System.String)"]++;
 }
Example #11
0
        public UnityShader(UnityEngine.Shader shader)
        {
            propertyCache = new Dictionary <string, int>();

            if (shader != null)
            {
                this.shader   = shader;
                usingFallback = false;
            }
            else
            {
                this.shader   = UnityEngine.Shader.Find("Sprites/Default");
                usingFallback = true;
            }
        }
        /** [シングルトン]constructor
         */
        private PerformanceCounter()
        {
            //マテリアル。
            UnityEngine.Shader t_shader = UnityEngine.Shader.Find(Config.SHADER_NAME_PERFORMANCECOUNTER);
            if (t_shader != null)
            {
                this.material = new UnityEngine.Material(t_shader);
            }
            else
            {
                Tool.Assert(false);
            }

            //フレームデータ。
            this.framedata = new FrameData();

            //フレーム終了待ち。
            this.wait_for_endframe = new UnityEngine.WaitForEndOfFrame();

            //delete_request
            this.delete_request = false;

            //カメラ。
            {
                //最初。
                this.camera_first_gameobject = new UnityEngine.GameObject("camera_first");
                UnityEngine.GameObject.DontDestroyOnLoad(this.camera_first_gameobject);
                UnityEngine.Camera         t_camera_first_camera        = this.camera_first_gameobject.AddComponent <UnityEngine.Camera>();
                Camera_First_MonoBehaviour t_camera_first_monobehaviour = this.camera_first_gameobject.AddComponent <Camera_First_MonoBehaviour>();
                t_camera_first_camera.Reset();
                t_camera_first_camera.cullingMask = 0;
                t_camera_first_camera.clearFlags  = UnityEngine.CameraClearFlags.Nothing;
                t_camera_first_camera.depth       = Config.CAMERADEPTH_FIRST;

                //最後。
                this.camera_last_gameobject = new UnityEngine.GameObject("camera_last");
                UnityEngine.GameObject.DontDestroyOnLoad(this.camera_last_gameobject);
                UnityEngine.Camera t_camera_last_camera = this.camera_last_gameobject.AddComponent <UnityEngine.Camera>();
                this.camera_last_gameobject.AddComponent <Camera_Last_MonoBehaviour>();
                t_camera_last_camera.Reset();
                t_camera_last_camera.cullingMask = 0;
                t_camera_last_camera.clearFlags  = UnityEngine.CameraClearFlags.Nothing;
                t_camera_last_camera.depth       = Config.CAMERADEPTH_LAST;

                //StartCoroutine
                t_camera_first_monobehaviour.StartCoroutine(this.Unity_Start());
            }
        }
Example #13
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    UnityEngine.Shader __cl_gen_ret = new UnityEngine.Shader();
                    translator.Push(L, __cl_gen_ret);
                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Shader constructor!"));
        }
Example #14
0
        public UnityShader(UnityEngine.Shader shader)
        {
            propertyCache = new Dictionary <string, int>();

            if (shader != null)
            {
                this.shader   = shader;
                usingFallback = false;
            }
            else
            {
                this.shader   = UnityEngine.Shader.Find("Sprites/Default");
                usingFallback = true;
            }

            this.shader.hideFlags = UnityEngine.HideFlags.HideAndDontSave ^ UnityEngine.HideFlags.DontSaveInBuild;
        }
        static StackObject *SetCustomShader_4(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Shader shader = (UnityEngine.Shader) typeof(UnityEngine.Shader).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Rendering.BuiltinShaderType type = (UnityEngine.Rendering.BuiltinShaderType) typeof(UnityEngine.Rendering.BuiltinShaderType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            UnityEngine.Rendering.GraphicsSettings.SetCustomShader(type, shader);

            return(__ret);
        }
Example #16
0
        static StackObject *set_shader_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Shader @value = (UnityEngine.Shader) typeof(UnityEngine.Shader).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Material instance_of_this_method = (UnityEngine.Material) typeof(UnityEngine.Material).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.shader = value;

            return(__ret);
        }
Example #17
0
        /** ミラー。作成。
         */
        public MirrorObject_MonoBehaviour CreateMirror(Fee.Mirror.RenderTextureSizeType a_size_type, UnityEngine.GameObject a_mirror_object, UnityEngine.Camera a_look_camera, string a_name)
        {
            if (a_mirror_object != null)
            {
                MirrorCamera_MonoBehaviour t_mirror_camera = MirrorCamera_MonoBehaviour.Create(a_size_type, a_name);

                //ミラーマテリアル。設定。
                UnityEngine.Renderer t_renderer = a_mirror_object.GetComponent <UnityEngine.Renderer>();
                if (t_renderer != null)
                {
                    UnityEngine.Shader t_shader = UnityEngine.Shader.Find(Config.SHADER_NAME_MIRROR);
                    if (t_shader != null)
                    {
                        t_renderer.material = new UnityEngine.Material(t_shader);
                        t_renderer.material.SetTexture("texture_mirror", t_mirror_camera.GetRenderTexture());
                    }
                    else
                    {
                        Tool.Assert(false);
                    }
                }
                else
                {
                    Tool.Assert(false);
                }

                //ミラーオブジェクト。設定。
                MirrorObject_MonoBehaviour t_mirror_object = a_mirror_object.AddComponent <MirrorObject_MonoBehaviour>();
                {
                    t_mirror_object.mirror_camera  = t_mirror_camera;
                    t_mirror_object.look_camera    = a_look_camera;
                    t_mirror_object.look_transform = a_look_camera.GetComponent <UnityEngine.Transform>();
                    t_mirror_object.enabled        = false;
                }

                return(t_mirror_object);
            }
            else
            {
                Tool.Assert(false);
            }

            return(null);
        }
Example #18
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <UnityEngine.Shader>(L, 2))
                {
                    UnityEngine.Shader _shader = (UnityEngine.Shader)translator.GetObject(L, 2, typeof(UnityEngine.Shader));

                    FairyGUI.NMaterial gen_ret = new FairyGUI.NMaterial(_shader);
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to FairyGUI.NMaterial constructor!"));
        }
Example #19
0
        static int _m_Find_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    string name = LuaAPI.lua_tostring(L, 1);

                    UnityEngine.Shader __cl_gen_ret = UnityEngine.Shader.Find(name);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_GetShader_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    string _name = LuaAPI.lua_tostring(L, 1);

                    UnityEngine.Shader gen_ret = FairyGUI.ShaderConfig.GetShader(_name);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Example #21
0
        static int _m_GetCustomShader_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    UnityEngine.Rendering.BuiltinShaderType type; translator.Get(L, 1, out type);

                    UnityEngine.Shader __cl_gen_ret = UnityEngine.Rendering.GraphicsSettings.GetCustomShader(type);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Example #22
0
        public UnityEngine.Shader __Gen_Delegate_Imp5(string p0)
        {
#if THREAD_SAFE || HOTFIX_ENABLE
            lock (luaEnv.luaEnvLock)
            {
#endif
            RealStatePtr L = luaEnv.rawL;
            int errFunc    = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference);
            ObjectTranslator translator = luaEnv.translator;
            LuaAPI.lua_pushstring(L, p0);

            PCall(L, 1, 1, errFunc);


            UnityEngine.Shader __gen_ret = (UnityEngine.Shader)translator.GetObject(L, errFunc + 1, typeof(UnityEngine.Shader));
            LuaAPI.lua_settop(L, errFunc - 1);
            return(__gen_ret);

#if THREAD_SAFE || HOTFIX_ENABLE
        }
#endif
        }
Example #23
0
        static StackObject *SetReplacementShader_13(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.String @replacementTag = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Shader @shader = (UnityEngine.Shader) typeof(UnityEngine.Shader).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.Camera instance_of_this_method = (UnityEngine.Camera) typeof(UnityEngine.Camera).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SetReplacementShader(@shader, @replacementTag);

            return(__ret);
        }
        static StackObject *Add_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Shader @value = (UnityEngine.Shader) typeof(UnityEngine.Shader).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.String @key = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            System.Collections.Generic.Dictionary <System.String, UnityEngine.Shader> instance_of_this_method = (System.Collections.Generic.Dictionary <System.String, UnityEngine.Shader>) typeof(System.Collections.Generic.Dictionary <System.String, UnityEngine.Shader>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Add(@key, @value);

            return(__ret);
        }
Example #25
0
 public abstract bool IsSuitable(int playerId, MovieInfo movieInfo, bool additive, UnityEngine.Shader userShader);
Example #26
0
 public abstract RendererResource CreateRendererResource(int playerId, MovieInfo movieInfo, bool additive, UnityEngine.Shader userShader);
Example #27
0
        static public RendererResource DispatchAndCreate(int playerId, MovieInfo movieInfo, bool additive, UnityEngine.Shader userShader)
        {
            RendererResource rendererResource = null;

            foreach (var factoryWithPriority in factoryList)
            {
                rendererResource = factoryWithPriority.Value.CreateRendererResource(playerId, movieInfo, additive, userShader);
                if (rendererResource != null)
                {
                    return(rendererResource);
                }
            }

            UnityEngine.Debug.LogError("[CRIWARE] unsupported movie.");
            return(null);
        }
Example #28
0
 public Shader(string name, UnityEngine.Shader unityShader)
 {
     this.name        = name;
     this.unityShader = unityShader;
 }
Example #29
0
 public static System.Boolean ImportShader(UnityEngine.Shader shader, System.String contents)
 {
     throw new NotImplementedException("This function was automatically generated by Mockery and has no real implementation yet.");
 }
Example #30
0
 /// <summary>
 /// Creates a new BasicEffect with the specified shader.
 /// </summary>
 public BasicEffect(GraphicsDevice device, string shaderName) : base(device)
 {
     shader   = UnityEngine.Shader.Find(shaderName);
     material = new UnityEngine.Material(shader);
 }