什么是顶点着色器和像素着色器? [英] What are Vertex and Pixel shaders?

查看:73
本文介绍了什么是顶点着色器和像素着色器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是顶点着色器和像素着色器?

What are Vertex and Pixel shaders?

它们之间有什么区别?哪个最好?

What is the difference between them? Which one is the best?

推荐答案

A Pixel Shader 是一个 GPU(图形处理单元)组件,可以编程为在每个像素的基础上运行,并处理照明和凹凸贴图等内容.

A Pixel Shader is a GPU (Graphic Processing Unit) component that can be programmed to operate on a per pixel basis and take care of stuff like lighting and bump mapping.

A Vertex Shader 也是 GPU 组件,也使用特定的类似汇编语言进行编程,类似于像素着色器,但面向场景几何体,并且可以执行诸如向对象添加卡通轮廓边缘等操作.

A Vertex Shader is also GPU component and is also programmed using a specific assembly-like language, like pixel shaders, but are oriented to the scene geometry and can do things like adding cartoony silhouette edges to objects, etc.

两者都不比另一个好,它们都有其特定的用途.大多数支持 DirectX 9 或更高版本的现代显卡都包含这些功能.

Neither is better than the other, they each have their specific uses. Most modern graphic cards supporting DirectX 9 or better include these capabilities.

网络上有多种资源可以帮助您更好地了解如何使用这些东西.NVidia 和 ATI 尤其是有关此主题的文档的好资源.

There are multiple resources on the web for gaining a better understand of how to use these things. NVidia and ATI especially are good resources for documents on this topic.

这篇关于什么是顶点着色器和像素着色器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆