- Home /
¿UsePass overrides Render State?
I'm trying to usepass the sprites-default shader, but it keeps ignoring the SubShader's Render State... For example, this should draw a black square, but it draws normally
Shader "Creado/Sprite Enmascarado" {
Properties {
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_Color("Tint", Color) = (1,1,1,1)
[MaterialToggle] PixelSnap("Pixel snap", Float) = 0
_Mascara("Mascara", Int) = 0
}
SubShader
{
Tags
{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "PreviewType" = "Plane" "CanUseSpriteAtlas" = "True" }
Cull Off
Lighting Off
ZWrite Off
Blend Zero Zero
UsePass "Sprites/Default/"
}
}
I checked the code from the built in shader, and it seems that the Blend is set outside the Pass block... so, I really I'm wondering if this could work at all ¿Am I doing somthing wrong? ¿Is this a bug, or I'm just stupid and didn't get how "UsePass" works?
Comment
I have the same issue. I can't find any clear answer to this Render State not overridden in the shader I'm defining.
I trying to disable ZTest while using default sprite shader pass rendering.