View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0020128||Runner||[All Projects] Shaders||Public||2016-01-26 19:11||2021-07-28 14:15|
|Priority||Low||Severity||C - General||Reproducibility||100%|
|Target Version||Fixed in Version|
|Summary||0020128: Shaders: Fog uniforms aren't being sent to shaders|
|Description||A custom shader attempting to read gm's fog uniforms will get zeroes.|
|1.4 Found In||1.4.1690|
|2.x Runtime Found In|
|2.x Runtime Verified In|
||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).|
bugfog.gmz (21,531 bytes)
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.
Last edited: 2016-01-27 20:48
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;
No longer reproduces in v2.3.3. Closing.