Exemplo n.º 1
0
 public bool GetSamplerDesc(UInt32 index, ref CSamplerBindInfo info)
 {
     unsafe
     {
         fixed(CSamplerBindInfo *p = &info)
         {
             return(SDK_IShaderDesc_GetSamplerDesc(CoreObject, index, p));
         }
     }
 }
Exemplo n.º 2
0
 public bool GetSamplerBindInfo(UInt32 Index, ref CSamplerBindInfo desc)
 {
     unsafe
     {
         fixed(CSamplerBindInfo *p = &desc)
         {
             return((bool)SDK_IShaderProgram_GetSampBindDesc(CoreObject, Index, p));
         }
     }
 }
Exemplo n.º 3
0
        public bool FindSamplerBindInfoByShaderName(Graphics.CGfxMaterialInstance mtl, string name, ref CSamplerBindInfo desc)
        {
            if (mtl != null)
            {
                name = "Samp_" + name;
            }
            var index = SDK_IShaderProgram_GetSamplerBindSlotIndex(CoreObject, name);

            if ((int)index < 0)
            {
                return(false);
            }
            GetSamplerBindInfo(index, ref desc);
            return(true);
        }
Exemplo n.º 4
0
        public bool FindSamplerBindInfo(Graphics.CGfxMaterialInstance mtl, string name, ref CSamplerBindInfo desc)
        {
            if (mtl != null)
            {
                name = Graphics.CGfxMaterialManager.GetValidShaderVarName(name, mtl.Material.GetHash64().ToString());
            }
            var index = SDK_IShaderProgram_GetSamplerBindSlotIndex(CoreObject, name);

            if ((int)index < 0)
            {
                return(false);
            }
            GetSamplerBindInfo(index, ref desc);
            return(true);
        }