From 8d3cda3a010cea9a11ec3ea2cbcc27e5c51c0e90 Mon Sep 17 00:00:00 2001 From: wanxia Date: Wed, 5 Jun 2024 16:12:01 +0800 Subject: [PATCH] Remove the duplicate code in basisCurves.glslfx --- pxr/imaging/hdSt/shaders/basisCurves.glslfx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pxr/imaging/hdSt/shaders/basisCurves.glslfx b/pxr/imaging/hdSt/shaders/basisCurves.glslfx index 127d8ef737..4b973a03bc 100644 --- a/pxr/imaging/hdSt/shaders/basisCurves.glslfx +++ b/pxr/imaging/hdSt/shaders/basisCurves.glslfx @@ -1186,8 +1186,6 @@ void main(void) #ifdef HD_HAS_displayOpacity color.a = HdGet_displayOpacity(); #endif - color.rgb = ApplyColorOverrides(color).rgb; - vec3 Peye = inData.Peye.xyz / inData.Peye.w; // We would like to have a better oriented normal here, however to keep the @@ -1196,9 +1194,7 @@ void main(void) vec4 patchCoord = vec4(0); - color.rgb = mix(color.rgb, - ShadingTerminal(vec4(Peye, 1), Neye, color, patchCoord).rgb, - GetLightingBlendAmount()); + color = ShadingTerminal(vec4(Peye, 1), Neye, color, patchCoord); #ifdef HD_MATERIAL_TAG_MASKED if (ShouldDiscardByAlpha(color)) { @@ -1239,16 +1235,12 @@ void main(void) #ifdef HD_HAS_displayOpacity color.a = HdGet_displayOpacity(); #endif - color.rgb = ApplyColorOverrides(color).rgb; - vec3 Peye = inData.Peye.xyz / inData.Peye.w; vec3 Neye = fragmentNormal(Peye, inData.Neye, v); vec4 patchCoord = vec4(0); - color.rgb = mix(color.rgb, - ShadingTerminal(vec4(Peye, 1), Neye, color, patchCoord).rgb, - GetLightingBlendAmount()); + color = ShadingTerminal(vec4(Peye, 1), Neye, color, patchCoord); #ifdef HD_MATERIAL_TAG_MASKED if (ShouldDiscardByAlpha(color)) {