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
"ProjectSettings->Graphics->Standard Shader Quality" is set to "low".
Problem:
Metallic & Specular shader appear with a black diffuse color.
Reproduce:
Set "ProjectSettings->Graphics->Standard Shader Quality" to "low".
Test any 3D model which use metallic or specular setup gltf shader.
Color is black
Technical details:
When mobile platform is set in build settings, usually "Standard Shader Quality" is set to "low".
ProjectSettings->Graphics->Standard Shader Quality
It enables UNITY_NO_FULL_STANDARD_SHADER keyword, which makes ForwardSimple shader feature to be use.
So then VertexOutputBaseSimple vertForwardBaseSimple (VertexInput v) is used (glTFUnityStandardCoreForwardSimple.cginc)
But this function has a problem, it set the o.color BEFORE intialize o.color to zero.
Resulting on diffuse color looking black.
Solution:
in the function VertexOutputBaseSimple vertForwardBaseSimple (VertexInput v) inside "glTFUnityStandardCoreForwardSimple.cginc".
move the following code to the end of the function after UNITY_INITIALIZE_OUTPUT(VertexOutputBaseSimple, o);
Kushulain
changed the title
Metallic & Specular shader color become black on mobile
Metallic & Specular shader color become is on mobile platform
Apr 11, 2023
Kushulain
changed the title
Metallic & Specular shader color become is on mobile platform
Metallic & Specular shader color is black on mobile platform
Apr 11, 2023
dmbond
added a commit
to dmbond/glTFast
that referenced
this issue
Oct 27, 2023
Problem:
Metallic & Specular shader appear with a black diffuse color.
Reproduce:
Technical details:
When mobile platform is set in build settings, usually "Standard Shader Quality" is set to "low".
ProjectSettings->Graphics->Standard Shader Quality
It enables UNITY_NO_FULL_STANDARD_SHADER keyword, which makes ForwardSimple shader feature to be use.
So then
VertexOutputBaseSimple vertForwardBaseSimple (VertexInput v)
is used (glTFUnityStandardCoreForwardSimple.cginc)But this function has a problem, it set the o.color BEFORE intialize o.color to zero.
Resulting on diffuse color looking black.
Solution:
in the function
VertexOutputBaseSimple vertForwardBaseSimple (VertexInput v)
inside "glTFUnityStandardCoreForwardSimple.cginc".move the following code to the end of the function after
UNITY_INITIALIZE_OUTPUT(VertexOutputBaseSimple, o);
The text was updated successfully, but these errors were encountered: