游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1147|回复: 0

FAQ-20 当我使用多通道渲染,同样的顶点输入数据和变换操

[复制链接]

41

主题

184

帖子

184

积分

注册会员

Rank: 2

积分
184
发表于 2006-12-22 22:22:00 | 显示全部楼层 |阅读模式
当我使用多通道渲染,同样的顶点输入数据和变换操作却产生"z-fighting_z值冲突",为什么会这样?

当我使用多通道渲染,同样的顶点输入数据和变换操作却产生"z-fighting_z值冲突",为什么会这样?

确信你不是在一个渲染通道中使用VS做变换操作,在另一个渲染通道中使用固定渲染线完成同样的功能。这两条渲染线,虽然输入的顶点数据相同,会产生不同的z值,这回在相等的深度测试中产生"z-fighting_z值冲突"。为了避免这种情况,必须在所有的渲染通道中使用相同的渲染方式。

/************************************/

I'm using multiple passes, but with the exact same vertex data and transformations in each pass.  Why am I getting z-fighting in my scene?

Make sure you're not using vertex shaders to do transforms in one pass and fixed function transforms in another. These two paths, even given the exact same data, will not generally produce the exact same values, and this can cause z-fighting when rendering multiple passes with an EQUAL depth test. The solution is to stick to one method for all passes over an object, or use an OpenGL extension such as ARB_vertex_program with the ARB_position_invariant option.

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-26 03:13

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表