Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

战争迷雾特定位置发生闪烁 #7

Open
wqaetly opened this issue Feb 2, 2021 · 0 comments
Open

战争迷雾特定位置发生闪烁 #7

wqaetly opened this issue Feb 2, 2021 · 0 comments

Comments

@wqaetly
Copy link

wqaetly commented Feb 2, 2021

我已经阅读了大部分代码,并且也知道项目大体的运行框架,但是对于计算视野可见地图格子相关算法,我看的不是很懂
但是问题其实也不在这,我遇到的问题是,在Example1场景中,到达特定的地形处,会出现战争迷雾闪烁的Bug
原因我也找到了,如果在一次计算可见性区域后进入EndUpdate状态(我称他为奇怪的状态,因为我看不懂)
image

这个状态下,RefreshFOWTexture方法不会更新Color缓冲区,而是直接返回true
image

然后当前帧可见性(color.g)与前一帧可见性(color.r)的会不断循环地从0~1插值,然后就会闪烁
41504bbeda76c05fbd144acba265461c

我现在是加了一个trick来暂时解决这个问题的
image

如果可以的话,请告诉我这个问题的原因(迷雾可见性的算法),非常感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant