mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 14:47:19 +02:00
Assign the correct binding slots for the Resource Buffers to fix the deformed mesh rendering of the Avatar in gles backend
This commit is contained in:
parent
bc7e49482a
commit
fa0c58fa0e
7 changed files with 20 additions and 11 deletions
|
@ -2786,6 +2786,7 @@ void Application::initializeGL() {
|
|||
}
|
||||
|
||||
// Build a shared canvas / context for the QML rendering
|
||||
#if !defined(DISABLE_QML)
|
||||
{
|
||||
_qmlShareContext = new OffscreenGLCanvas();
|
||||
_qmlShareContext->setObjectName("QmlShareContext");
|
||||
|
@ -2799,6 +2800,8 @@ void Application::initializeGL() {
|
|||
qCWarning(interfaceapp, "Unable to make window context current");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
_renderEventHandler = new RenderEventHandler();
|
||||
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
|
||||
#define GPU_TEXTURE_TRANSFORM_OBJECT 31
|
||||
|
||||
|
||||
#define GPU_RESOURCE_BUFFER_SLOT0_TEXTURE 35
|
||||
#define GPU_RESOURCE_BUFFER_SLOT1_TEXTURE 35
|
||||
#define GPU_RESOURCE_BUFFER_SLOT0_STORAGE 0
|
||||
#define GPU_RESOURCE_BUFFER_SLOT1_STORAGE 1
|
||||
|
||||
// Mip creation
|
||||
#define GPU_TEXTURE_MIP_CREATION_INPUT 30
|
||||
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
<@func declareBlendshape(USE_NORMAL, USE_TANGENT)@>
|
||||
|
||||
#if !defined(GPU_SSBO_TRANSFORM_OBJECT)
|
||||
LAYOUT(binding=0) uniform samplerBuffer blendshapeOffsetsBuffer;
|
||||
LAYOUT(binding=GPU_RESOURCE_BUFFER_SLOT0_TEXTURE) uniform samplerBuffer blendshapeOffsetsBuffer;
|
||||
uvec4 getPackedBlendshapeOffset(int i) {
|
||||
return floatBitsToUint(texelFetch(blendshapeOffsetsBuffer, i));
|
||||
}
|
||||
#else
|
||||
LAYOUT_STD140(binding=0) buffer blendshapeOffsetsBuffer {
|
||||
LAYOUT_STD140(binding=GPU_RESOURCE_BUFFER_SLOT0_STORAGE) buffer blendshapeOffsetsBuffer {
|
||||
uvec4 _packedBlendshapeOffsets[];
|
||||
};
|
||||
uvec4 getPackedBlendshapeOffset(int i) {
|
||||
|
|
|
@ -23,7 +23,7 @@ struct ItemBound {
|
|||
};
|
||||
|
||||
#if !defined(GPU_SSBO_TRANSFORM_OBJECT)
|
||||
LAYOUT(binding=0) uniform samplerBuffer ssbo0Buffer;
|
||||
LAYOUT(binding=GPU_RESOURCE_BUFFER_SLOT0_TEXTURE) uniform samplerBuffer ssbo0Buffer;
|
||||
ItemBound getItemBound(int i) {
|
||||
int offset = 2 * i;
|
||||
ItemBound bound;
|
||||
|
@ -32,7 +32,7 @@ ItemBound getItemBound(int i) {
|
|||
return bound;
|
||||
}
|
||||
#else
|
||||
LAYOUT_STD140(binding=0) buffer ssbo0Buffer {
|
||||
LAYOUT_STD140(binding=GPU_RESOURCE_BUFFER_SLOT0_STORAGE) buffer ssbo0Buffer {
|
||||
ItemBound bounds[];
|
||||
};
|
||||
ItemBound getItemBound(int i) {
|
||||
|
|
|
@ -26,7 +26,7 @@ struct WorkloadProxy {
|
|||
};
|
||||
|
||||
#if !defined(GPU_SSBO_TRANSFORM_OBJECT)
|
||||
LAYOUT(binding=0) uniform samplerBuffer workloadProxiesBuffer;
|
||||
LAYOUT(binding=GPU_RESOURCE_BUFFER_SLOT0_TEXTURE) uniform samplerBuffer workloadProxiesBuffer;
|
||||
WorkloadProxy getWorkloadProxy(int i) {
|
||||
int offset = 2 * i;
|
||||
WorkloadProxy proxy;
|
||||
|
@ -35,7 +35,7 @@ WorkloadProxy getWorkloadProxy(int i) {
|
|||
return proxy;
|
||||
}
|
||||
#else
|
||||
LAYOUT_STD140(binding=0) buffer workloadProxiesBuffer {
|
||||
LAYOUT_STD140(binding=GPU_RESOURCE_BUFFER_SLOT0_STORAGE) buffer workloadProxiesBuffer {
|
||||
WorkloadProxy _proxies[];
|
||||
};
|
||||
WorkloadProxy getWorkloadProxy(int i) {
|
||||
|
@ -58,7 +58,7 @@ struct WorkloadView {
|
|||
};
|
||||
|
||||
#if !defined(GPU_SSBO_TRANSFORM_OBJECT)
|
||||
LAYOUT(binding=1) uniform samplerBuffer workloadViewsBuffer;
|
||||
LAYOUT(binding=GPU_RESOURCE_BUFFER_SLOT1_TEXTURE) uniform samplerBuffer workloadViewsBuffer;
|
||||
WorkloadView getWorkloadView(int i) {
|
||||
int offset = 8 * i;
|
||||
WorkloadView view;
|
||||
|
@ -73,7 +73,7 @@ WorkloadView getWorkloadView(int i) {
|
|||
return view;
|
||||
}
|
||||
#else
|
||||
LAYOUT_STD140(binding=1) buffer workloadViewsBuffer {
|
||||
LAYOUT_STD140(binding=GPU_RESOURCE_BUFFER_SLOT1_STORAGE) buffer workloadViewsBuffer {
|
||||
WorkloadView _views[];
|
||||
};
|
||||
WorkloadView getWorkloadView(int i) {
|
||||
|
|
|
@ -35,7 +35,7 @@ struct ItemBound {
|
|||
};
|
||||
|
||||
#if !defined(GPU_SSBO_TRANSFORM_OBJECT)
|
||||
LAYOUT(binding=0) uniform samplerBuffer ssbo0Buffer;
|
||||
LAYOUT(binding=GPU_RESOURCE_BUFFER_SLOT0_TEXTURE) uniform samplerBuffer ssbo0Buffer;
|
||||
ItemBound getItemBound(int i) {
|
||||
int offset = 2 * i;
|
||||
ItemBound bound;
|
||||
|
@ -44,7 +44,7 @@ ItemBound getItemBound(int i) {
|
|||
return bound;
|
||||
}
|
||||
#else
|
||||
LAYOUT_STD140(binding=0) buffer ssbo0Buffer {
|
||||
LAYOUT_STD140(binding=GPU_RESOURCE_BUFFER_SLOT0_STORAGE) buffer ssbo0Buffer {
|
||||
ItemBound bounds[];
|
||||
};
|
||||
ItemBound getItemBound(int i) {
|
||||
|
|
|
@ -172,7 +172,7 @@ def processCommand(line):
|
|||
scribeArgs = getCommonScribeArgs(scribeFile, libs)
|
||||
headerFlag = '-H'
|
||||
# using the old flag on Android builds for now
|
||||
if (dialect == '310es'): headerFlag = '-h'
|
||||
if (dialect == '310es'): headerFlag = '-H'
|
||||
for header in getDialectAndVariantHeaders(dialect, variant):
|
||||
scribeArgs.extend([headerFlag, header])
|
||||
scribeArgs.extend(['-o', unoptGlslFile])
|
||||
|
|
Loading…
Reference in a new issue