Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (juanex, AndrewAMD), 1,257 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19056 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to do fog with HLSL #42167
03/06/05 23:51
03/06/05 23:51
Joined: Aug 2003
Posts: 183
BionicHero Offline OP
Member
BionicHero  Offline OP
Member

Joined: Aug 2003
Posts: 183
Just when I thought I understood HLSL there's always something to throw me back to zero. All I wanted to do is add fog to the water shader. So what I did was turning this:
Code:
 
struct VS_OUTPUT
{
float4 Pos: POSITION;
float2 texCoord: TEXCOORD0;
float3 eyeLinear: TEXCOORD1;
};


into this:
Code:
 
struct VS_OUTPUT
{
float4 Pos: POSITION;
float2 texCoord: TEXCOORD0;
float3 eyeLinear: TEXCOORD1;
float fog: FOG;
};


If I'm already wrong here please tell me. Then (for testing) the vertex shader for calculating fog looks like this:
Code:
 Out.fog=1.0; 


Yes, I know it's stupid, but it's just for testing.
And my pixelshader just multiplies the output color with this value:
Code:
 reflection *= In.fog; 


But when I run it I get "error X4502: invalid reference to the input semantic 'POSITION0'". The line given is the declaration of the vertex shader output "float4 Pos: POSITION;".
Could anyone help me on this one? I really don't get it...

Re: How to do fog with HLSL [Re: BionicHero] #42168
03/08/05 09:31
03/08/05 09:31
Joined: Aug 2003
Posts: 183
BionicHero Offline OP
Member
BionicHero  Offline OP
Member

Joined: Aug 2003
Posts: 183
Anyone???


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