图形学书籍 Real-Time Rendering 2.2 应用程序阶段(根据谷歌翻译修改)

The developer has full control over what happens in the application stage, since it usually executes on the CPU. Therefore, the developer can entirely determine the implementation and can later modify it in order to improve performance. Changes here can also affect the performance of subsequent stages. For example, an application stage algorithm or setting could decrease the number of triangles to be rendered.

开发人员可以完全控制应用程序阶段发生的事情,因为它通常在 CPU 上执行。 因此,开发人员可以完全确定该阶段的代码实现并可以在以后修改它以提高性能。 此处的更改也会影响后续阶段的性能。 例如,应用程序阶段算法或设置可以减少要渲染的三角形数量。

All this said, some application work can be performed by the GPU, using a separate mode called a compute shader. This mode treats the GPU as a highly parallel general processor, ignoring its special functionality meant specifically for rendering graphics.

尽管如此,一些应用程序工作可以由 GPU 使用称为计算着色器的单独模式执行。 此模式将 GPU 视为高度并行的通用处理器,忽略其专门用于渲染图形的特殊功能。

At the end of the application stage, the geometry to be rendered is fed to the geometry processing stage. These are the rendering primitives, i.e., points, lines, and triangles, that might eventually end up on the screen (or whatever output device is being used). This is the most important task of the application stage.

在应用阶段结束时,要渲染的几何形状被送入几何处理阶段。 这些是渲染图元,即点、线和三角形,它们最终可能会出现在屏幕上(或正在使用的任何输出设备)。 这是应用程序阶段最重要的任务。

A consequence of the software-based implementation of this stage is that it is not divided into substages, as are the geometry processing, rasterization, and pixel processing stages. However, to increase performance, this stage is often executed in parallel on several processor cores. In CPU design, this is called a superscalar construction, since it is able to execute several processes at the same time in the same stage. Section 18.5 presents various methods for using multiple processor cores.

这个阶段基于软件实现,导致它没有像几何处理、光栅化和像素处理阶段那样被分成多个子阶段。 然而,为了提高性能,这个阶段通常在多个处理器内核上并行执行。 在 CPU 设计中,这被称为超量结构(superscalar construction),因为它能够在同一阶段同时执行多个进程。 18.5 节介绍了使用多个处理器内核的各种方法。

One process commonly implemented in this stage is collision detection. After a collision is detected between two objects, a response may be generated and sent back to the colliding objects, as well as to a force feedback device. The application stage is also the place to take care of input from other sources, such as the keyboard, the mouse, or a head-mounted display. Depending on this input, several different kinds of actions may be taken. Acceleration algorithms, such as particular culling algorithms (Chapter 19), are also implemented here, along with whatever else the rest of the pipeline cannot handle.

应用程序阶段阶段通常实施的一个过程是碰撞检测。 在检测到两个物体之间的碰撞之后,可以生成响应并将其发送回碰撞物体以及力反馈设备(force feedback device)。 应用程序阶段也是处理来自其他来源(例如键盘、鼠标或头戴式显示器)的输入的地方。 根据此输入,可以采取几种不同类型的操作。 加速算法,例如特定的剔除算法(culling algorithms)(第 19 章),也在这里实现,以及管线其余部分无法处理的任何其他内容也在这里实现。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值