public CustomRenderPipeline(SRenderPipelineParam _rpp) { m_rpp = _rpp; //将光照强度从gamma空间变换到线性空间 GraphicsSettings.lightsUseLinearIntensity = true; m_renderer = new CameraRenderer(_rpp); m_deferred_renderer = new DeferredCameraRenderer(_rpp); m_forwardAddSRP = new ForwardAddSRP(_rpp); }
private void CameraForm_Load(object sender, EventArgs e) { Width = _gm.CameraDevice.Width + 40; Height = _gm.CameraDevice.Height + 40; CameraPictureBox.Width = _gm.CameraDevice.Width; CameraPictureBox.Height = _gm.CameraDevice.Height; DecoderDevice = new CameraDecoderDevice("1号液位解码单元", _gm.CameraDevice, PixelFormat.Bgra32); Sence = new CameraSence("1号液位场景单元", CameraPictureBox, _gm.CameraDevice); Renderer = new CameraRenderer("1号液位显示单元", DecoderDevice, Sence); DecoderDevice.Start(); Renderer.Start(); }
public CustomRenderPipeline(CameraBufferSettings cameraBufferSettings, bool useDynamicBathcing, bool useGPUInstancing, bool useLightsPerObject, bool useSRPBatcher, ShadowSettings shadowSettings, PostFXSettings postFXSettings, int colorLUTResolution, Shader cameraRendererShader) { this.colorLUTResolution = colorLUTResolution; this.cameraBufferSettings = cameraBufferSettings; this.postFXSettings = postFXSettings; this.shadowSettings = shadowSettings; this.useDynamicBathcing = useDynamicBathcing; this.useGPUInstancing = useGPUInstancing; this.useLightsPerObject = useLightsPerObject; //开启SRP Batch 会优先使用 GraphicsSettings.useScriptableRenderPipelineBatching = useSRPBatcher; //是用Gamma颜色还是线性颜色 GraphicsSettings.lightsUseLinearIntensity = true; // InitializeForEditor(); renderer = new CameraRenderer(cameraRendererShader); }
public void Initialize() { SetInGameAA(false); var camera = gameObject.GetComponent <Camera>(); cameraPixelRect = camera.pixelRect; camera.enabled = false; var width = Screen.width * userSSAAFactor; var height = Screen.height * userSSAAFactor; rt = new RenderTexture((int)width, (int)height, 24, RenderTextureFormat.ARGBHalf, RenderTextureReadWrite.Linear); dummyGameObject = new GameObject(); var dummy = dummyGameObject.AddComponent <Camera>(); dummy.cullingMask = 0; dummy.depth = -3; dummy.tag = "MainCamera"; dummy.pixelRect = cameraPixelRect; cameraRenderer = dummyGameObject.AddComponent <CameraRenderer>(); cameraRenderer.fullResRT = rt; cameraRenderer.halfVerticalResRT = new RenderTexture(Screen.width, (int)height, 0); CameraRenderer.mainCamera = camera; CameraRenderer.mainCamera.targetTexture = null; CameraRenderer.mainCamera.pixelRect = cameraPixelRect; currentSSAAFactor = userSSAAFactor; initialized = true; SaveConfig(); }
void Init() { TargetPositionPathRender = new LineRender(); PositionPathRender = new LineRender(); CameraRenderer = new CameraRenderer(); }
public CustomRenderPipeline(SRenderPipelineParam _rpp) { //将光照强度从gamma空间变换到线性空间 GraphicsSettings.lightsUseLinearIntensity = true; m_renderer = new CameraRenderer(_rpp); }