zoukankan      html  css  js  c++  java
  • Camera & Render

    1、void Render();

    Description

      Render the camera manually. 

    This will render the camera. It will use the camera's clear flags, target texture and all other settings.

     

     

     

      The camera will send OnPreCullOnPreRender & OnPostRender to any scripts attached, and render any eventual image filters.

      This is used for taking precise control of render order. To make use of this feature, create a camera and disable it. Then call Render on it.

     

      You are not able to call the Render function from a camera that is currently rendering. If you wish to do this create a copy of the camera, and make it match the original one using CopyFrom.

    2、void CopyFrom(Camera other);

    Description

      Makes this camera's settings match other camera.

      This will copy all camera's variables (field of view, clear flags, culling mask, ...) from the other camera. It will also set this camera's transform to match the other camera, as well as this camera's layer to match the layer of the other camera.
      
    3、static Camera main;
    Description

      The first enabled camera tagged "MainCamera" (Read Only).

      Returns null if there is no such camera in the scene.
      This can be useful if you want one camera to match the other camera's setup, when doing custom rendering effects. For example when usingRenderWithShader.
     
    4、void RenderWithShader(Shader shader, string replacementTag);
    Description

      Render the camera with shader replacement.

      This will render the camera. It will use the camera's clear flags, target texture and all other settings.

      The camera will not send OnPreCullOnPreRender or OnPostRender to attached scripts. Image filters will not be rendered either.

      This is used for special effects, e.g. rendering screenspace normal buffer of the whole scene, heat vision and so on. To make use of this feature, usually you create a camera and disable it. Then call RenderWithShader on it.

       

    You are not able to call the Render function from a camera that is currently rendering. If you wish to do this create a copy of the camera, and make it match the original one using CopyFrom.
     
    5、ResetReplacementShader(): void;
    Description

      Remove shader replacement from camera.

      Call this to end the effect of setting SetReplacementShader.
     
    6、SetReplacementShader(shader: ShaderreplacementTag: string): void;
    Description

      Make the camera render with shader replacement.

      After calling this function, camera will render its view with shader replacement. Call ResetReplacementShader to reset it back to normal rendering.

  • 相关阅读:
    管理博文 Web开发教程:Kendo UI for jQuery数据管理——列模板
    WPF界面开发新纪元——Diagram/Gantt控件升级
    Winform界面开发:WinForms应用程序中的MDI、SDI和MFI接口类型
    依赖注入[2]: 基于IoC的设计模式
    依赖注入[1]: 控制反转
    OAuth2.0的理解&基础
    开放平台鉴权以及OAuth2.0介绍
    OAuth2.0 知多少
    理解OAuth 2.0
    微服务架构介绍及开源框架
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3871312.html
Copyright © 2011-2022 走看看