NewLight Dir

It places a godrays and disk/circle as sun effect in the skybox where it does not parallax, giving the impression that it is nearly infinitely far away. The entity does not contribute any actual lighting (the lighting code is disabled); it is merely a visual representation of the Sun.
Represented by class CNewLightDir.
==Keyvalues==
 
==Inputs==
== Bugs/Limitations ==
====Engine limit====
Level can't have more than one newLight_Dir, otherwise game will crash with this error message. However - you still can spawn new with and kill old if you need to change Godrays position, change color, etc.
File: dirlimit.png | frame | If you'll try to use more than one simultaneously.
----
====Incorrect work with $translucent====
Godrays (also disk) all time fully rendering through textures with material shader parameter $translucent, because of this you will see unexpected results like in the picture. Disable Godrays when you need or use $alphatest if it'll give resualts similar to $translucent. You also can try use some other tricks to escape this problem.
File: GodraysTransBug.png | frame | Bug example in bm_c1a3c.
File: GodraysTransBugSide.png | frame | Sign from other side.
<gallery mode=packed heights=410px>
File: AF1.png | frame | $translucent.
File: AF2.png | frame | $alphatest.
----
====Godrays incorrect work with ====
Godrays change position in sky when player move, this affects to what show when it's enabled. If you want to see in your background level Godrays - place player on needed position. If your moves - attach player to it.
File: cPointViewControlFlareBug.gif | frame | Showcase of problem in background level of Black Mesa: Black Ops - Restored.
----
====Godrays render through 3D Skybox objects====
Unlike Godrays (also disk) render through any object pasted in 3D Skybox environment. Keep in mind this before you will create 3D Skybox.
File: DIRSKYBUG1.png | frame | Clear example (the missiles is 3D Skybox objects).
File: BSDIRSKYBUG.png | frame | In bs_c3m2b level from Black Mesa: Blue Shift.
----
====Godrays incorrect work with cloak====
Cloak is a material shader parameter for VertexLitGeneric shader, female assassins use it to make them transparent when they need it. Godrays all time fully render through them.
File: ASSASINRAYS.png | frame | bm_c2a3c, the sun's rays are not cut off despite the fact that she is completely untransparent right now.
----
====Godrays draw through water====
Deferred lighting don't fully draw through water, unlike Godrays.
File: c3m0c.png | frame | Black Mesa: Blue Shift - bs_c3m0c.
====Godrays can't be displayed in monitors and reflections====
Godrays is post process effect that depends on player screen. That means that they can't water reflections or monitors can't show it.
File: GodraysInWater.png | frame | An example.
File: GodraysInMonitor.png | frame | An example.
----
====Godrays 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.
For examples used this texture with this alpha channel.
File: ATSC_D.png | frame | Diffuse texture.
File: ATSC_A.png | frame | Alpha channel.
Godrays process invisable parts, you can't escape this problem, only minimize effect with $alphatestreference 0.1 or if paint alpha correct channel.
File: GIWTAAA.png | frame | An example.
----
====Godrays does not process surface models====
If player underwater - godrays will not process surface models, only inwater models. Doesn't work with func_water_analog and func_water.
File:GodraysInWater_1.jpg| frame | Player not underwater.
File:GodraysInWater_2.jpg| frame | Player underwater.
== See also ==
* - point deferred light entity.
* - spawner of deferred point lights.
* - cinematic dynamic lens flare.
* - spot deferred light entity.
* - entity that changes deferred light settings.
* - entity that changes godrays settings.
* - deferred cascade sun light entity.
* New Lights Editor - in game deferred lights editor.
* Effect flags - effects flags, some of them are dynamic light effects.
* BlackMesa XenEngine: Part 4 – Lighting & Shadows - page from Chetan (lead programmer for Black Mesa) about new lights.
* BlackMesa XenEngine: Part2 – How a Frame is Rendered - page from Chetan (lead programmer for Black Mesa) about how a frame is rendered.
* BlackMesa XenEngine: Part1 – Heavily Modified Source Engine page from Chetan (lead programmer for Black Mesa) about .