예제 #1
0
 protected override void Render(ScriptableRenderContext _context, Camera[] _cameras)
 {
     foreach (var camera in _cameras)
     {
         m_renderer.Render(_context, camera);
     }
 }
예제 #2
0
    // Unity calls this method once per frame for each CameraType that is currently rendering
    protected override void Render(ScriptableRenderContext context, Camera[] cameras)
    {
        // Measure time between frames
        st.Stop();
        Settings.Instance.frameTime = st.ElapsedMilliseconds;
        st = new Stopwatch();
        st.Start();

        bAmbientOcclusion        = Settings.Instance.AO > 0;
        bDirectLighting          = Settings.Instance.directLightingOn;
        bIndirectLighting        = Settings.Instance.indirectLightingOn;
        bReprojection            = Settings.Instance.reprojectionOn;
        bVariance                = Settings.Instance.varianceOn;
        bFiltering               = Settings.Instance.filteringOn;
        bReprojectWithIDs        = Settings.Instance.reprojectWithIDs;
        bCombineAlbedoAndShadows = Settings.Instance.combineAlbedoAndShadows;
        bSoftShadowsOn           = Settings.Instance.softShadowsOn;

        // Execute Render function for each camera
        foreach (Camera camera in cameras)
        {
            renderer.Render(context, camera, _renderPipelineAsset.MotionVectorShader, _renderPipelineAsset.ReprojectionShader, _renderPipelineAsset.BlitShader,
                            _renderPipelineAsset.FilterShader, _renderPipelineAsset.VarianceShader, bAmbientOcclusion, bDirectLighting, bIndirectLighting, bReprojection,
                            bVariance, bFiltering, bReprojectWithIDs, bCombineAlbedoAndShadows, bSoftShadowsOn);
        }

        // Tell the Scriptable Render Context to tell the graphics API to perform the scheduled commands
        context.Submit();
    }
예제 #3
0
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     foreach (Camera camera in cameras)
     {
         renderer.Render(context, camera, useDynamicBatching, useGPUInstancing, useLightsPerObject, shadowSettings);
     }
 }
예제 #4
0
 protected override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
 {
     foreach (var camera in cameras)
     {
         cameraRenderer.Render(renderContext, camera, postFXSettings);
     }
 }
예제 #5
0
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     foreach (var camera in cameras)
     {
         renderer.Render(context, camera, shadowSettings);
     }
 }
예제 #6
0
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     foreach (Camera camera in cameras)
     {
         renderer.Render(context, camera, allowHDR, useDynamicBatching, useGPUInstancing, useLightsPerObject, shadowSettings, postFXSettings, colorLUTResolution);
     }
 }
예제 #7
0
    /*
     * public override void Dispose()
     * {
     *  base.Dispose();
     #if UNITY_EDITOR
     *  Lightmapping.ResetDelegate();
     #endif
     * }
     */

    protected override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
    {
        foreach (var camera in cameras)
        {
            renderer.Render(renderContext, camera, useDynamicBatching, useGPUInstancing, shadowSettings);
        }
    }
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     foreach (Camera camera in cameras)
     {
         renderer.Render(context, camera, useDynamicBatching, useGPUInstancing, shadowSettings, defaultShadowBrightness, brightnessMultiplier, shadowTreshold);
     }
 }
예제 #9
0
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     foreach (Camera camera in cameras)
     {
         renderer.Render(context, camera, useDynamicBatching, useGPUInstancing);
     }
 }
예제 #10
0
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     foreach (Camera camera in cameras)
     {
         cameraRenderer.Render(ref context, camera, useDynamicBatching, useGPUInstancing, shadowMapSize, shadowDistance, shadowCascades, shadowCascadesSplit);
     }
 }
예제 #11
0
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     for (int i = 0; i < cameras.Length; ++i)
     {
         camRenderer.Render(context, cameras[i]);
     }
 }
예제 #12
0
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     foreach (var camera in cameras)
     {
         _cameraRenderer.Render(context, camera, ref _renderingSetting, ref _batchingSetting, ref _shadowSetting, ref _postFXSetting);
     }
 }
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     foreach (Camera camera in cameras)
     {
         renderer.Render(context, camera);
     }
 }
 //구현해야 하는 메소드
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     //각 카메라를 다른 방식(top-view, forward view or forward render, diferred render)으로 사용할 수 있으나, 지금은 그냥 간단하게 유지
     foreach (Camera cam in cameras)
     {
         renderer.Render(context, cam);
     }
 }
예제 #15
0
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     //遍历场景所有摄像机进行渲染,前向渲染 缺陷每个摄像机的渲染方式相同,可以让每个摄像机使用不同的渲染方式
     foreach (Camera camera in cameras)
     {
         renderer.Render(context, camera, cameraBufferSettings, useDynamicBathcing, useGPUInstancing,
                         useLightsPerObject, shadowSettings, postFXSettings, colorLUTResolution);
     }
 }
 //Each frame Unity invokes Render on the RP instance
 protected override void Render(ScriptableRenderContext context, Camera[] cameras)
 {
     for (int i = 0; i < cameras.Length; i++)
     {
         var camera = cameras[i];
         cameraRenderer.Render(
             context, camera, useDynamicBatching, useGPUInstancing
             );
     }
 }
예제 #17
0
    void TakeScreenshot()
    {
        _isWritingScreenshot = true;

        var renderTexture = RenderTexture.GetTemporary(_screenshotResolution.Width, _screenshotResolution.Height, 24, RenderTextureFormat.Default);

        _cameraRenderer.Render(renderTexture);

        try {
            var screenshot = ScreenshotUtils.CopyFromRenderTexture(renderTexture, _screenshotTexture);
            WriteScreenshot(screenshot);
        } catch (Exception) {
            _isWritingScreenshot = false;
            throw;
        } finally {
            RenderTexture.ReleaseTemporary(renderTexture);
        }
    }
예제 #18
0
 protected override void Render(ScriptableRenderContext _context, Camera[] _cameras)
 {
     foreach (var camera in _cameras)
     {
         if (m_rpp.renderPath == RenderingPath.Forward)
         {
             if (m_rpp.enableForwardAdd)
             {
                 m_forwardAddSRP.Render(_context, camera);
             }
             else
             {
                 m_renderer.Render(_context, camera);
             }
         }
         else if (m_rpp.renderPath == RenderingPath.DeferredLighting)
         {
             m_deferred_renderer.Render(_context, camera);
         }
     }
 }
예제 #19
0
 void OnRenderImage(RenderTexture source, RenderTexture destination)
 {
     _cameraRenderer.Render(destination);
 }