mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
Intel fix
- GZDoom can launch for Intel users - IQMs work for Intel too
This commit is contained in:
parent
5b60118af2
commit
a8bab6a21d
2 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue