Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (EternallyCurious, Quad, vicknick), 700 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
HLSL shader hints #36232
11/16/04 03:47
11/16/04 03:47
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
I've put some general information about how to use sun light, dynamic lights, and fog in HLSL shaders on the Wiki:

http://www.conitecserver.com/wiki/index.php/ShaderHints

Re: HLSL shader hints [Re: jcl] #36233
11/16/04 05:30
11/16/04 05:30
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Thanks. Useful stuff.

Re: HLSL shader hints [Re: Steempipe] #36234
11/16/04 06:15
11/16/04 06:15
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
This is a template script as an example how to do a shader with dynamic lights, using the terrain multitexture shader concept by you and ventilator. It mixes three textures plus a shadow map, according to the red, green, and blue channels of the first terrain skin.

http://server.conitec.net/down/mtlterrainmulti.wdl

A6.31.3 is required for running the script. At the moment the 8 dynamic lights must be set manually by a script or in the shader code. In the next update, the engine will pass the light positions and colors directly to the shaders.


Re: HLSL shader hints [Re: jcl] #36235
11/16/04 10:22
11/16/04 10:22
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Runs smooth and fast. Easy to implement.

Thanks.. this is a very good template. Now for the experimenting!



Re: HLSL shader hints [Re: jcl] #36236
11/16/04 11:41
11/16/04 11:41
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Quote:

In the next update, the engine will pass the light positions and colors directly to the shaders.





is this what i think it is? awsome!!

Re: HLSL shader hints [Re: Matt_Aufderheide] #36237
11/16/04 12:19
11/16/04 12:19
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Here's _one_ way to modify the code to put light constants in:

Code:

// preset this with light positions (xyz) and ranges (w)
const float4 vecLightPos[8]= {
-327,650,470,400,
-893,607,400,400,
62,703,417,800,
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0};

// preset this with light colors
const float4 vecLightColor[8]= {
1,0,0,1, //Red
0,1,0,1, //Green
0,0,1,1, //Blue
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0};



Re: HLSL shader hints [Re: Steempipe] #36238
01/07/05 15:05
01/07/05 15:05
Joined: Jan 2005
Posts: 2
P
Patrick_Star Offline
Guest
Patrick_Star  Offline
Guest
P

Joined: Jan 2005
Posts: 2
Quick question. How would you implement fog into this? Currently I've had no luck in getting this to work. TIA.

Re: HLSL shader hints [Re: Patrick_Star] #36239
01/07/05 17:32
01/07/05 17:32
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
There was a brief discussion on fog here:
web page

And you can see it in a complete code here:
web page

Re: HLSL shader hints [Re: Steempipe] #36240
01/07/05 17:39
01/07/05 17:39
Joined: Jan 2005
Posts: 2
P
Patrick_Star Offline
Guest
Patrick_Star  Offline
Guest
P

Joined: Jan 2005
Posts: 2
Ah many thanks for pointing those posts out. All is working well now.

Re: HLSL shader hints [Re: Patrick_Star] #36241
01/10/05 15:23
01/10/05 15:23
Joined: Jun 2001
Posts: 2,006
USA
Darkstorm Offline
Senior Expert
Darkstorm  Offline
Senior Expert

Joined: Jun 2001
Posts: 2,006
USA
Hey quick question. Any idea why is it that when I try to use mtlSkin instead of entSkin on the sencond and third texture skin I get a strange black "fog" over the HMP? The textures are there but there is almost a fog-of-war thing going on .

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