Fixed-function GL differentiates point and directional lights with the w of the position. Is there a branchless way to do that in a shader?
@CastIrony I think not. That’s definitely a common trick in the branchless code toolbox.
-
-
@warrenm I just realized I can do better. A directional light is just a point light whose position varies depending on where it's measured. -
@CastIrony I’m concerned about implementing falloff with this approach, but it’s ripe for further thought. Thanks for the suggestions!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.