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 OnPreCull, OnPreRender & OnPostRender to any scripts attached, and render any eventual image filters.
2、void CopyFrom(Cameraother);
Makes this camera's settings match other camera.
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.The first enabled camera tagged "MainCamera" (Read Only).
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.
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 OnPreCull, OnPreRender 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.
Remove shader replacement from camera.
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的更多相关文章
- camera render texture 游戏里的监控视角
Camera里: 新建render texture并拖入到target texture里 新建材质球 拖入render texture camera里的视角会在材质球上出现 新建一个pla ...
- 获取camera截屏图片
Camera camera; SpriteRenderer sprRender; Texture2D t2d = New Texture2D(1300, 760, TextureFormat.RGB2 ...
- HTML5 学习总结(四)——canvas绘图、WebGL、SVG
一.Canvas canvas是HTML5中新增一个HTML5标签与操作canvas的javascript API,它可以实现在网页中完成动态的2D与3D图像技术.<canvas> 标记和 ...
- Unity性能优化(2)-官方教程Diagnosing performance problems using the Profiler window翻译
本文是Unity官方教程,性能优化系列的第二篇<Diagnosing performance problems using the Profiler window>的简单翻译. 相关文章: ...
- WebGL与three.js
前面学习了一些webgl的基础知识,现在就用一下three.js写一个小例子,记录一下学习的过程. 效果图: 1.去github下载three.js,然后将它加载到网页中 <script src ...
- canvas绘图、WebGL、SVG
目录 一.Canvas 1.1.创建canvas元素 1.2.画线 1.3.绘制矩形 1.4.绘制圆弧 1.5.绘制图像 1.6.绘制文字 1.7.随机颜色与简单动画 二.WebGL 2.1.HTML ...
- HTML5 学习笔记(四)——canvas绘图、WebGL、SVG
一.Canvas canvas是HTML5中新增一个HTML5标签与操作canvas的javascript API,它可以实现在网页中完成动态的2D与3D图像技术.<canvas> 标记和 ...
- Unity3D NGUI动态生成模糊背景图
先上效果. 制作原理:模糊的部分是用UITexture,前面是一个UISprite.用主摄像机渲染出一张纹理,把这张纹理模糊处理,把这张纹理赋值给UITexture. 脚本代码 using Unity ...
- three.js初涉略(一)
<!-- 最近要研究一下webgl,发现了webgl中文网(http://www.hewebgl.com/article/articledir/1).边研究教程边做下记录 --> thre ...
随机推荐
- drone 学习二 pipeline 说明
1. 基本语法 pipeline: backend: image: golang commands: - go build - go test frontend: image: node comman ...
- webpack libray 参考例子
备注: 使用webpack 进行模块导出,方便进行通信 1. 项目初始化 ├── main.js ├── package.json ├── show.js ├── webpack.config.j ...
- webpack extract-text-webpack-plugin
备注: 提炼上面引用的css 1. 插件配置 const path = require("path"); const extracttextplugin = require( ...
- RBAC (基于角色的访问控制)
基于角色的访问控制(Role-Based Access Control)作为传统访问控制(自主访问,强制访问)的有前景的代替受到广泛的关注.在RBAC中,权限与角色相关联,用户通过成为适当角色的成员而 ...
- jQuery的deferred对象详解(转载)
jQuery的开发速度很快,几乎每半年一个大版本,每两个月一个小版本.(由于无法转载,复制原文 .原文链接——原作者:阮一峰) 每个版本都会引入一些新功能.今天我想介绍的,就是从jQuery 1.5. ...
- hadoop之 Hadoop2.2.0中HDFS的高可用性实现原理
在Hadoop2.0.0之前,NameNode(NN)在HDFS集群中存在单点故障(single point of failure),每一个集群中存在一个NameNode,如果NN所在的机器出现了故障 ...
- 安装Zookeeper(集群版)
一.环境介绍(3台虚拟机) IP Hostname 192.168.2.14 javaweb04 192.168.2.15 javaweb05 192.168.2.16 javaweb06 二.配置文 ...
- atoi函数的实现——面试
主要考虑,字符串中是否有非法字符,字符串是否有溢出控制 #include<stdio.h> int myatoi(const char *str){ ,ret=,i=; if(str[i] ...
- 使用Nancy搭建简单的Http服务的示例demo
刚刚接触Nancy没几天,暂时还不会使用Nancy来做web开发,只是使用Nancy实现了一个简单的Http服务的Demo程序,实现对Post和Get请求的处理. Demo的示例代码地址如下:http ...
- Java基础--NIO
NIO库在JDK1.4中引入,它以标准Java代码提供了高速的,面向块的IO,弥补了之前同步IO的不足. 缓冲区Buffer Buffers是一个对象,包含了一些要写入或读出的数据.在面向流的IO模型 ...