当前位置:网站首页>Samplecamerafilter
Samplecamerafilter
2022-04-23 07:46:00 【Vieux garçon.】
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Camera))/*,ExecuteInEditMode*/]
public class SampleCameraFilter : MonoBehaviour {
public RenderTexture rt;
//srcEtdesEst un objet créé par le moteur,On ne peut utiliser que,Mais ne vous référez pas localement.
private void OnRenderImage(RenderTexture src, RenderTexture des)
{
Graphics.Blit(src, des);//Cette phrase doit avoir,Assurez - vous que l'image passe..Ou ça s'arrêtera.cameraL'image,D'autres filtres échoueront..
//Ici, vous devez copier et rendre unrt
if (rt == null)
{
rt = RenderTexture.GetTemporary(src.width, src.height);//unityJe m'en occupe moi - même.RenderTexturePool,On le récupère dans le cache..
}
Graphics.Blit(src,rt);//Copier l'image
}
private void OnDestroy()
{
if (rt != null)
{
RenderTexture.ReleaseTemporary(rt);// N'oubliez pas de libérer la référence
}
}
}
版权声明
本文为[Vieux garçon.]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230626191528.html
边栏推荐
- NodeJS(二)同步读取文件和异步读取文件
- js案例之求最大值,反转数组,冒泡排序
- Install and configure Taobao image NPM (cnpm)
- 系统与软件安全研究(二)
- 9. Common functions
- The difference and application of VR, AR and MR, as well as some implementation principles of AR technology
- 快排的练习
- SampleCameraFilter
- State synchronization and frame synchronization
- Custom time format (yyyy-mm-dd HH: mm: SS week x)
猜你喜欢
SAP DEBUG调试FOR IN、REDUCE等复杂的语句
SAP Excel 已完成文件级验证和修复。此工作簿的某些部分可能已被修复或丢弃。
BTree、B+Tree和HASH索引
SAP pi / PO rfc2restful publishing RFC interface is a restful example (proxy indirect method)
Nacos / sentinel gateway current limiting and grouping (code)
H5 local storage data sessionstorage, localstorage
中间人环境mitmproxy搭建
Reflect on the limitations of event bus and the design and implementation of communication mechanism in component development process
基于NLP的软件安全研究(一)
SAP PI/PO rfc2RESTful 发布rfc接口为RESTful示例(Proxy间接法)
随机推荐
将单行文字自动适应到目标矩形框内
5. Sql99 standard: internal connection and external connection
快速排序
State synchronization and frame synchronization
[Ted series] how does a habit change my life
C#使用拉依达准则(3σ准则)剔除异常数据(.Net剔除一组数据中的奇异值)
Use of typescript dictionary
面经总结2
二叉树的深度
Window10版MySQL设置远程访问权限后不起效果
异步的学习
TimelineWindow
Date object (JS built-in object)
给定区段范围内字符串自生成代码
MySQL8.0 安装/卸载 教程【Window10版】
js之DOM学习三种创建元素的方式
驼峰命名对像
取得所有点列表中的最大值GetMaxPoint
9. Common functions
Methods of database query optimization