You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying out your shader (Absolutely amazing, by the way) and I noticed that when an object moved with the shader applied, it would cause the scanlines on the hologram to stay where they are relative to world space, ruining the hologram effect on fast moving objects.
I wanted to try and fix it myself and then make a PR to your repository but I have no experience in HLSL. So, while I did manage to hack a "fix" in there, I think there should be a better solution compared to what I did.
Here is my workaround to the problem:
I changed o.worldVertex = mul(unity_ObjectToWorld, v.vertex);
To: o.worldVertex = v.vertex
This fixed the problem but the scanlines appeared a lot bigger now since the scanlines' size is now depended on the object's size. So to "fix" that I multiplied v.vertex by 8 and that seemed to get the same visual effect, except now I can rotate and move the object around without the scan lines moving around. It does appear to introduce slight problems with lighting, though.
I hope you can/want to do something with this information to make a fix that is a bit less hacky than what I did.
The text was updated successfully, but these errors were encountered:
Thanks for the feedback, unfortunately object space scanlines can have some very bad results, I will add an option for this so thats up to the user to choose.
I was trying out your shader (Absolutely amazing, by the way) and I noticed that when an object moved with the shader applied, it would cause the scanlines on the hologram to stay where they are relative to world space, ruining the hologram effect on fast moving objects.
I wanted to try and fix it myself and then make a PR to your repository but I have no experience in HLSL. So, while I did manage to hack a "fix" in there, I think there should be a better solution compared to what I did.
Here is my workaround to the problem:
I changed
o.worldVertex = mul(unity_ObjectToWorld, v.vertex);
To:
o.worldVertex = v.vertex
This fixed the problem but the scanlines appeared a lot bigger now since the scanlines' size is now depended on the object's size. So to "fix" that I multiplied
v.vertex
by 8 and that seemed to get the same visual effect, except now I can rotate and move the object around without the scan lines moving around. It does appear to introduce slight problems with lighting, though.I hope you can/want to do something with this information to make a fix that is a bit less hacky than what I did.
The text was updated successfully, but these errors were encountered: