Skip to content

Commit

Permalink
fix albedoScaleAndCutOff type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jk20012001 committed Sep 19, 2023
1 parent 608660a commit 81f99b3
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CCEffect %{
emissiveMap: { value: grey, editor: { displayName: EmissiveColorMap } }
alphaSource: { value: 1.0, editor: { slide: true, range: [0, 1.0], step: 0.001 } }
alphaSourceMap: { value: grey, editor: { parent: USE_OPACITY_MAP } }
alphaThreshold: { value: 0.5, target: albedoScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST, slide: true, range: [0, 1.0], step: 0.001 } }
alphaThreshold: { value: 0.5, editor: { parent: USE_ALPHA_TEST, slide: true, range: [0, 1.0], step: 0.001 } }
normalStrength: { value: 1.0, editor: { parent: USE_NORMAL_MAP, slide: true, range: [0, 1.0], step: 0.001 } }
normalMap: { value: normal }
- &forward-add
Expand Down Expand Up @@ -55,8 +55,8 @@ CCEffect %{
properties:
tilingOffset: { value: [1.0, 1.0, 0.0, 0.0] }
mainColor: { value: [1.0, 1.0, 1.0, 1.0], target: albedo, editor: { displayName: Albedo, type: color } }
albedoScale: { value: [1.0, 1.0, 1.0], target: albedoScaleAndCutoff.xyz }
alphaThreshold: { value: 0.5, target: albedoScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST } }
albedoScale: { value: 1.0, editor: { displayName: BaseWeight } }
alphaThreshold: { value: 0.5, editor: { parent: USE_ALPHA_TEST } }
mainTexture: { value: grey, target: albedoMap, editor: { displayName: AlbedoMap } }
alphaSource: { value: 1.0, editor: { slide: true, range: [0, 1.0], step: 0.001 } }
alphaSourceMap: { value: grey, editor: { parent: USE_OPACITY_MAP } }
Expand Down Expand Up @@ -96,7 +96,6 @@ CCProgram shared-ubos %{
uniform Constants {
vec4 tilingOffset;
vec4 albedo;
vec4 albedoScaleAndCutoff;
vec4 emissive;
float emissiveScale;
float occlusion;
Expand All @@ -105,6 +104,7 @@ CCProgram shared-ubos %{
float normalStrength;
float alphaSource;
float albedoScale;
float alphaThreshold;
float specularIntensity;
};
}%
Expand Down Expand Up @@ -237,7 +237,7 @@ CCProgram surface-fragment %{
#endif
#endif
#if USE_ALPHA_TEST
if (baseColor.a < albedoScaleAndCutoff.w) discard;
if (baseColor.a < alphaThreshold) discard;
#endif
return baseColor;
}
Expand Down Expand Up @@ -265,7 +265,7 @@ CCProgram surface-fragment %{
#endif
#endif

if (alpha < albedoScaleAndCutoff.w) discard;
if (alpha < alphaThreshold) discard;
#endif
}

Expand Down

0 comments on commit 81f99b3

Please sign in to comment.