public override void GetActiveBlocks(ref TargetActiveBlockContext context)
 {
     // Only support SpriteColor legacy block if BaseColor/Alpha are not active
     bool useLegacyBlocks = !context.currentBlocks.Contains(BlockFields.SurfaceDescription.BaseColor) && !context.currentBlocks.Contains(BlockFields.SurfaceDescription.Alpha);
     context.AddBlock(BlockFields.SurfaceDescriptionLegacy.SpriteColor, useLegacyBlocks);
     
     context.AddBlock(BlockFields.SurfaceDescription.Alpha);
 }
Exemplo n.º 2
0
            //When we first call GetActiveBlocks, we assume any unknown blockfielddescriptors are owned by this target
            public override void GetActiveBlocks(ref TargetActiveBlockContext context)
            {
                if (m_activeBlocks == null)
                {
                    m_activeBlocks = new List <BlockFieldDescriptor>();
                    foreach (var cur in context.currentBlocks)
                    {
                        if (cur.isUnknown && !string.IsNullOrEmpty(cur.displayName))
                        {
                            m_activeBlocks.Add(cur);
                        }
                    }
                }

                foreach (var block in m_activeBlocks)
                {
                    context.AddBlock(block);
                }
            }
Exemplo n.º 3
0
 public override void GetActiveBlocks(ref TargetActiveBlockContext context)
 {
     context.AddBlock(BlockFields.SurfaceDescription.Alpha, (target.surfaceType == SurfaceType.Transparent || target.alphaClip) || target.allowMaterialOverride);
     context.AddBlock(BlockFields.SurfaceDescription.AlphaClipThreshold, target.alphaClip || target.allowMaterialOverride);
 }
        public override void GetActiveBlocks(ref TargetActiveBlockContext context)
        {
            // Vertex
            context.AddBlock(BlockFields.VertexDescription.Position);
            context.AddBlock(BlockFields.VertexDescription.Normal);
            context.AddBlock(BlockFields.VertexDescription.Tangent);

            // Decal
            context.AddBlock(BlockFields.SurfaceDescription.BaseColor, decalData.affectsAlbedo);
            context.AddBlock(BlockFields.SurfaceDescription.Alpha, decalData.affectsAlbedo || decalData.affectsEmission);
            context.AddBlock(BlockFields.SurfaceDescription.NormalTS, decalData.affectsNormal);
            context.AddBlock(UniversalBlockFields.SurfaceDescription.NormalAlpha, decalData.affectsNormal && decalData.affectsNormalBlend);
            context.AddBlock(BlockFields.SurfaceDescription.Metallic, decalData.affectsMAOS);
            context.AddBlock(BlockFields.SurfaceDescription.Occlusion, decalData.affectsMAOS);
            context.AddBlock(BlockFields.SurfaceDescription.Smoothness, decalData.affectsMAOS);
            context.AddBlock(UniversalBlockFields.SurfaceDescription.MAOSAlpha, decalData.affectsMAOS);
            context.AddBlock(BlockFields.SurfaceDescription.Emission, decalData.affectsEmission);
        }
Exemplo n.º 5
0
 public override void GetActiveBlocks(ref TargetActiveBlockContext context)
 {
     context.AddBlock(FullScreenBlocks.colorBlock, true);
 }
Exemplo n.º 6
0
 public override void GetActiveBlocks(ref TargetActiveBlockContext context)
 {
     // Always add the alpha and alpha clip blocks. These may or may not be active depending on the material controls so we have to always add them.
     context.AddBlock(BlockFields.SurfaceDescription.Alpha);
     context.AddBlock(BlockFields.SurfaceDescription.AlphaClipThreshold);
 }