Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411641 Posts in 69394 Topics- by 58449 Members - Latest Member: pp_mech

May 14, 2024, 05:08:43 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)TutorialsSkinnedEffect with custom shaders in XNA 4
Pages: [1]
Print
Author Topic: SkinnedEffect with custom shaders in XNA 4  (Read 2669 times)
Eniko
Level 0
**



View Profile WWW
« on: August 06, 2012, 04:39:12 AM »

If you want to use animated 3d models in XNA there's the excellent skinning sample made available by the XNA team with a content processing pipeline and a built-in effect that handles almost everything for you; bones, materials, lighting, you name it.

The only unfortunate part is that you can't easily extend the functionality of this framework without reimplementing it from scratch. Even starting from their released production code involves a lot of busywork and trying to parse their HLSL, which is vague and convoluted enough to be very difficult for HLSL beginners.

That's why, after doing it myself, I wrote a tutorial on using SkinnedEffect with custom shaders. The post on my blog outlines how to create your own CustomSkinnedEffect which can be loaded by supplying it any normal Effect as a base (which makes it easy to subclass) and how to extend the HLSL so you have two tidy files with all the shared vertex and pixel shader code inside them for easy editing.

Comes complete with a download of an edited version of the skinning sample which uses CustomSkinnedEffect.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic