public override AbstractShaderProperty Copy()
        {
            var copied = new CubemapShaderProperty();

            copied.displayName = displayName;
            copied.value       = value;
            return(copied);
        }
예제 #2
0
        public AbstractShaderProperty AsShaderProperty()
        {
            var prop = new CubemapShaderProperty {
                value = m_Cubemap
            };

            if (cubemap != null)
            {
                prop.displayName = cubemap.name;
            }
            return(prop);
        }
예제 #3
0
        public override void AddDefaultProperty(PropertyCollector properties, GenerationMode generationMode)
        {
            var nodeOwner = owner as AbstractMaterialNode;

            if (nodeOwner == null)
            {
                throw new Exception(string.Format("Slot {0} either has no owner, or the owner is not a {1}", this, typeof(AbstractMaterialNode)));
            }

            var prop = new CubemapShaderProperty();

            prop.overrideReferenceName = nodeOwner.GetVariableNameForSlot(id);
            prop.modifiable            = false;
            prop.generatePropertyBlock = true;
            prop.value.cubemap         = cubemap;
            properties.AddShaderProperty(prop);
        }