robcupisz/LightShafts

Vertex manipulation in shader not affecting light shafts

daterre opened this issue · 4 comments

Hi, I'm trying to use light shafts with a mesh that is animated via vertex shader, and the shafts don't seem to be conforming to the changing mesh. Is this expected? If so, could you offer any pointers as to how I could go about getting this to work? Thanks!

It might work if you duplicate your vertex animation in a shadow caster pass as described here.

It's actually a surface shader that works fine with regular shadows,
('fullforwardshadows') which is why I'm confused.

On Monday, 5 September 2016, Abe Vos notifications@github.com wrote:

It might work if you duplicate your vertex animation in a shadow caster
pass as described here
http://answers.unity3d.com/questions/1001603/shader-lightmode-shadowcaster-question.html
.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABwejFObF8YObU1vLypTBzHeK2VtRXk6ks5qnAS-gaJpZM4J0ZOj
.

web: daterre.com http://daterre.com/
twitter: @tonicwoods https://twitter.com/tonicwoods

http://www.lofipeople.com/

The current implementation uses Depth.shader to render the shadowmaps. You would indeed have to duplicate any vertex animation you do in that shader as well.

Alternatively change LightShafts to use your surface shader for rendering the shadowmap, but make sure the depth that is being output is linear, like in Depth.shader.

Got it. I'll give it a shot and update you. Thanks!