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

Fix 2019.1 compatibility issue #45

Merged
merged 1 commit into from
May 7, 2019
Merged

Fix 2019.1 compatibility issue #45

merged 1 commit into from
May 7, 2019

Conversation

SetoKaiba
Copy link
Contributor

Referred from vrm-c/UniVRM#237

After a deeper dig, I found out the problem is caused by the line below.
UsePass "Standard/SHADOWCASTER"
The problem is introduced by the new modification on Standard.shader. It uses shader_feature_local instead of shader_feature.
The shader_feature_local will just make the keywords for multi_compile and shader_feature not working anymore.
And also, the problem can't be reverted. Once you compiled the shader with shader_feature_local. Even you remove the lines.
The keyword will still not work.

The temp workaround is to delete the shader. And use the code below for a temp fix. I'll still wait for the replies from official and give more updates here.

			Pass {
				Name "ShadowCaster"
				Tags { "LightMode" = "ShadowCaster" }

				ZWrite On ZTest LEqual

				CGPROGRAM
				#pragma target 3.0

				// -------------------------------------


				#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
				#pragma shader_feature _METALLICGLOSSMAP
				#pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
				#pragma shader_feature _PARALLAXMAP
				#pragma multi_compile_shadowcaster
				#pragma multi_compile_instancing
				// Uncomment the following line to enable dithering LOD crossfade. Note: there are more in the file to uncomment for other passes.
				//#pragma multi_compile _ LOD_FADE_CROSSFADE

				#pragma vertex vertShadowCaster
				#pragma fragment fragShadowCaster

				#include "UnityStandardShadow.cginc"

				ENDCG
			}

@SetoKaiba
Copy link
Contributor Author

#44

@Santarh
Copy link
Owner

Santarh commented May 5, 2019

Thank you for your contribution.

I try to solve this problem with your temp fix and check Unity's version compatibility.

@crazii
Copy link

crazii commented Oct 23, 2020

Sorry for the spam and I can see this issue is closed.
But a Unity related problem led me here and thanks for the info.
Any news from the unity official?

EDIT:
Is there any other workaround instead of deleting the shader?
I tried delete the Library/ShaderCache folder but I didn't work. I'll try deleting the whole Library folder now.

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.

3 participants