Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: "Material Circle doesn't have _Stencil property UnityEngine.Canvas:SendWillRenderCanvases ()" #115

Open
adrian-miasik opened this issue May 23, 2023 · 1 comment
Assignees
Labels
0. Priority: Low Low Priority PR - This is the lowest and least important priority label. Blocked This PR is currently blocked by another task/event.

Comments

@adrian-miasik
Copy link
Owner

adrian-miasik commented May 23, 2023

Waiting for Unity -> Proper UI support for ShaderGraph

As the title says, there is a warning in our project that is associated with our circle ShaderGraph material. The warning follows:

Material Circle doesn't have _Stencil property
UnityEngine.Canvas:SendWillRenderCanvases ()

We are missing the standard stencil properties in our ShaderGraph Circle shader. These are typically found in Unity's built in UI HLSL shaders and looks like this:

_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255

_ColorMask ("Color Mask", Float) = 15

This warning can be fixed/suppressed by converting the Circle ShaderGraph shader to HLSL and adding the above stencil properties to the shader. Or alternatively, we can wait for Unity to add proper ShaderGraph support for UI based shaders as they road-mapped here: https://portal.productboard.com/8ufdwj59ehtmsvxenjumxo82/c/50-ui-integration-with-shader-graph?utm_medium=social&utm_source=portal_share

Think I'm going to wait for Unity to support UI ShaderGraph shaders.
Seems like it'll be coming in Unity version 2023.2 - beta 16.

@adrian-miasik adrian-miasik added the 0. Priority: Low Low Priority PR - This is the lowest and least important priority label. label May 23, 2023
@adrian-miasik adrian-miasik self-assigned this May 23, 2023
@adrian-miasik adrian-miasik added the Blocked This PR is currently blocked by another task/event. label May 23, 2023
@adrian-miasik
Copy link
Owner Author

Marking issue as blocked until we update the project to the appropriate version, though if someone would like to convert the ShaderGraph shader to HLSL and use the stencil property, I'm open to implementing that solution to circumvent the 'blocker'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Priority: Low Low Priority PR - This is the lowest and least important priority label. Blocked This PR is currently blocked by another task/event.
Projects
None yet
Development

No branches or pull requests

1 participant