Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AemStones, AndrewAMD, gamers, Kingware), 1,590 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
New shader features? #17878
10/06/03 18:41
10/06/03 18:41
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I would like to know which variables, vectors, matrices and other features you want to have implemented for effect files.

We'll add the inverse view matrix, and a tangent vector instead of the second texture coordinate set - both are required for certain shader effects. Then we'll have basically the same set of shader variables that programs like RenderMonkey or EffectEdit offer, so I guess that's all what's needed for all kind of effects. After implementation of the new light management, we'll also add vectors for the properties of the 8 lights.

If you need anything else, please post it here, and also mention for which kind of shader effect you'd need it (or mention the sample in one of the shader programming books).

It was requested to add C-Script access to the transformation matrices. However the world matrix is different for every rendered entity, so this would not make much sense, or would at least slow down the rendering due to the fixed<->float conversion. So I'd prefer to calculate all required matrices by the engine.

Re: New shader features? [Re: jcl] #17879
10/06/03 18:48
10/06/03 18:48
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
but won't the second texture coordinate set be important once shaders can be used with level geometry?

Re: New shader features? [Re: ventilator] #17880
10/06/03 18:51
10/06/03 18:51
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes. The tangent space conversion can not be used for shaded surfaces. But it can be used for models, sprites, and flat surfaces, so I guess it's not much of a restriction.

Re: New shader features? [Re: jcl] #17881
10/06/03 19:54
10/06/03 19:54
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
as i see we have those so far.
v0[3] - position
v3[3] - normal
v7[2] - tex coord1
v8[2] - tex coord2

what about getting color-vectors and vertex_weight. this one crossed my way many times when i was looking at some sources i found.

in a description i found there are the following ones:
v0[3] - position x,y,z,w
v1[3] - vertex weight w,0,0,1
v2[3] - normal x,y,z,1
v3[3] - primary color r,g,b,a
v4[3] - secondary color r,g,b,a
v5[3] - fog coefficient fc,0,0,1
v6[3] - tex coord1 s,t,r,q
v7[3] - tex coord2 s,t,r,q






www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: New shader features? [Re: ello] #17882
10/06/03 20:16
10/06/03 20:16
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
i guess the vertex weight is only needed if you want to use the vertex shader for skeletal animation or something like that and the colors would only be useful if a6 geometry would support vertex colors.

Re: New shader features? [Re: ello] #17883
10/06/03 20:24
10/06/03 20:24
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Those input parameters are mostly legacy for software T&L. Hardware T&L vertex formats normally don't use colors, fog coefficients and so on. So, those values are normally always zero. The only thing we'll change in that regard in the next beta is 3 dimensions for the texture coordinates, instead of 2.

Re: New shader features? [Re: ventilator] #17884
10/06/03 20:25
10/06/03 20:25
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
but if i can set the colors (oD0 and oD1) then i'd like to be able to request them, too.


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: New shader features? [Re: ello] #17885
10/06/03 20:29
10/06/03 20:29
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
What for?

Re: New shader features? [Re: jcl] #17886
10/06/03 20:46
10/06/03 20:46
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
for example, i'd like to swap the red and blue amount of oD0 to have it flicker


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: New shader features? [Re: ello] #17887
10/06/03 23:53
10/06/03 23:53
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I'm a little confused now. It's pretty easy to swap the read and blue values in a vertex shader. What has this to do with the input registers?

The v3 and v4 registers pass the diffuse and specular vertex colors to the shader. In T&L mode, vertices do not have any diffuse and specular colors. Those colors are calculated by the hardware from the material and the entity color and environment lights. So those registers are always zero in A6 mode. They are only used in A5 mode.

Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | 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