Template:Archived Page History/NewLight Point: Difference between revisions
MyGamepedia (talk | contribs) m (→See Also) |
MyGamepedia (talk | contribs) m (Jofoyo (BM BS dev) asked me to compress images. Part 1.) |
||
Line 400: | Line 400: | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:BugHah. | File:C BugHah.jpg| frame | No [[$translucent]]. Behind the wall placed lighting and some models with small room. | ||
File:BugDamn. | File:C BugDamn.jpg| frame | With [[$translucent]]. Now player see everything, but only what lighted. | ||
</gallery> | </gallery> | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:GargHah1. | File:C GargHah1.jpg| frame | Scene behide window. Looks like the gargantua has lost its texture and turned white. | ||
File:GargDamn1. | File:C GargDamn1.jpg| frame | Scene out window. This is what should see player. | ||
</gallery> | </gallery> | ||
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. | 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. | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:BSFL1. | File:C BSFL1.jpg| frame | This sticker is brush parented to the glass. Flashlight off. | ||
File:BSFL2. | File:C BSFL2.jpg| frame | This sticker is brush parented to the glass. Flashlight on. | ||
</gallery> | </gallery> | ||
Same will happen if you use [[overlays]]/[[decals]] on brushes with [[$translucent]]. | Same will happen if you use [[overlays]]/[[decals]] on brushes with [[$translucent]]. | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:MS1. | File:C MS1.jpg| frame | Metal speaker is overlay that use [[$alphatest]], but lighting of the health charger visible anyway, because overlay pasted on the transparency window. | ||
</gallery> | </gallery> | ||
This issues not happen if replace [[LightmappedGeneric]] to [[ShatteredGlass]] shader. [[ShatteredGlass]] give similar to [[LightmappedGeneric]] results, so, you can use it for glass or transparency surfaces when it's needed. | This issues not happen if replace [[LightmappedGeneric]] to [[ShatteredGlass]] shader. [[ShatteredGlass]] give similar to [[LightmappedGeneric]] results, so, you can use it for glass or transparency surfaces when it's needed. | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:HahF1. | File:C HahF1.jpg| frame | [[LightmappedGeneric]]. | ||
File:HahF2. | File:C HahF2.jpg| frame | [[ShatteredGlass]]. | ||
</gallery> | </gallery> | ||
In some cases use [[$alphatest]] if it'll give similar to [[$translucent]] resualts, with this your surface also will cast dynamic shadows. | In some cases use [[$alphatest]] if it'll give similar to [[$translucent]] resualts, with this your surface also will cast dynamic shadows. | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:AF1. | File:C AF1.jpg| frame | [[$translucent]]. | ||
File:AF2. | File:C AF2.jpg| frame | [[$alphatest]]. | ||
</gallery> | </gallery> | ||
====Deferred lighting incorrect work with [[$alphatestreference]] and [[$allowalphatocoverage]]==== | ====Deferred lighting incorrect work with [[$alphatestreference]] and [[$allowalphatocoverage]]==== | ||
Line 436: | Line 436: | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File: | File:C_ATSC_D.jpg| frame | Diffuse texture. | ||
File: | File:C_ATSC_A.jpg| frame | Alpha channel. | ||
</gallery> | </gallery> | ||
Here deferred lighting placed behind wall with the texture, lighting is red and shadows is blue. We can see the circle part of that have alpha channel part which is invisible due to $alphatest, with enabled deferred lighting we see that the invisible part doesn't show through itself deferred lighting with shadows. | Here deferred lighting placed behind wall with the texture, lighting is red and shadows is blue. We can see the circle part of that have alpha channel part which is invisible due to $alphatest, with enabled deferred lighting we see that the invisible part doesn't show through itself deferred lighting with shadows. | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File: | File:C_ODSL_1_С.jpg| frame | Dynamic light disabled behind wall with the texture, using standart VRAD light. | ||
File:ODSL_2. | File:C ODSL_2.jpg| frame | Dynamic light enabled behind wall with the texture, not using standart VRAD light. | ||
</gallery> | </gallery> | ||
From the opposite side the invisible part illuminates everything in itself equally, without taking into account decay of light, it's also don't show shadows and other dynamic lights in itself. | From the opposite side the invisible part illuminates everything in itself equally, without taking into account decay of light, it's also don't show shadows and other dynamic lights in itself. | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File: | File:cIIPSEE_.jpg| frame | Dynamic light disabled, using standart VRAD light. | ||
File:IIPSEE. | File:C IIPSEE.jpg| frame | Dynamic light enabled, not using standart VRAD light. | ||
</gallery> | </gallery> | ||
If use very low numbers you will see resualts like in the pictures. | If use very low numbers you will see resualts like in the pictures. | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File: | File:cCCCC_11.jpg| frame | Dynamic light disabled, using standart VRAD light. | ||
File:CCCC_12. | File:C CCCC_12.jpg| frame | Dynamic light enabled, not using standart VRAD light. | ||
</gallery> | </gallery> | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:CCCC_21. | File:C CCCC_21.jpg| frame | Dynamic light disabled, using standart VRAD light. | ||
File: | File:CCCCC_22.jpg| frame | Dynamic light enabled, not using standart VRAD light. | ||
</gallery> | </gallery> | ||
You can't escape this problem, only minimize effect with <code>$alphatestreference 0.1</code> or if paint alpha correct channel. | You can't escape this problem, only minimize effect with <code>$alphatestreference 0.1</code> or if paint alpha correct channel. | ||
Line 467: | Line 467: | ||
<br> | <br> | ||
<gallery mode=packed heights=710px> | <gallery mode=packed heights=710px> | ||
File: | File:c_GIWTAAA.jpg| frame | An example. | ||
</gallery> | </gallery> | ||
You can't escape this problem, only minimize effect with <code>$alphatestreference 0.1</code> or if paint alpha correct channel. | You can't escape this problem, only minimize effect with <code>$alphatestreference 0.1</code> or if paint alpha correct channel. | ||
Line 474: | Line 474: | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File: | File:cGodraysTransBug.jpg| frame | Bug example in bm_c1a3c. | ||
File: | File:cGodraysTransBugSide.jpg| frame | Sign from other side. | ||
</gallery> | </gallery> | ||
====Godrays draw through water==== | ====Godrays draw through water==== | ||
Line 481: | Line 481: | ||
<br> | <br> | ||
<gallery mode=packed heights=710px> | <gallery mode=packed heights=710px> | ||
File: | File:C C3m0c.jpg| frame | Black Mesa: Blue Shift - bs_c3m0c. | ||
</gallery> | </gallery> | ||
====Godrays may leak in some cases==== | ====Godrays may leak in some cases==== | ||
Line 493: | Line 493: | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:GodraysInWater. | File:C GodraysInWater.jpg| frame | An example. | ||
File:GodraysInMonitor. | File:C GodraysInMonitor.jpg| frame | An example. | ||
</gallery> | </gallery> | ||
====Weird clipping==== | ====Weird clipping==== | ||
Line 508: | Line 508: | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:BPl0. | File:C BPl0.jpg| frame | One of examples (mat_wireframe 0). | ||
File:BPl1. | File:C BPl1.jpg| frame | One of examples (mat_wireframe 1). | ||
</gallery> | </gallery> | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:BPb0. | File:C BPb0.jpg| frame | One of examples (mat_wireframe 0). | ||
File:BPb1. | File:C BPb1.jpg| frame | One of examples (mat_wireframe 1). | ||
</gallery> | </gallery> | ||
====Shadows incorrect work with [[newLight_Point]] cube edges==== | ====Shadows incorrect work with [[newLight_Point]] cube edges==== | ||
Line 520: | Line 520: | ||
<br> | <br> | ||
<gallery mode=packed heights=710px> | <gallery mode=packed heights=710px> | ||
File:SIWENCE0. | File:C SIWENCE0.jpg| frame |One of many examples. | ||
File:SIWENCE1. | File:C SIWENCE1.jpg| frame |One of many examples. | ||
File:SIWENCE_2. | File:C SIWENCE_2.jpg| frame |One of many examples. | ||
</gallery> | </gallery> | ||
====Deferred lighting shine through [[nodraw]] texture==== | ====Deferred lighting shine through [[nodraw]] texture==== | ||
Line 558: | Line 558: | ||
<br> | <br> | ||
<gallery mode=packed heights=710px> | <gallery mode=packed heights=710px> | ||
File:DFS1Alt. | File:C DFS1Alt.jpg| frame |Clear example in test map, the hivehand illuminated by deferred render draw in the refract texture, plus it's completely discolored there.. | ||
File:DFS2. | File:C DFS2.jpg| frame |Black Mesa - bm_c4a1a. | ||
File:DFS3. | File:C DFS3.jpg| frame |Black Mesa: Blue Shift - bs_c2m0a. | ||
</gallery> | </gallery> | ||
====Viewmodel doesn't support self-shadowing with deferred ligths==== | ====Viewmodel doesn't support self-shadowing with deferred ligths==== | ||
Line 566: | Line 566: | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:CSMSF. | File:C CSMSF.jpg| frame | Here you can see how one of gluon gun switches create shadow that fall on other part of gun. | ||
File:DFSF. | File:C DFSF.jpg| frame | Light spot illuminates gluon gun, but lighting just ignore viewmodel and fully shine through, although only the side of the gun should be light. | ||
</gallery> | </gallery> | ||
====Godrays and deferred lighting incorrect work with cloak==== | ====Godrays and deferred lighting incorrect work with cloak==== | ||
Line 573: | Line 573: | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File: | File:C_ASSASINRAYS.jpg| frame | bm_c2a3c, the sun's rays are not cut off despite the fact that she is completely untransparent right now. | ||
File: | File:C_ASSASINDF.jpg| frame | bm_c2a3c, she is completely untransparent, but we still can see one of lighting layers. | ||
</gallery> | </gallery> | ||
====Godrays doesn't refract by refract shader and fully draw through==== | ====Godrays doesn't refract by refract shader and fully draw through==== | ||
Line 591: | Line 591: | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File: | File:C_BMSH_1.jpg| frame | Black Mesa, map bm_c4a1b1. NormalBias - 1. | ||
File: | File:C_BMSH_2.jpg| frame | Black Mesa, map bm_c4a1b1. NormalBias - 5. | ||
</gallery> | </gallery> | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File: | File:C_BMOBSH_1.jpg| frame | Black Mesa: Black Ops - Restored, bmops_map_2. NormalBias - 0.5. | ||
File: | File:C_BMOBSH_2.jpg| frame | Black Mesa: Black Ops - Restored, bmops_map_2. NormalBias - 1.5. | ||
</gallery> | </gallery> | ||
====Weapons dynamic light incorrect work with damaged [[func_breakable_surf]]==== | ====Weapons dynamic light incorrect work with damaged [[func_breakable_surf]]==== | ||
Line 610: | Line 610: | ||
<br> | <br> | ||
<gallery mode=packed heights=710px> | <gallery mode=packed heights=710px> | ||
File:NLDW3DS. | File:C NLDW3DS.jpg| frame |An example. We see that deferred lighting and Godrays works fine, but 3D Skybox don't draw both. | ||
</gallery> | </gallery> | ||
====Motion blur blurring viewmodel lighting layer==== | ====Motion blur blurring viewmodel lighting layer==== |
Revision as of 01:48, 21 December 2023
It is one of the many new lighting entities available. Black Mesa incorporates a new lighting system which utilizes Deferred lighting to create dynamic lighting system with dynamic shadows, which allows to complement and quite enliven some scenes, it is also nice effect for moving objects, such as trains. It is also include fine tuning Godrays and lightcookies.
Keyvalues
- Name (targetname) <string>
- The name that other entities refer to this entity by.
- Parent (parentname) <targetname>
- The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
- Pitch Yaw Roll (Y Z X) (angles) <angle> !FGD
- This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

- Enabled (Enabled) <choices>
- Enable/Disable this Entity.
Determines if the light is off at level start.
- 0: Enabled
- 1: Disabled
- Appearance (FlareStyle) <choices>
- Template:Light appearances
- Light Color (LightColor) <color255>
- This is the color of the sunlight.
Determines color of light.
- Light Ambient Color (LightColorAmbient) <color255>
- This is the ambient color of the sunlight.
Determines color of shadows that light source creates.
|
- Light Intensity (Intensity) <float>
- RGB * Intensity.
Brightness of the light.

- SpecularMultiplier (SpecMultiplier) <float>
- 0 to 1 RGB * Intensity * SpecularMultiplier.
Brightness of the specular shader from this light source.
|
- Range (Range) <float>
- Range.
How far the light source illuminates. Measured in Hammer Units.

|
- Light Type (LightType) <choices>
- Determines the light type.
- 0: Static - shadows are cast only by static objects (prop_static, geometry, etc.). Lighting does not update if it has parent (use if part scene has no large moving parts, or shadow accuracy is not important).
- 1: Stationary - shadows are cast by static and dynamic objects, lighting does not update if it has a parent.
Important:Shadows for dynamic props update, but not dynamic geometry!
- 2: Dynamic - shadows are cast by static and dynamic objects, lighting updates if it does have a parent. This light is quite expensive, and should only be used for moving light sources, and if your scene have moving geometry.
|
- HasShadow (HasShadow) <choices>
- Do you want this light to have shadows?
Determines whether the light source will cast shadows. Remember that default choices is No.
- 0: No
- 1: Yes
|

|
- ShadowMapLOD (ShadowLod) <choices>
- Resolution of ShadowMap used by this light.
Determines quality of shadows. 1024 is very expensive, use it only in places where it's really needed, in most cases 512 is good alternative. 256 produces the blurriest shadows, but it is also the cheapest.
- 0: 256
- 1: 512
- 2: 1024
|

- ShadowFaceX (ShadowFaceX) <choices>
- Shadow Enabled for this Face ?
Determines whether the given side lighting will display shadows.
- 0: Enabled
- 1: Disabled
- ShadowFaceX_Minus (ShadowFaceX_Minus) <choices>
- Shadow Enabled for this Face ?
Determines whether the given side lighting will display shadows.
- 0: Enabled
- 1: Disabled
- ShadowFaceY (ShadowFaceY) <choices>
- Shadow Enabled for this Face ?
Determines whether the given side lighting will display shadows.
- 0: Enabled
- 1: Disabled
- ShadowFaceY_Minus (ShadowFaceY_Minus) <choices>
- Shadow Enabled for this Face ?
Determines whether the given side lighting will display shadows.
- 0: Enabled
- 1: Disabled
- ShadowFaceZ (ShadowFaceZ) <choices>
- Shadow Enabled for this Face ?
Determines whether the given side lighting will display shadows.
- 0: Enabled
- 1: Disabled
- ShadowFaceZ_Minus (ShadowFaceZ_Minus) <choices>
- Shadow Enabled for this Face ?
Determines whether the given side lighting will display shadows.
- 0: Enabled
- 1: Disabled
- NearZ (NearZ) <float>
- NearZ used by shadowmap camera for this light.
Determines distance at which light source will cast shadows.
- DepthBias (DepthBias) <float>
- DepthBias - Offset added to depth values in shadowmaps.
- SlopeDepthBias (SlopeDepthBias) <float>
- Slope Depth Bias - For surfaces having aliasing due to steep angles with light.
- NormalBias (NormalBias) <float>
- While rendering objects into shadow maps, each vertex will be moved along -ve Normal direction, giving it an appearance of shrinking while rendering to shadow maps. This property determines the amount of Units to be moved. Helps with shadow aliasing.
|

|
- ShadowRadius (ShadowRadius) <float>
- Radius of shadow edges for soft shadows. If its value is negative, code will auto assign a value depending on shadowlod. These code based values can be adjusted via convars nr_shadow_rad_High,nr_shadow_rad_Med and nr_shadow_rad_Low.
Determines shadow blur. Low numbers are expensive to render.
|
- Enable Texture Light (bTexLight) <choices>
- Enable Texture Ligh.
Determines whether the given light source uses .vtf texture from game files (just like env_projectedtexture). With NewLight_Point, this technically works like a cube. A great example is the batteries that use lights/lightcookie_battery.vtf.
- 0: Disabled
- 1: Enabled
|

- Texture name for TexLight (texName) <string>
- Texture name for Texture shadows.
Determines which texture will use light source. It use .vtf files, not .vmt.
- .Enable Prop Only Mode (bNegLight) <choices>
- Enable Prop Only Mode.
- 0: Disabled
- 1: Enabled
- LightnGodRayMode (LightnGodRayMode) <choices>
- 0:Light 1:Godrays 2:Both Light and GodRays.
- 0: Light
- 1: Godrays
- 2: Both Light and GodRays
|
- EnableGodRays (EnableGodRays) <choices>
- Enable GodRays.
Determines whether godrays are enabled or not at map start.
- 0: Disabled
- 1: Enabled


|
- Density (Density) <float>
- Density Controls the length of rays/volumetric shadows. 1.0 should work in 99% cases. Good values to start from: 0.5 to 1.5.
|
- Weight (Weight) <float>
- Weight Controls the intensity of volumetric shadow. Blocking of rays by geometry. Good values to start from: 0.1 - 10.0.
|
- Decay (Decay) <float>
- Decay NOT being used.
- Exposure (Exposure) <float>
- Exposure Controls the intensity of Rays during blending pass with main scene. 2.0 is a good start. Good values are 1.0 - 10.0.
|
- DistFactor (DistFactor) <float>
- DistFactor Controls the falloff of rays / length. 1.0f is a good starting value increase or decrease in the increments of 0.1. 0.0 will make the rays dissappear only disk will be rendererd.
|
- DiskRadius (DiskRadius) <float>
- Radius of Disk/circle of sun in texturespace. 1.0 will be full screen 0.5 is half screen etc.
|

- ColorInner (ColorInner) <color255>
- This is the color of the inner circle.
|

- ColorRays (ColorRays) <color255>
- This is the color of the rays.
|

- GodRaysType (GodRaysType) <choices>
- GodRaysType.
- 0: Normal
- 1: Fancy
|
- DiskInnerSizePercent (DiskInnerSizePercent) <float>
- Used only in Fancy Gaphics Mode. Disk inner circle radius = DiskRadius * DiskInnerSizePercent.
|

- ColorOuter (ColorOuter) <color255>
- Used only in Fancy Mode. This is the color of the outer circle.
|

- Ell_FR_ConstA (Ell_FR_ConstA) <float>

|
- Ell_FR_ConstB (Ell_FR_ConstB) <float>

|
- EEll_SR_ConstA (EEll_SR_ConstA) <float>
- EEll_SR_ConstB (EEll_SR_ConstB) <float>
- Ell_RRF_ConstA (Ell_RRF_ConstA) <float>

|
- Ell_RRF_ConstB (Ell_RRF_ConstB) <float>

|
- RotSpeed (RotSpeed) <float>
Determines rotating speed of fancy rays, 0 - don't rotate, negative number - will rotate to left.

|
- RotPatternFreq (RotPatternFreq) <float>
Determines count of fancy rays in frame, with negative number will deny RotSpeed +/- effect.

|
- RenderInWorldSpace (m_bEnableWorldSpace) <choices>
- Disables disks if this enabled.
- 0: Disabled
- 1: Enabled
- m_fAlphaDiskInner (m_fAlphaDiskInner) <float>
- m_fAlphaDiskOuter (m_fAlphaDiskOuter) <float>
- UseToneMapRays (m_bUseToneMapRays) <choices>
- 0: Enabled
- 1: Disabled
- UseToneMapDisk (m_bUseToneMapDisk) <choices>
- 0: Enabled
- 1: Disabled
- ShadowPass_Brush (m_bSRO_Brush) <choices>
- Do we want to Render Brushes in shadow passes for this light?
- 0: YES
- 1: NO
- ShadowPass_StaticProp (m_bSRO_StaticProp) <choices>
- Do we want to Render StaticProps in shadow passes for this light?
- 0: YES
- 1: NO
- ShadowPass_DynProp (m_bSRO_DynProp) <choices>
- Do we want to Render Dynamic Props in shadow passes for this light?
- 0: YES
- 1: NO
- ShadowPass_AlphaTest (m_bSRO__Trans) <choices>
- Do we want to Render AlphaTested Objects in shadow passes for this light?
- 0: YES
- 1: NO
Inputs
- SetColorLight
- <color255>. Change Light's Color value. Doesnt effect the godrays
- SetIntensityForLight
- <float>. Change Light's intensity value. Doesnt effect the godrays
- TurnOnGodRays
- Turn the Godrays on.
- TurnOffGodRays
- Turn the Godrays off.
- TurnOn
- Turn the light on.
- TurnOff
- Turn the light off.
- Toggle
- Toggle the light's current state.
Outputs
Issues
Deferred lighting incorrect work with $translucent
Deferred lighting all time rendering through walls with material shader parameter $translucent. This happen because of game can't tell the depth of scene because of the transparency, what you are see in the picture is just the lighting layer applied to the color of transparency texture.
No $translucent. Behind the wall placed lighting and some models with small room.
With $translucent. Now player see everything, but only what lighted.
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.
Metal speaker is overlay that use $alphatest, but lighting of the health charger visible anyway, because overlay pasted on the transparency window.
This issues not happen if replace LightmappedGeneric to ShatteredGlass shader. ShatteredGlass give similar to LightmappedGeneric results, so, you can use it for glass or transparency surfaces when it's needed.
In some cases use $alphatest if it'll give similar to $translucent resualts, with this your surface also will cast dynamic shadows.
Deferred lighting 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 deferred lighting.
For examples used this texture with this alpha channel.
Here deferred lighting placed behind wall with the texture, lighting is red and shadows is blue. We can see the circle part of that have alpha channel part which is invisible due to $alphatest, with enabled deferred lighting we see that the invisible part doesn't show through itself deferred lighting with shadows.
From the opposite side the invisible part illuminates everything in itself equally, without taking into account decay of light, it's also don't show shadows and other dynamic lights in itself.
If use very low numbers you will see resualts like in the pictures.
You can't escape this problem, only minimize effect with $alphatestreference 0.1
or if paint alpha correct channel.
Godrays incorrect work with $alphatestreference and $allowalphatocoverage
Godrays process invisable parts, you can't escape this problem, only minimize effect with $alphatestreference 0.1
or if paint alpha correct channel.
You can't escape this problem, only minimize effect with $alphatestreference 0.1
or if paint alpha correct channel.
Godrays 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.
Godrays draw through water
Deferred lighting don't fully draw through water, unlike Godrays.
Godrays may leak in some cases
Due to way Godrays works, in some cases they can be drawn through walls, appearing where they should not be visible at all. Disable rays with triggers or minimize effect.
- Bmsleak(Someone from Valve please allow to BM devs to publish the game code to make possible for us fix this bugs please).gif
An example.
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.
Weird clipping
Often meeting strange clipping/flickering, strange phenomenon that also was in early stages of the game, this does not depend on OS or drivers, despite this there are rumors that this occurs most often among users of Linux. There is no known way to deal with this, most often happen with NewLight_Spot.
- WC1.gif
One of many examples.
- WC2.gif
One of many examples.
- WC3.gif
One of many examples.
Brush polygons may clip deferred lighting
Rare phenomenon, sometimes brush polygons clip deferred lighting, the reason that cause this is unknown. Can be easy fixed if divide invalid brush into two parts.
Shadows incorrect work with newLight_Point cube edges
Because newLight_Point arу cube technically - we get shadows incorrect behavior with edges of this cube, this can sometimes lead to their serious distortion a.k.a. clipping. You only can minimize this if set shadow quality to maximum.
Deferred lighting shine through nodraw texture
Not a bug, but a pattern. Unfortunately, this cannot be controlled in any way, you should keep in mind this before paint nodraw to escape situations like in the gifs. If your dynamic light source illuminates face that player never see - use cheap textures with low resolution and which don't use material shader parameters, a good solution would be tools/toolsblack or any
UnlitGeneric
texture.
- SLB1.gif
Black Mesa - bm_c2a2a.
- SLB2.gif
Black Mesa: Blue Shift - bs_c0m0c.
Shadows don't appear immediately after reload
After game save and load shadows don't appear for short time, maybe it has something to do with caching. This appearance duration may vary depending on power of user PC and how much of lights with enabled shadows are turned on at level, but in any case user will get this issue even with most powerful PC. Enable in worldspawn settings Level Fade In
to hide this problem, this setting also will hide some other problems with loads that avaible in Black Mesa.
- SDAIAR1.gif
With no
Level Fade In
. It seems like the shadows flicker, which makes it unpleasant for eyes. - SDAIAR2.gif
With
Level Fade In
. Everything looks fine.
Shadows don't appear immediately with a lot of lights with shadows
If your level use a lot of lights with shadows - shadows from enabling lights will not appear immediately, this happens if light source was disabled and if player's camera did not see this light source enabled initially.This happen because shadows use passes per frame for memory, if level use a lot of new lights - game change integer value of cvar nr_shadow_max_passes_per_frame
to lower numbers. Can be fixed if change cvar value with point_servercommand to 25
or if enable light source at level start and keep it enabled before drawing of level allows player's camera to see this light source, disable this light source and than enable when we need this.
Dynamic lights with shadows may buggy
In some cases your attached lights may have buggy shadows if parent moving, work smart when use this feature. If your moving light is decoration - highly recommended to leave shadows disabled to save limits and performance.
- DLWSMB1.gif
An example.
- DLWSMB2.gif
bm_c1a1c.
Viewmodel illuminated by deferred render draw in refract shader
Refract shader and Water shader take and refract player screen space without taking into account viewmodel. However - viewmodel illuminated by deferred render draw in refract shader because of game can't tell the depth of viewmodel because of the transparency, what you are see in the pictures is just the lighting layer applied to the color of transparency texture.
Viewmodel doesn't support self-shadowing with deferred ligths
Unlike cascade shadows - viewmodel doesn't support self-shadowing with deferred ligths. Not a bug, but this is not what you expect from real life, it also isn't so with env_projectedtexture.
Godrays and deferred lighting 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, same for deferred lighting.
Godrays doesn't refract by refract shader and fully draw through
Unlike deferred lighting Godrays doesn't refract by refract shader, also fully draw through.
Strange "holes" when player's camera is at a great distance
In some cases may will appear strange "holes" when player's camera is at a great distance. Strange bug that occurs quite rarely, can be fixed if increase NormalBias
number.

- AnFuexample.gif
Example in bm_c4a1b1, the green teleporter light source starts to glitch when player move certain distance.
Weapons dynamic light incorrect work with damaged func_breakable_surf
For some reason weapons dynamic light can illuminate damaged func_breakable_surf even if position of it very far from position of damaged func_breakable_surf.

New lights don't work with 3D Skybox
Don't use new lights in your 3D skyboxes, none of them will work at all.
Motion blur blurring viewmodel lighting layer
For some reason Motion blur
blurring viewmodel lighting layer, you can notice this when you just rotate camera.
See Also
- light_spot
- env_lensflare
- newLight_Dir
- Lighting
- Adding Light
- Intermediate Lighting
- Advanced Lighting
- Effect flags (dynamic light effects)
- Tool textures (for Block light)
- BlackMesa XenEngine: Part 4 – Lighting & Shadows (page from Black Mesa developer about new lights)
- BlackMesa XenEngine: Part2 – How a Frame is Rendered (page from Black Mesa developer about how a frame rendered, include Godrays.)