Skip to content

SkinnedEffect

Chuck Walbourn edited this page Jun 29, 2015 · 25 revisions

This is a native Direct3D 11 implementation of the built-in SkinnedEffect from XNA Game Studio 4 which supports skinned animation with up to 72 bones and 1, 2, or 4 bone influences per vertex.

See also Effects

Header

#include <Effects.h>

Initialization

Construction requires a Direct3D 11 device.

std::unique_ptr<SkinnedEffect> effect(new SkinnedEffect(device));

For exception safety, it is recommended you make use of the C++ RAII pattern and use a std::unique_ptr or std::shared_ptr

Interfaces

SkinnedEffect supports IEffect, IEffectMatrices, IEffectLights, and IEffectFog

Input layout

This effect requires NORMAL, TEXCOORD0, BLENDINDICES and BLENDWEIGHT.

Properties

  • SetDiffuseColor: Sets the diffuse color of the effect. Defaults to white (1,1,1).

  • SetEmissiveColor: Sets the emissive color of the effect. Defaults to black (0,0,0).

  • SetSpecularColor: Sets the specular color of the effect. Defaults to white (1,1,1).

  • SetSpecularPower: Sets the specular power of the effect. Defaults to 16. Settings power to 0 can cause strange rendering artifacts.

  • DisableSpecular: Disables the specular lighting for the effect. Sets the color to black (0,0,0) and power to 1.

  • SetAlpha: Sets the alpha (transparency) of the effect. Defaults to 1 (fully opaque).

  • SetTexture: Associates a texture shader resource view with the effect. Can be set to nullptr to remove a reference.

Remarks

The effect always performs either vertex or per-pixel lighting, and texturing.

For Use

  • Universal Windows Platform apps
  • Windows desktop apps
  • Windows 11
  • Windows 10
  • Windows 8.1
  • Xbox One

Architecture

  • x86
  • x64
  • ARM64

For Development

  • Visual Studio 2022
  • Visual Studio 2019 (16.11)
  • clang/LLVM v12 - v18
  • MinGW 12.2, 13.2
  • CMake 3.20

Related Projects

DirectX Tool Kit for DirectX 12

DirectXMesh

DirectXTex

DirectXMath

Win2D

Tools

Test Suite

Model Viewer

Content Exporter

DxCapsViewer

Clone this wiki locally