void Awake() { camera = CoreEngine.gEngine.MainCamera; width = camera.Width; height = camera.Height; renderBuffer = new RenderBuffer(camera, 4, false); renderBufferId = renderBuffer.RenderBufferDraw; renderTex = renderBuffer.RenderTexture; imageBitmap = new Bitmap(width, height); form = new DynamicForm(); form.LeftMouseDown += LeftMouseDown; form.LeftMouseUp += LeftMouseUp; //postprocessing testing ppSh = new PostProcessing(camera); ShaderManager shdrm = ShaderManager.GetInstance; shdrm.LoadShader("FormPP"); shaderPP = shdrm.GetShader("FormPP"); shaderPP.ApplyShader(); shaderPP.SetUniform(0, "texture_diffuse"); //shaderPP.SetUniform(new Vector3(0.01f,0.005f,-0.01f), "colorOffset"); //aberation = (ShaderUniformVector3)shaderPP.GetUniforms[0]; //pixelAberation /= width; }
void Awake() { ImageStream = new MemoryStream(); camera = CoreEngine.gEngine.MainCamera; width = camera.Width; height = camera.Height; renderBuffer = new RenderBuffer(camera, 4, false); renderBufferId = renderBuffer.RenderBufferDraw; renderTex = renderBuffer.RenderTexture; imageBitmap = new Bitmap(width, height); //postprocessing testing ppSh = new PostProcessing(camera); ShaderManager shdrm = ShaderManager.GetInstance; shdrm.LoadShader("FormPP"); shaderPP = shdrm.GetShader("FormPP"); shaderPP.ApplyShader(); shaderPP.SetUniform(0, "texture_diffuse"); }