Beispiel #1
0
 public bool GetSRVDesc(UInt32 index, ref CTextureBindInfo info)
 {
     unsafe
     {
         fixed(CTextureBindInfo *p = &info)
         {
             return(SDK_IShaderDesc_GetSRVDesc(CoreObject, index, p));
         }
     }
 }
Beispiel #2
0
        public UInt32 FindTextureIndexPS(Graphics.CGfxMaterialInstance mtl, string name)
        {
            CTextureBindInfo desc = new CTextureBindInfo();

            if (FindTextureBindInfo(mtl, name, ref desc) == false)
            {
                return(UInt32.MaxValue);
            }
            return(desc.PSBindPoint);
        }
Beispiel #3
0
 public bool GetTextureBindDesc(UInt32 index, ref CTextureBindInfo desc)
 {
     unsafe
     {
         fixed(CTextureBindInfo *p = &desc)
         {
             return((bool)SDK_IShaderProgram_GetSRBindDesc(CoreObject, index, p));
         }
     }
 }
Beispiel #4
0
        public bool FindTextureBindInfo(Graphics.CGfxMaterialInstance mtl, string name, ref CTextureBindInfo desc)
        {
            if (mtl != null)
            {
                //name = Graphics.CGfxMaterialManager.GetValidShaderVarName(name, mtl.Material.GetHash64().ToString());
                name = Graphics.CGfxMaterialManager.GetValidShaderVarName(name, mtl.Material.Hash64String);
            }

            var index = SDK_IShaderProgram_GetTextureBindSlotIndex(CoreObject, name);

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