Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 17,416 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how do i implement shaders? #205720
05/08/08 07:54
05/08/08 07:54
Joined: Jul 2007
Posts: 24
N
noobie86 Offline OP
Newbie
noobie86  Offline OP
Newbie
N

Joined: Jul 2007
Posts: 24
Ok this is a noob question but i'm a noob anyway so it doesn't matter i guess \:\)
i'm posting this here because i didn't find this anywhere else.. sorry if its already there somewhere and i missed it somehow..

Any game i create seems to have a washed out and bland look no matter how many lights i add or how sharp i make the textures. I'm wondering if i should start using shaders.

I'm no high-level directX programmer so there's no way i can program my own shaders. I recently downloaded a 'toon shader' from the website earthcontrol.de. I'm not sure what kind of shader it is (pixel/vertex/material). It has a .wdl script and a .fx file.
Say i have made an FPS game in Gamestudio, defined all the textures, models and lights. Can i just add a few lines of code that will implement this shader? Or is it going to take a revamping of the entire code for the game?

Or should i learn directX \:D ?

Re: how do i implement shaders? [Re: noobie86] #205931
05/09/08 16:16
05/09/08 16:16
Joined: Jul 2007
Posts: 24
N
noobie86 Offline OP
Newbie
noobie86  Offline OP
Newbie
N

Joined: Jul 2007
Posts: 24
ok i found a tutorial on the AU resource site on implementing shaders. I downloaded some fx files also but when implementing the shaders i get the error message

"(shader name here) line(1) syntax error"

and then all shaders seem to have the same effect on the object. There is no difference between specular/diffuse/(others).. what does the "line(1) syntax error" statement denote?

Re: how do i implement shaders? [Re: noobie86] #205937
05/09/08 16:46
05/09/08 16:46
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
which GS version you are using?

are your shaders GS compatible?


3333333333
Re: how do i implement shaders? [Re: Quad] #205946
05/09/08 18:29
05/09/08 18:29
Joined: Jul 2007
Posts: 24
N
noobie86 Offline OP
Newbie
noobie86  Offline OP
Newbie
N

Joined: Jul 2007
Posts: 24
I'm using A6..

the shaders i downloaded are from the AU resource site. The tutorial gives some example files (specular,diffuse,ambient and normal mapping) with exe demos. The executables show the effect properly and the tutorial was for GS, so i think the fx files must be compatible..

I'm not very knowledgeable about shaders and their programming, so i just followed what was given in the tutorial:

//code start
material mtlNormalMapped
{
flags = tangent; // given in the tutorial saying "Make sure the engine sends tangents to the shader"
effect = “NormalMapped.fx”; // NormalMapped.fx is one of the files in the demo
}

if(key_a) {my.material = mtlNormalMapped;}
//code end

using this in a .wdl file and running my level gives the line(1) syntax error. However the level runs and when i press 'a' i get a noticable change in the material shading (it becomes little brighter) but not the effect shown in the tutorial's demo file. Also the effect is the exact same whichever .fx file i use (there are 4 in the tutorial). The level is a closed room, no sunlight.

Changing the syntax and using in lite-C causes the level to crash saying 'shader feature' not supported.

Re: how do i implement shaders? [Re: noobie86] #205948
05/09/08 18:38
05/09/08 18:38
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
felt like your version doesnt support (a6 standart?) shaders.


3333333333

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1