7 replies to this topic

### #1cruppstahl

New Member

• Members
• 16 posts

Posted 24 January 2004 - 01:13 PM

Hi gurus!

i want my engine to support shaders. it is the first time that i get in touch with shaders, and i am not sure what kind of features i will support... how do your shader systems work? can you guys post examples of your shaders?

Here's mine:

# this is just a pseudo-grammar-language...

depthvalue ="never"|("none"|"always")|"less"|"lequal"|"equal"|"gequal"|
"greater"|"notequal"

alphavalue ="never"|("none"|"always")|"less" ref |"lequal" ref|
"equal" ref|"gequal" ref| "greater" ref|"notequal" ref

{
"cull" = "front"|"back"|"none" # default=front
"fog" = bool          # default=0
"type" = "sky"|"water"|"none"  # default=none

"layer" level { # level ranges from 0..7
"depthfunc" = depthvalue  # default=always
"depthwrite" = bool
"alphafunc" = alphavalue  # default=always
"blendfunc" = blendvalue

"texturemap" = name
"shininess" = 0..128
"specular" = 0..255 0..255 0..255 0..255 # default 0 0 0 255
"emissive" = 0..255 0..255 0..255 0..255

"type" = "decal"|"detail"|"none"|"bumpmap"|"envmap"  # default=none
}
}


a shader can have several layers of textures, each layer with his own material, depth- alpha- and blend-function. it is based on the tutorials at http://www.racer.nl/...e/shadereng.htm.

Chris

DevMaster Staff

• Members
• 1057 posts

Posted 24 January 2004 - 11:48 PM

you know at first glance I though you were talking about vertex and pixel shaders, you know the programmable pipeline stuff that's all the craze these days...

### #3anubis

Senior Member

• Members
• 2225 posts

Posted 25 January 2004 - 05:38 PM

shouldn't your gf4 support shaders that run directly on the hardware ?
If Prolog is the answer, what is the question ?

### #4cruppstahl

New Member

• Members
• 16 posts

Posted 26 January 2004 - 07:25 PM

ok, sorry :blush: i meant... err... shaders! Well, Quake3-shaders, or just look at the link in my first post to find out what i mean. i DONT mean vertex or pixel shaders =)

### #5anubis

Senior Member

• Members
• 2225 posts

Posted 26 January 2004 - 10:18 PM

come to think of it the nebula device from www.radonlabs.de used such a shader system. maybe you should have a look at their implementation. i think it supported about the same featureset as yours
If Prolog is the answer, what is the question ?

### #6anubis

Senior Member

• Members
• 2225 posts

Posted 26 January 2004 - 10:23 PM

how would you be realizing things like bumbmapping ???
i think i would start out with a much more restricted featureset and expand it from there on. i suppose you will have to solve a few inital problems regarding things like multi-pass situations, etc. after you have built a solid base more effects will become easier to implement
If Prolog is the answer, what is the question ?

### #7cruppstahl

New Member

• Members
• 16 posts

Posted 27 January 2004 - 05:53 PM

yes, i'll definitely start with the basic features, and then go on to more advanced stuff. i have no idea how to implement bump mapping, but it looks cool, so i added it :)

However, the multipass thing nearly works...

i will have a look at nebula.

### #8anubis

Senior Member

• Members
• 2225 posts

Posted 27 January 2004 - 06:03 PM

nebula was one of the refferences for me for learning for learning engine architecture
If Prolog is the answer, what is the question ?

#### 1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users