English 中文(简体)
冰川沉积的清晰度
原标题:Disable writing in depth buffer from glsl

所有地貌分布都在VBO(透明+不透明)。 我不能区分地貌。 我如何能够在不失去数据颜色的情况下,从冰川中进行深层的写作?

最佳回答

如果我理解正确的话,你会因为你既得不透明,又要用不适当的深度书写。 除了在最不发达等国家从事的工作之外,如果是,它不会产生你想要的东西。

如果你只写了特设>,那么,在透明物体之后产生的不透明物体将超出其标准,而不管其顺序如何。

你真的想要做的是:

  1. Enable depth writes and depth test
  2. Draw all opaque geometry. If you can, in a roughly sorted (roughly is good enough!) order, closest objects first.
  3. Disable depth writes, keep depth test enabled
  4. Enable blending
  5. Draw transparent objects, sorted in the opposite direction, that is farthest away first. This occludes transparent objects with opaque geometry and makes blending work correctly.

如果出于某种原因,你可以打上“opaque地球物理学”(尽管确实没有任何理由说明你可以做些什么?),那么,我们永远不会想到,它不会 slower碎块,而是产生同样的形象。

如果出于某种原因,你可以打上transuz<>/em> Geometry,那么,如果几个透明的物体重叠,你将不得不期望产生不正确的结果。 这可能是值得注意的(特别是如果命令是“兰经”,即按框架进行改动,就会非常明显——否则你实际上会放弃,尽管它不正确。

请注意,随着日期的缩小,有几个物体位于一个VBO的事实并不意味着你可以按你想要的顺序提取一个小块或几个小块。 毕竟,一个VBO只拥有一些vert子,要由你们中哪几组人来决定。

问题回答

你们能够这样做。

我不能区分地貌。

为什么? 你们认为,这在万家邮局都是这样吗? 接着,我收到好消息: 完全有可能从一小部分缓冲物体中提取。





相关问题
OpenGL 3D Selection

I am trying to create a 3D robot that should perform certain actions when certain body parts are clicked. I have successfully (sort of) implemented picking in that if you click on any x-plane part, it ...

CVDisplayLink instead of NSTimer

I have started to implement cvDisplayLink to drive the render loop instead of nstimer, as detailed in this technical note https://developer.apple.com/library/archive/qa/qa1385/_index.html Is it ...

Can the iPhone simulator handle PVR textures?

I have a really weird problem with PVR textures on the iPhone simulator- the framerate falls through the floor on the iPhone simulator, but on the iPhone itself it works just fine. Has anyone had any ...

Calculate fps (frames per second) for iphone app

I am using an opengl es iphone application. What is the most accurate way to calculate the frames per second of my application for performance tuning?

Java - Zoom / 3D Data Visualization Libraries

What are the best libraries/frameworks for doing 3D and/or Zoom interfaces in Java? I d like to be able to do some prototyping of creating new types of interfaces for navigating within data and ...

FLTK in Cygwin using Eclipse (Linking errors)

I have this assignment due that requires the usage of FLTK. The code is given to us and it should compile straight off of the bat, but I am having linking errors and do not know which other libraries ...

热门标签