About Store Forum Documentation Contact



Post Reply 
Billboards not affected by Fog
Author Message
Pherael Offline
Member

Post: #16
RE: Billboards not affected by Fog
So, now I'm using VI, and fog works like a charm:

[Image: uc?export=download&id=0B2UJDG_6H...VNpRndObUU]

But another problem appear, VI faces don't vanish smoothly in distance (like terrain or other objects or even images draw3d):
[Image: uc?export=download&id=0B2UJDG_6H...zdfYVBlQlU]

Not sure if this is bug or not. Well, if is not, I need value of disappearing factor using by EE, so I could fix it myself using color.
(This post was last modified: 02-05-2015 11:46 AM by Pherael.)
02-05-2015 11:36 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #17
RE: Billboards not affected by Fog
Very cool screens!

set a global var:
Vec2 SkyFracMulAdd;

set this once per frame at start of Draw for example:
Code:
void Draw()
{
   SkyFracMulAdd.set(1/(D.viewRange()*(Sky.frac()-1)), 1+Sky.frac()/(1-Sky.frac()));

and then draw each face using:
Code:
case RM_BLEND:
      {
         VI.image(Images("0bqonix14og4tkuio5oxb_gl"));
         VI.fog  (Kb.ctrl());
         Vtx3DTexCol v[4];
         Vec obj_pos=VecZero;
         Flt d=Dist(obj_pos, Cam.matrix.pos);
         Flt a=d*SkyFracMulAdd.x + SkyFracMulAdd.y;
         Color c=ColorAlpha(a);
         REPAO(v).color=c;
02-05-2015 08:51 PM
Find all posts by this user Quote this message in a reply
georgatos7 Offline
Member

Post: #18
RE: Billboards not affected by Fog
Y the screens look amazing! Among the best foliage screens i've seen.
Also the new VI.fog works great and also VI.image and VI.imagePart will come in handy! Thanks Esenthel.
(This post was last modified: 02-06-2015 11:50 PM by georgatos7.)
02-06-2015 11:42 PM
Find all posts by this user Quote this message in a reply
Pherael Offline
Member

Post: #19
RE: Billboards not affected by Fog
Many thanks, Esenthel smile I'm going to test it today. Great support smile

@georgatos7 Thank you for you nice words. It's took me a long time to get this effect and a lot of experimentation.
02-07-2015 09:05 AM
Find all posts by this user Quote this message in a reply
Post Reply