English 中文(简体)
GLSL 330 的多取样和碎s
原标题:multisampling and fragment shaders in GLSL 330

Ive试图理解在多功能的翻译中如何使用碎块,但仔细阅读了光谱,却不搞混淆。

我设立了多功能的FBO,有色和深度/底部。

我只是为了改造而设置了一条简单的一条线透镜,另一个一线碎块,只回到黑色。

我的行文是一行——该行被顺利展示。

现在, 如果在碎块中,I texelFetch不 d地返回黑色,而总是读出0号样本(即黑色),我就有一个黑色。

简单的<代码>myoutcolor=vec4(0.0)和myoutcolor=texelFetch(mysampler2DMS,...,0)之间的区别是什么?

光谱显示,只有静态使用gl_SampleIDgl_Samplemask[ ],或具有“mple”存储限值,碎片在取样一级执行。 (在所有这些情况下,这意味着GLSL#vert 400或之上),否则就以零碎的方式执行。

但这如何? 在上述例子中,即使我总是回到同一个肤色,我还是走了一条平稳的界线,因此,我把碎块的斜线推向在多个组合体内进行取样的ALWAYS。 另一方面,如果情况并非如此,我就应该取得顺利的结果,即使从管理文本中总是回到同样的样本。

有些人能够帮助我看到这一点?

PS:目前使用的是第330号版本,但我发现,每份多份多取样器说明都需正确处理管理系统(gl_SampleID,gl_Samplemask[>/code>, 样本)。 我如何能够在330国集团中处理管理文本?

问题回答

in the above example, I got a smoothed line even if I always returned the same color

因为有多彩的 是。

Multisampling is all about invoking the FS once per pixel and distributing that value over the samples within that pixel area that the primitive covers. So if the FS is executed for a pixel on the edge of the primitive, then the result will be distributed to only some of the samples of that pixel.





相关问题
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 ...