NewLight Point/Bugs and limitations

====Deferred lighting have issues with transparency====
Deferred lighting is incompatible with transparency. In some cases, it shows one of the lighting layers applied to the color of the transparent texture.
This bug is currently available by default for VertexLitGeneric and Lightmapped_4WayBlend, if they are using $translucent material parameter.
File:C BugHah.jpg| frame |No $translucent. Behind the wall placed lighting and some models with small room.
File:C BugDamn.jpg| frame |With $translucent. Now player see everything, but only what lighted.
File:firethinghaha.jpg| frame |An example with model.
The same happen if used $decal material parameter.
File:GbufferDecalBrush.jpg| frame |An example.
This problem also applies to brushes which don't use $translucent, but which is a part of a func entity with a transparency brush (the only exception is ). This happen even if transparency used for shader that doesn't shows one of the lighting layers.
File:C BSFL1.jpg| frame |This sticker is brush, that is part of func_brush, which uses glass as part of itself. Flashlight off.
File:C BSFL2.jpg| frame |This sticker is brush, that is part of func_brush, which uses glass as part of itself. Flashlight on.
If a func entity or model uses render mode (3) or (9) - they will show one of the lighting layers. This means that you can't use this renders to make your brush transparent, you will have to create a separate texture.
File:WSGAGFI.jpg| frame |Clear example. The box with fire extinguisher and brush uses the render modes.
Other render modes will have similar effect, but only for brushes.
File:RenderModesBuggyMine.gif| frame |Clear example.
Similar issue happen with overlays/decals on brushes with $translucent.
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.
In some cases, use $alphatest, if it'll give similar to $translucent resualts, with this your surface also will cast dynamic shadows.
File:C AF1.jpg| frame |$translucent.
File:C AF2.jpg| frame |$alphatest.
----
====Deferred lighting doesn't shows on transparency materials====
Very noticeable with shaders that doesn't shows one of the lighting layers applied to the color of the transparent texture. Properly works with $alphatest.
File:LDSOTM_.jpg| frame |An example. Expected that you will see shadows from the ropes and the plastic road cone on the window.
File:LDSOTM_p2ce.jpg| frame |The same moment, but in (this game uses from .)
----
====Flicker near light volume edges====
Often meeting strange clipping/flickering, strange bug that was in early stages of the game (this can be seen even in videos before new lights release in public). Somehow related to Range value, since changing its value halfway fixes this bug, because it move away the bugged area. With Necro Patch, this is fixed for .
File:cWC1.gif| frame |One of many examples.
File:cWC3.gif| frame |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.
File:C BPl0.jpg| frame |One of examples (mat_wireframe 0).
File:C BPl1.jpg| frame |One of examples (mat_wireframe 1).
File:C BPb0.jpg| frame |One of examples (mat_wireframe 0).
File:C BPb1.jpg| frame |One of examples (mat_wireframe 1).
----
====Deferred lighting shines 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.
File:cSLB1.gif| frame |Black Mesa - bm_c2a2a.
File:cSLB2.gif| frame |Black Mesa: Blue Shift - bs_c0m0c.
----
====Objects with refract shader self refract if illuminated by deferred render====
Objects with refract shader in their own refraction disable self, to escape some problems. However - objects with refract shader illuminated by deferred render refract self because of game can't tell the depth of objects because of the transparency, what you are see in the pictures is just the lighting layer applied to the color of transparency texture.
File:as_c3map01_1.jpg| frame |as_c3map01 - flashlight disabled, everything looks fine.
File:as_c3map01_2.jpg| frame |as_c3map01 - flashlight enabled, now this magnifying lamp refract self.
Similar issue happen if model with refraction behind wall with refraction.
File:RefractBugs_1.jpg| frame |Flashlight disabled, everything looks fine.
File:RefractBugs_2.jpg| frame |Flashlight enabled, now this wall show one of magnifying lamp deferred lighting layers.
----
====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.
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:C DFS2.jpg| frame |Black Mesa - bm_c4a1a.
File:C DFS3.jpg| frame |Black Mesa: Blue Shift - bs_c2m0a.
----
====Motion Blur blurring viewmodel lighting layer====
For some reason Motion Blur blurring viewmodel lighting layer, you can notice this when you just rotate camera.
File: cVLLBASUalt.gif| frame |An example.
----
====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. It is affected by game resolution, for example in bm_c4a1b1 this bug shows up well with a resolution wtih 1920x1080, but with 3840x2160 the light source from the teleporter flickers, but does not form a hole.
File:C_BMSH42.jpg| frame |Example in bm_c4a1b1, the green teleporter light source starts to glitch when player move certain distance (crossbow zoom doesn't effect to this bug, unlike HEV zoom).
File:C_BMSH_1.jpg| frame |Black Mesa, map bm_c4a1b1. NormalBias - 1.
File:C_BMSH_2.jpg| frame |Black Mesa, map bm_c4a1b1. NormalBias - 5.
File:C_BMOBSH_1.jpg| frame |Black Mesa: Black Ops - Restored, bmops_map_2. NormalBias - 0.5.
File:C_BMOBSH_2.jpg| frame |Black Mesa: Black Ops - Restored, bmops_map_2. NormalBias - 1.5.
----
====Gbuffer doesn't draw while cubemaps is building====
Deferred lighting, godrays, xog and other gbuffer effects doesn't draw while cubemaps is building. This means that you will not see any lighting from new lights in cubemaps.
File:GDDWCiB_1.jpg| frame |This is what see player.
File:GDDWCiB_2.jpg| frame |This is what shows cubemap reflection (note the reflection on the RPG doesn't shows any lighting from this crystal).
File:GDDWCiB_3.jpg| frame |This is how it looks while cubemaps is building.
----
====New lights doesn't work with 3D Skybox====
Don't use new lights in your 3D skyboxes, none of them will work at all.
File:C NLDW3DS.jpg| frame |An example. We see that deferred lighting and Godrays works fine, but 3D Skybox doesn't draw both.
----
====Materials reload cause new lights disappear====
Only for new lights which uses shadows. This issue happen when you open Hammer while game is opened, when you disable speculars with mat_specular 0, when you reload all matelias with mat_reloadallmaterials, e. t. c. Can be fixed with save reload.
File:DLDAMR_1.jpg| frame |Before mat_reloadallmaterials.
File:DLDAMR_2.jpg| frame |After mat_reloadallmaterials.
----
====Gbuffer incorrect work with cloak====
Cloak is a material shader parameter for VertexLitGeneric shader, female assassins uses it to make self transparent when they need it. Godrays all time fully render through them, same for deferred lighting and xog, even 
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:C_ASSASINDF.jpg| frame |bm_c2a3c, she is completely untransparent, but we still can see one of lighting layers.
----
====Deferred lighting incorrect work with Customize Character window====
For some reason Customize Character take player's screen, inserts it into character preview window and show one of deferred lighting layers.
File: BruhCharacter.jpg| thumb |An example with zombie scientist model.
----
====Deferred lighting does not draw with -tools====
If you don't use Full Screen - deferred lighting will not draw.
File:DLDNDWT_1.jpg| frame |In Full Screen.
File:DLDNDWT_2.jpg| frame |Out Full Screen.
----
====Broken water transition in viewmodel====
You can note the broken lighting transition when you go into water (only if water is world geometry and uses refractions).
File:watertransbug.gif| frame |An example.
----
====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 (the same issue happen if used material shader parameter $decal). 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:cGodraysTransBug.jpg| frame |Bug example in bm_c1a3c.
File:cGodraysTransBugSide.jpg| frame |Sign from other side.
----
====Godrays fully draws through water====
Deferred lighting doesn't fully draws through water, unlike godrays.
File:C C3m0c.jpg| frame |Black Mesa: Blue Shift - bs_c3m0c.
----
====Godrays leaks====
Due to way how godrays works, in some cases you can note the leaking. Can be drawn even through walls, appearing where they should not be visible at all. Disable rays with triggers or minimize the effect. Because of this, it is not recommanted to use rays in multiplayer, as there is no way to disable rays for each client individually.
File:BmsCodeWeNEED(Someone_from_Valve_please_allow_to_BM_devs_to_publish_the_game_code_to_make_possible_for_us_fix_this_bugs_please).gif| frame |An example.
----
====Godrays doesn't process viewmodel if player is underwater====
Necro Patch fixed the old issue with godrays that wasn't processing models above water. This fix caused new issue, now godrays doesn't process viewmodel if player is underwater. Doesn't happen with func_water and func_water_analog.
File:GDPVIPUU_0.jpg| frame |Player is not underwater.
File:GDPVIPUU_1.jpg| frame |Player is underwater.
----
====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:C GodraysInWater.jpg| frame |An example.
File:C GodraysInMonitor.jpg| frame |An example.
----
====Godrays doesn't refracting by refract shader and fully draws through====
Unlike deferred lighting, godrays doesn't refracting by refract shader, also fully draws through.
File:AnGodexample.gif| frame |An example.
----
====Moving lights with shadows are buggy====
In some cases, your attached lights may have buggy shadows if parent is moving.
File:CSDAIWALOLWS1.gif| frame |An example.
File:cDLWSMB2.gif| frame |bm_c1a1c.
Can be partially fixed with NormalBias value increasing. Also, if your moving light is just simple decoration (the puzzle crystals from Xen is great example) - highly recommended to leave shadows disabled to save limits and performance.
File:MLWSAR1.jpg| frame |NormalBias - 1
File:MLWSAR2.jpg| frame |NormalBias - 10
----
====Shadows incorrect work with newLight_Point cube edges====
Because newLight_Point is cube technically - we get shadows incorrect behavior with edges of this cube, this cause their serious distortion a.k.a. clipping. You only can minimize this if set shadow quality to maximum.
File:cC SIWENCE0.jpg| frame |One of many examples.
File:Ccc_SIWENCE1.jpg| frame |One of many examples.
File:cC SIWENCE_2.jpg| frame |One of many examples.
----
====Shadows have noise====
This noise appeared with Necro Patch, greatly spoils blurry shadows. The only workaround is to make ShadowRadius value very low, but then the shadows will become extremely sharp and stepped.
File:20240320202853_1.jpg| frame |An example.
----
====Shadows doesn'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.
File:cSDAIAR1.gif| frame |With no Level Fade In. It seems like the shadows flicker, which makes it unpleasant for eyes.
File:cSDAIAR2.gif| frame |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.
File:cSDAIWALOLWS1alt.gif| frame |An example.
File:cSDAIWALOLWS2.gif| frame |bm_c2a1a.
----
====Shadows low passes per frame if used a lot of lights with shadows====
Sometimes many lights with shadows sets low values for cvar. This cause shadows to be looking a lot less natural.
File:shadowpascom.gif| frame |nr_shadow_max_passes_per_frame - 16
File:shadowpascom2.gif| frame |nr_shadow_max_passes_per_frame - 28
----
====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.
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: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.
----