View Issue Details

IDProjectCategoryView StatusLast Update
0020128Runner[All Projects] ShadersPublic2018-06-17 21:41
ReporterrcusumanoAssigned ToCoreTech 
PriorityLowSeverityC - GeneralReproducibility100%
Status AssignedResolutionOpen 
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.

http://gmc.yoyogames.com/index.php?showtopic=666995
TagsRunner, Shaders
1.4 Found In1.4.1690
2.x Runtime Found In
2.x Runtime Verified In

Activities

Dan

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).

rcusumano

2016-01-27 20:34

Updater  

bugfog.gmz (21,531 bytes)

rcusumano

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.

rcusumano

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(gl_Position.xyz) - fognear) * rcprange;