Skip to content

Commit

Permalink
Merge pull request #3124 from erikaharrison-adsk/adsk/bugfix/RemoveDu…
Browse files Browse the repository at this point in the history
…plicate

Autodesk: Remove the duplicate code in basisCurves.glslfx

(Internal change: 2331837)
  • Loading branch information
pixar-oss committed Jun 28, 2024
2 parents 2b3bf68 + 8d3cda3 commit 2e2af7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
12 changes: 2 additions & 10 deletions pxr/imaging/hdSt/shaders/basisCurves.glslfx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2664,8 +2664,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
Expand All @@ -2674,9 +2672,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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2664,8 +2664,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
Expand All @@ -2674,9 +2672,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)) {
Expand Down

0 comments on commit 2e2af7f

Please sign in to comment.