Pherael
Member
|
RE: Billboards not affected by Fog
So, now I'm using VI, and fog works like a charm:
But another problem appear, VI faces don't vanish smoothly in distance (like terrain or other objects or even images draw3d):
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 |
|
Esenthel
Administrator
|
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 |
|
georgatos7
Member
|
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 |
|
Pherael
Member
|
RE: Billboards not affected by Fog
Many thanks, Esenthel I'm going to test it today. Great support
@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 |
|