public void Initialize() { instance = this; // Lighting Materials additiveMaterial = new Material(Shader.Find(Max2D.shaderPath + "Particles/Additive")); penumbraMaterial = new Material(Shader.Find(Max2D.shaderPath + "Particles/Multiply")); penumbraMaterial.mainTexture = Resources.Load("textures/penumbra") as Texture; occlusionEdgeMaterial = new Material(Shader.Find(Max2D.shaderPath + "Particles/Multiply")); occlusionEdgeMaterial.mainTexture = Resources.Load("textures/occlusionedge") as Texture; shadowBlurMaterial = new Material(Shader.Find(Max2D.shaderPath + "Particles/Multiply")); shadowBlurMaterial.mainTexture = Resources.Load("textures/shadowblur") as Texture; occlusionBlurMaterial = new Material(Shader.Find(Max2D.shaderPath + "Particles/Multiply")); occlusionBlurMaterial.mainTexture = Resources.Load("textures/occlussionblur") as Texture; whiteSpriteMaterial = new Material(Shader.Find("SmartLighting2D/SpriteWhite")); blackSpriteMaterial = new Material(Shader.Find("SmartLighting2D/SpriteBlack")); transform.position = Vector3.zero; mainBuffer = LightingMainBuffer2D.Get(); fboManager = FBOManager.Get(); version = VERSION; }
public void Initialize() { instance = this; transform.position = Vector3.zero; mainBuffer = LightingMainBuffer2D.Get(); fboManager = FBOManager.Get(); spriteAtlas = SpriteAtlasManager.Get(); meshRendererManager = MeshRendererManager.Get(); version = VERSION; }