Skip to content

Conversation

@sindharta
Copy link
Collaborator

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the SetupTransparentMode function to be more specific to outline rendering, removing unused legacy code and improving code clarity. The changes focus on consolidating SRP-specific logic and making the naming more descriptive.

Key Changes:

  • Removed the unused srpDefaultLightModeName property that handled legacy render pipeline logic
  • Renamed SetupTransparentMode to SetupTransparentModeForOutline to better reflect its purpose
  • Added SRP-specific preprocessor guards and improved inline documentation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
com.unity.toonshader/Editor/UTS3GUI.cs Removed srpDefaultLightModeName property, renamed function to SetupTransparentModeForOutline, added preprocessor guards, and improved variable naming with inline comments
com.unity.toonshader/Editor/Converter/FromUTS2/BuiltInUTS2toIntegratedConverter.cs Updated function call to use the renamed SetupTransparentModeForOutline method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const string srpDefaultColorMask = "_SPRDefaultUnlitColorMask";
const string srpDefaultCullMode = "_SRPDefaultUnlitColMode";
const string OUTLINE_COLOR_MASK = "_SPRDefaultUnlitColorMask";
const string OUTLINE_CULL_MODE = "_SRPDefaultUnlitColMode";
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'Col' to 'Cull' in constant name.

Suggested change
const string OUTLINE_CULL_MODE = "_SRPDefaultUnlitColMode";
const string OUTLINE_CULL_MODE = "_SRPDefaultUnlitCullMode";

Copilot uses AI. Check for mistakes.
@sindharta sindharta changed the title Srpdefault refactor: clarify Srpdefault Dec 29, 2025
@sindharta sindharta changed the title refactor: clarify Srpdefault refactor: clarify SetupTransparentMode Dec 29, 2025
@sindharta sindharta changed the title refactor: clarify SetupTransparentMode refactor: clarify SetupTransparentMode() that it is for outline usage Dec 29, 2025
@sindharta sindharta changed the title refactor: clarify SetupTransparentMode() that it is for outline usage efactor: clarify that SetupTransparentMode() configures transparency for outline rendering Dec 29, 2025
@sindharta sindharta changed the title efactor: clarify that SetupTransparentMode() configures transparency for outline rendering refactor: clarify that SetupTransparentMode() configures transparency for outline rendering Dec 29, 2025
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.

2 participants