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

Upgrade to Unity 2019.4.1f1 #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Josh-McMillan
Copy link

Upgrades to Asset Database 2.0
GitHub corrected Line Ending issues
Shaders upgraded to modern Unity API
Yeah, this is a creative commit...
@Josh-McMillan
Copy link
Author

Found the fix here.
The fix was to go into each shader and modify the code from:

//Cut out polygons
if (distance > unity_FogStart.z + unity_FogColor.a * 255)
{
    o.pos.w = 0;
}

to

//Cut out polygons
if (distance > unity_FogEnd.z + unity_FogColor.a * 255)
{
    o.pos = 0;
}

Small note: I decided to change from getting the FogStart to the FogEnd, so that there were no clipped edges showing in meshes during runtime. It should now prevent the shader from clipping before the fog is set in. Not sure if this is entirely accurate, and can totally be discussed.

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

Successfully merging this pull request may close these issues.

None yet

1 participant