Newxog volume

This is xog (Xen Fog) volume, brush entity that creates a fog transition, making spaces appear deeper than they are.
 Represented by class CNewXogVolume.
==Keyvalues==
==Inputs==
==Bugs/Limitations==
====Xog incorrect work with $translucent====
Xog all time fully rendering through everything with material shader parameter $translucent. This happen because of game can't tell the depth of scene because of the transparency.
File:XBugHah.jpg| No $translucent. Behind the wall placed xog volume and some models with small room.
File:XBugDamn.jpg| With $translucent. Now player see everything, but only what in xog.
Similar issue happen if use $alphatestreference incorrectly.
This problem also applies to brushes which not have $translucent, but which parented to brushes that have this parameter. Similar will happen if brush with $translucent is part of your brush entity. Same will happen if you use overlays/decals on brushes with $translucent.
File:XMS1.jpg| Metal speaker is overlay that use $alphatest, but xog fully visible anyway, because overlay pasted on the transparency window.
This issues does not happen if replace LightmappedGeneric to ShatteredGlass or UnlitGeneric, so, you can use one of them for glass or transparency surfaces when it's needed.
File:XHahF1.jpg| LightmappedGeneric.
File:XHahF2.jpg| ShatteredGlass.
In some cases use $alphatest if it'll give similar to $translucent resualts.
----
====Xog incorrect work with $alphatestreference and $allowalphatocoverage====
$alphatestreference is a material shader parameter that specifies the threshold alpha channel value at which the surface should be transparent instead of opaque, default "0.5". $allowalphatocoverage creates translucent steps based on alpha values. Both have one and same problems with gbuffer.
For examples used this texture with this alpha channel.
File:C_ATSC_D.jpg| Diffuse texture.
File:C_ATSC_A.jpg| Alpha channel.
Here xog placed behind wall with the texture. We can see the circle part of that have alpha channel part which is invisible due to $alphatest, with enabled xog we see that the invisible part doesn't show through itself xog.
File:x_ODSL_1_С.jpg| Xog volume disabled.
File:x_ODSL_2_С.jpg| Xog volume enabled.
If use very low numbers you will see resualts like in the pictures.
File:xCCCC_11.jpg|Xog volume disabled.
File:x_CCCC_12.jpg|Xog volume enabled.
You can't escape this problem, only minimize effect with $alphatestreference 0.1 or if paint alpha correct channel.
----
====Motion blur blurring viewmodel xog layer====
For some reason Motion blur blurring viewmodel xog layer, you can notice this when you just rotate camera. This issue happen even if xog behind other objects.
File: xVLLBASUalt.gif| frame |An example.
----
====Xog incorrect work with -tools====
If you don't use Full Screen - xog will incorrectly applying to screen.
File: XIWWT.gif| frame |An example.
----
====Xog volume doesn't work with 3D Skybox====
Don't use xog volumes in your 3D skyboxes, none of them will work at all.
File:XogIn3DSky.jpg|An example. We see that xog volume works fine, but 3D Skybox don't draw it.
----
====Xog doesn't refract by refract shader and fully draw through====
Unlike deferred lighting, xog doesn't refract by refract shader, also fully draw through.
File:AnXodexample.gif| frame |An example.
If model with refraction behind wall with refraction - this cause issues like this.
File:XogRefractBugs_1.jpg|The magnifying lamps behind the wall with refraction. This wall doesn't show magnifying lamps to escape issues, but xog break this.
Similar issue with cloak material shader parameter.
File:XogAndCloak.jpg|An example with npc_human_assassin.
----
== See also ==
* Xog Editor - the console-based xog editor.
* - global xog, similar to .
* - entity that can change xog settings.
* 
* 
* Fog tutorial
* Fog Basics
* Dust, Fog, & Smoke
* Color Correction
* (entity)
* BlackMesa XenEngine: Part2 – How a Frame is Rendered (page from Black Mesa developer about how a frame rendered and xog.)
* BlackMesa XenEngine: Part1 – Heavily Modified Source Engine (page from Black Mesa developer about Black Mesa engine, better known as Xengine)