Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Add fog in a shader

Author
Message
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 14th Aug 2012 13:10
Hi, I've a MapScape map with fog (in the shader) but the problem is I use the fastbone shader for all my AI and so they are not fogged.

I've tried to add fog in the fastbone shader with the mapscape shader but it doesn't work.

Is someone know how implement fog in a shader or is there a fastbone shader with fog ?


Thanks.

Eternal suffering ...

I'm french
pdq
19
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 21st Sep 2012 01:42
Here are the important code lines I used to specifically handle fog.

Global declarations:


Vertex Shader output struct:



Vertex Shader:


Pixel Shader:




Hope this jump starts you.

Login to post a reply

Server time is: 2026-07-08 00:25:25
Your offset time is: 2026-07-08 00:25:25