MSDN Library
콘텐츠의 테이블 축소
콘텐츠의 테이블 확장
EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

What Is a Programmable Effect?

A programmable effect is a general purpose rendering effect designed for Windows and Xbox 360 (not Windows Phone). A programmable effect is created from vertex and pixel shaders written in the High-Level Shading Language (HLSL) and is completely customizable.

A vertex shader initializes the per-vertex processing of the graphics pipeline and a pixel shader initializes the per-pixel processing of the pipeline. Combining a vertex shader and a pixel shader in a programmable effect gives you tremendous flexibility over the way the pipeline processes your data. Use a programmable effect in a game designed for the Reach or HiDef profile.

Here is an idea of the steps involved with getting a programmable effect up and running.

  • Design the shaders by using HLSL. An effect usually contains one vertex and one pixel shader.
  • Create a technique that invokes the shaders; a technique determines which shaders are used. The technique and the shaders are usually stored in an effect (.fx) file.
  • Create an effect object in your game by using the Effect class. This usually means loading the effect file with the Content Pipeline which is illustrated in Creating a Custom Effect.
  • Initialize the effect parameters. This usually includes parameters for matrix transformations and one or more textures but could include any other custom parameters you have added to the effect. For an example, see Creating a Custom Effect with Texturing.
  • Render the effect by applying the effect to the device and rendering the scene. This is also illustrated in Creating a Custom Effect.

There are many examples that use custom effects in the education catalog on the https://developer.xboxlive.com/Xbox/Pages/home.aspx.

커뮤니티 추가 항목

추가
표시:
© 2016 Microsoft