Is it possible to make the DirectionalLight component function like a PointLight?

well… you can crank alot more out of the engine, if you know how.

i used the 0, 0, 0 for the shader math. avoids all the direction math trouble in the shader. sun position approximately synced with the directional light angle, for demo purpose. cascaded shadow map is at 0. i coulda added some cascade shadow for the manny in the scene, tho.

i cranked the distance field shadow distances up to create the eclipse beyond shadow map distance. mars is using the “manual point light” calculation. i could put it anywhere and it would always be lit from the center. material is unlit for that very reason. it receives no engine light, but what i calculated manually. and it casts shadows.

so if this was a planetary thing you would always have to calculate the directional light angle to be able to hop planets. you compute the vector towards the center and invert it to get the directional light vector. for the space view you use the manual point light shader.

2 Likes