Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertex manipulation in shader not affecting light shafts #14

Open
daterre opened this issue Sep 3, 2016 · 4 comments
Open

Vertex manipulation in shader not affecting light shafts #14

daterre opened this issue Sep 3, 2016 · 4 comments

Comments

@daterre
Copy link

daterre commented Sep 3, 2016

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!

@AbeVos
Copy link

AbeVos commented Sep 5, 2016

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

@daterre
Copy link
Author

daterre commented Sep 5, 2016

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 [email protected] 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/

@robcupisz
Copy link
Owner

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.

@robcupisz robcupisz reopened this Sep 6, 2016
@daterre
Copy link
Author

daterre commented Sep 6, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants