Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

Yup, this is a bug - just did some testing myself and spotlights are lighting up the entire face when my vertex shader is being used.

Thanks for pointing it out, I'll try to get it sorted as soon as I can + let you know when it's fixed.

Ok, so I looked into it and I unfortunately don't think I can do much about it - my vertex shader uses the 'LightMode = Vertex' tag which means that the lighting calculations only take into account the nearest 4 point lights and a directional light. All spotlights are treated as point lights which is why the light radius in the upper image is way bigger.

I can't use the lighting of the legacy vertex shader because its a fixed function shader which has basically no flexibility and means that I can't properly implement the additional retro properties.

Sorry I can't help with this problem - if you're trying to simulate a flashlight, maybe you could approximate the old Source Engine method by attaching a point light to the camera, raycasting from the center of the screen to find the distance to whatever surface the player is looking at, then adjusting the distance of the point light so it's just in front of that surface?

(+1)

Shader code is a mystic magic I may never grasp fully. 

Thank you for looking into it so swiftly.

Haha I don't think I ever will either!

Thanks for the feedback :)