View Issue Details

IDProjectCategoryView StatusLast Update
0020128Runner[All Projects] ShadersPublic2021-07-28 14:15
ReporterrcusumanoAssigned ToCoreTech 
PriorityLowSeverityC - GeneralReproducibility100%
Status ResolvedResolutionFixed 
Product Version 
Target VersionFixed in Version 
Summary0020128: Shaders: Fog uniforms aren't being sent to shaders
DescriptionA custom shader attempting to read gm's fog uniforms will get zeroes.
TagsRunner, Shaders
1.4 Found In1.4.1690
2.x Runtime Found In
2.x Runtime Verified In



2016-01-27 15:29

Adminstrator   ~0041670

Please attach an actual sample which shows the error you have, not just link to an (old) GMC discussion (which in turn has no sample we can work with).


2016-01-27 20:34


bugfog.gmz (21,531 bytes)


2016-01-27 20:36

Updater   ~0041674

I've prepared a sample with three modes. Left click to switch between them.

First mode uses default rendering and draws correctly.

Second mode uses the default fog functions on a custom shader, and that fails.

Third mode uses the default fog functions with custom uniforms, and that looks identical to default rendering.


2016-01-27 20:47

Updater   ~0041675

Last edited: 2016-01-27 20:48

View 2 revisions

By the way, I've found that the default fog used in Studio is linear which looks really weird when you turn around.

I found this formula for quasi - spherical fog that looks more accurate than the current at high fov settings.

fogfac = (length( - fognear) * rcprange;


2021-07-28 14:15

Developer   ~0066521

No longer reproduces in v2.3.3. Closing.