mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 02:03:36 +02:00
Addressing the 4.1 pass and make sure it works on windows pc and mac
This commit is contained in:
parent
305ea80a18
commit
c12115bfda
1 changed files with 11 additions and 6 deletions
|
@ -39,16 +39,21 @@ vec3 unpackSnorm3x10_1x2(int packedX10Y10Z10A2) {
|
||||||
#if defined(GPU_GL410)
|
#if defined(GPU_GL410)
|
||||||
layout(binding=0) uniform samplerBuffer blendshapeOffsetsBuffer;
|
layout(binding=0) uniform samplerBuffer blendshapeOffsetsBuffer;
|
||||||
BlendshapeOffset getBlendshapeOffset(int i) {
|
BlendshapeOffset getBlendshapeOffset(int i) {
|
||||||
int offset = 3 * i;
|
vec4 fetched = texelFetch(blendshapeOffsetsBuffer, i);
|
||||||
BlendshapeOffset blendshapeOffset;
|
ivec4 elem_packed = ivec4(floatBitsToUint(fetched.x), floatBitsToUint(fetched.y), floatBitsToUint(fetched.z), floatBitsToUint(fetched.w));
|
||||||
blendshapeOffset.position = texelFetch(blendshapeOffsetsBuffer, offset);
|
|
||||||
|
BlendshapeOffset unpacked;
|
||||||
|
vec2 pZnZ = unpackHalf2x16(uint(elem_packed.y));
|
||||||
|
unpacked.position = vec3(unpackHalf2x16(uint(elem_packed.x)), pZnZ.x);
|
||||||
<@if USE_NORMAL@>
|
<@if USE_NORMAL@>
|
||||||
blendshapeOffset.normal = texelFetch(blendshapeOffsetsBuffer, offset + 1);
|
unpacked.normal = vec3(unpackHalf2x16(uint(elem_packed.z)), pZnZ.y);
|
||||||
|
//unpacked.normal = unpackSnorm3x10_1x2((elem_packed.z)).xyz;
|
||||||
<@endif@>
|
<@endif@>
|
||||||
<@if USE_TANGENT@>
|
<@if USE_TANGENT@>
|
||||||
blendshapeOffset.tangent = texelFetch(blendshapeOffsetsBuffer, offset + 2);
|
unpacked.tangent = unpackSnorm3x10_1x2((elem_packed.w)).xyz;
|
||||||
<@endif@>
|
<@endif@>
|
||||||
return blendshapeOffset;
|
|
||||||
|
return unpacked;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
layout(std140, binding=0) buffer blendshapeOffsetsBuffer {
|
layout(std140, binding=0) buffer blendshapeOffsetsBuffer {
|
||||||
|
|
Loading…
Reference in a new issue