Intel fix

- GZDoom can launch for Intel users - IQMs work for Intel too
This commit is contained in:
Shiny Metagross 2022-09-05 11:33:24 -07:00 committed by Christoph Oelckers
parent 5b60118af2
commit a8bab6a21d
2 changed files with 5 additions and 2 deletions

View file

@ -103,8 +103,11 @@ int BoneBuffer::UploadBones(const TArray<VSMatrix>& bones)
int BoneBuffer::GetBinding(unsigned int index, size_t* pOffset, size_t* pSize)
{
unsigned int offset = index;
// this function will only get called if a uniform buffer is used. For a shader storage buffer we only need to bind the buffer once at the start.
unsigned int offset = (index / mBlockAlign) * mBlockAlign;
if (mBlockAlign > 0)
offset = (index / mBlockAlign) * mBlockAlign;
*pOffset = offset * BONE_SIZE;
*pSize = mBlockSize * BONE_SIZE;

View file

@ -169,7 +169,7 @@ void AddWeightedBone(uint boneIndex, float weight, inout vec4 position, inout ve
{
if (weight != 0.0)
{
mat4 transform = bones[uBoneIndexBase + boneIndex];
mat4 transform = bones[uBoneIndexBase + (int)boneIndex];
mat3 rotation = mat3(transform);
position += (transform * aPosition) * weight;
normal += (rotation * aNormal.xyz) * weight;