0
Fixed

Bug in Code output when using Directional Lightmap (Likely caused by typo error)

William Lau 10 years ago updated by Freya Holmér (Developer) 9 years ago 6
SF Currently broken for Deferred Lightning + Directional Lightmap due to code bug:
This is the test shader

Image 244

This is the problem in the auto generated shader code:
Image 245
Under review
Hm, yeah. It sort of doesn't make sense to use directional lightmaps when you have no specularity connected, in which case it would be just like using single lightmaps, but with twice as much texture memory being used.

That being said, the shader shouldn't even compile in a directional lightmap pass when no specularity is present. Right now, it's simply because of the pretty naive dependency system I currently have implemented, which I'll have to rewrite instead of patching this up with more duct-tape :)
Directional lightmaps aren't just for specular! Please read up on this - they also store indirect lighting information which is picked up by normals maps. Please do not disable directional lightmaps simply if specular is not used!
Ah yes, that's true, thanks for the heads-up :)
Actually there may be a need in duct tape because if you choose Deferred support in SF, the shader wouldn't compile at all with this error (and also an error with undeclared viewDirection)

In forward mode, the error is simply bypassed and is fine.
This is now fixed in Beta 0.37 / 1.0