Skip to content
Discussion options

You must be logged in to vote

Directional light sources are modelled to be at infinity and have parallel rays. As such they do not have a position in practical terms and only the rotation matters. The direction of the light is defined by the forward direction and by default the -z axis is forwards (right-handed, y-up, z points backwards and -z is forwards). Rotations are then applied to a Vec3 of (0,0,-1) to calculate the transform’s forward direction. Shadows are more complicated and not so usable yet for directional lights but I am finishing off an automatic shadow implementation for directional lights right now.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@strattonbrazil
Comment options

@superdump
Comment options

@strattonbrazil
Comment options

Answer selected by strattonbrazil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants