O'Reilly logo

DirectX 11.1 Game Programming by Pooya Eimandar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rendering a model

This section will discuss how to render the runtime assets that are produced by the MSBUILD task from the Model Editor. We will use the Pixel Shader which is created by the Shader Designer and a default Vertex Shader for rendering the model. In order to render the model, you need to get familiar with the constant buffers of phong.hlsl. There are four constant buffers that are declared in this shader.

The first one is called the MaterialVars buffer, and it contains the properties of the material and its structure, which were introduced to you in the previous section; the second is the LightVars buffer which contains the properties of the light; the third one, which is named ObjectVars, contains the transformation matrices; and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required