Fixed Shader Instancing (with that particles and Text, aswell)
This commit is contained in:
parent
57fb71d01b
commit
fd53c73fa7
8 changed files with 60 additions and 61 deletions
|
|
@ -82,20 +82,16 @@ namespace SM.OGL.Shaders
|
|||
{
|
||||
Location = loc,
|
||||
Name = keySplits[0],
|
||||
Parent = ParentShader,
|
||||
Struct = keySplits.Length > 2
|
||||
Parent = this,
|
||||
ParentShader = ParentShader
|
||||
};
|
||||
|
||||
arrayFilled = true;
|
||||
lastArrayKey = keySplits[0];
|
||||
}
|
||||
|
||||
var curIndex = int.Parse(keySplits[1]);
|
||||
if (array.Size < curIndex) array.Size = curIndex;
|
||||
|
||||
if (array.Struct)
|
||||
if (!array.Offsets.ContainsKey(keySplits[2].Trim('.')))
|
||||
array.Offsets.Add(keySplits[2].Trim('.'), loc - array.Location);
|
||||
if (keySplits[1] == "0")
|
||||
array.uniformNames.Add(keySplits[2].Substring(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue