您的位置:首页 > 移动开发 > Unity3D

RenderTexture 不能正常显示

2015-11-19 13:41 507 查看
@(Bug记录)

RenderTexture 不能正常显示

问题描述

使用RenderTexture,在iTouch/iPhone5s上不能正常渲染.

并有以下错误信息:

OpenGLES error 0x0500 in /Users/tps/Documents/untitled folder 2/TPS/Classes/Unity/GlesHelper.mm:339\

问题原因

Unity 内部Bug

解决方法

将RenderTexture的antiAliasing项设置为1

rt = new RenderTexture(512, 512, 24);
rt.antiAliasing = 1;


可使用预编译宏和图形API类型和版本决定是否要打开AntiAliasing

rt = new RenderTexture(512, 512, 24);
rt.antiAliasing = 4;
#if UNITY_IPHONE
if (SystemInfo.graphicsDeviceType == UnityEngine.Rendering.GraphicsDeviceType.OpenGLES2) {
rt.antiAliasing = 1;
}
#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  unity bug