Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
pictionaryjr
17
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 10th Apr 2011 07:21
I've got a few questions regarding the fact that I have never used a shader before.

1)Whats the best way to develop shaders for DBP. I looked up FX Composer but it appears it is no longer supported.
2)How do you implement them into DBP
3)Brief explanations of vertex shaders/pixel shaders/geometry shaders(I looked them up, but couldn't find anything really helpful)
4)Do you have to learn to use another language to create shaders

I know these are broad just random generalizations, but i read the first 2 pages of the shaders thread and didn't find anything usable really. Thank you ahead of time for the help

kamac
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 10th Apr 2011 11:01
Quote: "4)Do you have to learn to use another language to create shaders"


Yes . I have looked inside some .fx files and from my knowledge it seems to be some kind of C/C++ .

pictionaryjr
17
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 10th Apr 2011 17:17
*sigh* this is gonna be a pain then :/. gotta do watcha gotta do tho

Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 10th Apr 2011 18:32
I believe the language used to program shaders (for DBP at least) is HLSL. A quick google search turned up this:
http://rbwhitaker.wikidot.com/hlsl-tutorials

The first two tutorials in there might be useful. If you want to learn how to write shaders I would suggest that you look for some general/introductory tutorials to get a feel for what the language is like (they don't have to be specific). Then I'd recommend looking for some simple shaders to understand conceptually what a given shader (say, a diffuse lighting shader for example) is doing every step of the way. Now for the fun part: you can try making your own modifications and seeing what happens to the object as you do! If the object disappears, then you probably made a syntax error. When it boils down to it, all shaders are really doing is manipulating verticies and colors using math.

To answer your question:
1) I use notepad and notepad++, but I don't really develop shaders from scratch too often so using something like DarkShader or FX Composer might be better.
2) It depends on the shader. The two main commands that you'll always need, however, are LOAD EFFECT and SET OBJECT EFFECT.
3) Usually a DirectX9 shader is divided into two parts: Vertex Shader and Pixel Shader. The Vertex Shader manipulates the verticies of the object, and the Pixel Shader manipulates the object on a per-pixel basis. This is where you often apply/manipulate textures in your shaders.
4) HLSL

Anyway I hope this is somewhat helpful to you, just remember to start with the basics and experiment


Guns, cinematics, stealth, items and more!
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 10th Apr 2011 19:29
Awesome set of tutorials. Thanks for posting that.

Login to post a reply

Server time is: 2026-07-17 13:59:22
Your offset time is: 2026-07-17 13:59:22