Shadder and Effect - 3.0 Introduction Pixel Shadder

zhaozj2021-02-16  48

Chapter 3 introduces pixel shaders

Read this article shows that you have agreed to the statement

The pixel shader is a program executed on the GPU of the graphics card during rasterization processing of each pixel. (Not like the vertex shader, Direct3D does not use the software analog pixel shader function.) It actually replaces the multiTexturing stage of the fixed function line and gives us directly manipulating a separate pixel and access The ability of pixel texture coordinates. This direct access to pixels and texture coordinates allows us to achieve various effects, such as multiTexturing, per pixel lighting, depth of field, cloud simulation (Cloud Simulation) (CLOUD SIMULATION) (Cloud Simulation), DEPTH OF FIELD Fire Simulation, Sophistated Shadowing Technique.

The version of the pixel shader supported by graphics cards can be checked by the Pixelshaderversion member and D3DPS_Version macro of the D3DCAPS9 structure. The following code snippet shows this:

// if the device's supported version is Less Than Version 2.0

IF (Caps.Pixelshaderversion

// Then Pixel Shader Version 2.0 is Not Supported on this device.

the goal

n Basic understanding of multipedia concept

n Learn how to write, create and use pixel shader

n Learn how to use pixel shaders to achieve multipedia effects

[Declaration]: Introduction to 3D Game Programming With DirectX 9.0 "in this article, it is limited to the translator level, and it is inevitable that there is a mistake in the text. Welcome all netizen criticism; this article is only used for learning exchange and reference usage, not to use In any form of commercial use; if you need to reprint the translator's consent, maintain the integrity of the article, and indicate all the rights to translations, including translators and sources. For the consequences of violating the above terms, the translator is not responsible for this. My MSN is raymond_king123@hotmail.com, welcome 3D graphics and games, and friends with a certain graphic programming exchange.

转载请注明原文地址:https://www.9cbs.com/read-23168.html

New Post(0)