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(Cameraother);

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(Shadershader, 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: Shader, replacementTag: 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.

Camera & Render的更多相关文章

  1. camera render texture 游戏里的监控视角

    Camera里: 新建render texture并拖入到target texture里 新建材质球 拖入render texture      camera里的视角会在材质球上出现  新建一个pla ...

  2. 获取camera截屏图片

    Camera camera; SpriteRenderer sprRender; Texture2D t2d = New Texture2D(1300, 760, TextureFormat.RGB2 ...

  3. HTML5 学习总结(四)——canvas绘图、WebGL、SVG

    一.Canvas canvas是HTML5中新增一个HTML5标签与操作canvas的javascript API,它可以实现在网页中完成动态的2D与3D图像技术.<canvas> 标记和 ...

  4. Unity性能优化(2)-官方教程Diagnosing performance problems using the Profiler window翻译

    本文是Unity官方教程,性能优化系列的第二篇<Diagnosing performance problems using the Profiler window>的简单翻译. 相关文章: ...

  5. WebGL与three.js

    前面学习了一些webgl的基础知识,现在就用一下three.js写一个小例子,记录一下学习的过程. 效果图: 1.去github下载three.js,然后将它加载到网页中 <script src ...

  6. canvas绘图、WebGL、SVG

    目录 一.Canvas 1.1.创建canvas元素 1.2.画线 1.3.绘制矩形 1.4.绘制圆弧 1.5.绘制图像 1.6.绘制文字 1.7.随机颜色与简单动画 二.WebGL 2.1.HTML ...

  7. HTML5 学习笔记(四)——canvas绘图、WebGL、SVG

    一.Canvas canvas是HTML5中新增一个HTML5标签与操作canvas的javascript API,它可以实现在网页中完成动态的2D与3D图像技术.<canvas> 标记和 ...

  8. Unity3D NGUI动态生成模糊背景图

    先上效果. 制作原理:模糊的部分是用UITexture,前面是一个UISprite.用主摄像机渲染出一张纹理,把这张纹理模糊处理,把这张纹理赋值给UITexture. 脚本代码 using Unity ...

  9. three.js初涉略(一)

    <!-- 最近要研究一下webgl,发现了webgl中文网(http://www.hewebgl.com/article/articledir/1).边研究教程边做下记录 --> thre ...

随机推荐

  1. 【spring源码学习】spring配置的事务方式是REQUIRED,但业务层抛出TransactionRequiredException异常问题

    (1)spring抛出异常的点:org.springframework.orm.jpa.EntityManagerFactoryUtils public static DataAccessExcept ...

  2. BZOJ5369 [Pkusc2018]最大前缀和

    题意 小C是一个算法竞赛爱好者,有一天小C遇到了一个非常难的问题:求一个序列的最大子段和. 但是小C并不会做这个题,于是小C决定把序列随机打乱,然后取序列的最大前缀和作为答案. 小C是一个非常有自知之 ...

  3. Netflix OSS 和 SpringCloud Netflix简介

    Netflix OSS Netflix是一家互联网流媒体播放商,是美国视频巨头,随着Netflix转型为一家云计算公司,它也开始积极参与开源项目. Netflix OSS(Open Source)就是 ...

  4. uuid 了解

    什么是UUID? UUID是Universally Unique Identifier的缩写,它是在一定的范围内(从特定的名字空间到全球)唯一的机器生成的标识符.UUID具有以下涵义: 经由一定的算法 ...

  5. Android源代码分析之拍照、图片、录音、视频和音频功能

    Android源代码分析之拍照.图片.录音.视频和音频功能   //选择图片 requestCode 返回的标识 Intent innerIntent = new Intent(Intent.ACTI ...

  6. dwr的A request has been denied as a potential CSRF attack.错误

    虽然DWR是个很早就出现的Ajax框架,但一直都没去使用过,今天正好没事就看了一下并参照文档照做了个demo, 在其中碰到一个问题: 后台打印出错误信息:“严重: A request has been ...

  7. js动态的属性名如何取该属性的值

    var cls={cn1:"nihao",cn2="made",cn3="shuide"};var index=2;//可变获取cn2的值 ...

  8. MEF学习总结(4)---Container层

    通过AttributeedModelPrograming,我们可以声明暴露组件,依赖组件,发现组件,但是所有这些需要有一个触发点.即需要把所有这些组合在一起来协同工作,最终实现依赖注入.这就是Cont ...

  9. Unit01: Spring简介 、 Spring容器 、 Spring IOC

    Unit01: Spring简介 . Spring容器 . Spring IOC Spring (1)Spring是什么? Spring是一个开源的用来简化应用开发的框架. (2)Spring的特点? ...

  10. 【学步者日记】C#使用线程

    http://note.youdao.com/noteshare?id=2810300cdfa3f4d973792dcf30a31db9 System.Threading.Thread th; th ...