Jump to content

How to instantiate fog?


 Share

Recommended Posts

I know from reading the forums and docs that fog is part of the camera, but not sure how to turn it on/off, color it and set it's range, etc.

I am using the FPS player camera and there are no functions for fog in it.  Do I have to add it by hand?  Is there a set of code fragments on how to do this?

Also, does it work indoors?  I have a sewer system in place and I would love to have a bit of fog on the floor that is semi-transparent.  Can this be done and if so, how?

Thanks.

Mike

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 980 GTX with 16gb vram / SSD drives

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1060 GTX with 8gb vram / SSD drives

Alienware Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1070 Ti with 16gb vram / SSD drives

My Patreon page: https://www.patreon.com/michaelfelkercomposer

My music for sale: https://www.tgcstore.net/category/513?format=all&perpage=30&textures=undefined&price=all&order=default&artists[]=87213

Custom synths and sounds - http://www.supersynths.com

Link to comment
Share on other sites

  • 3 weeks later...
2 hours ago, imothep85 said:

i tried to change the color of it  

//Fog color.  Use alpha for transparency
uniform vec4 fogcolor = vec4(243,176,161 ,0.45)

 

but nothing change the fog stay white :s;

Leadwerks Engine colors are on a scale of 0-1 not 0-255. Essentially you just set the color to (1,1,1,0.45). The only thing that uses the 0-255 scale is the color picker in the Editor but it is set by the 0-1 scale and it will return the 0-1 scale.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...