mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:17:58 +02:00
Cleaning up the pipeline and checking that it is working for all cases
This commit is contained in:
parent
9f16024616
commit
e41b8f06e1
17 changed files with 28 additions and 111 deletions
|
@ -315,7 +315,7 @@ static QTimer pingTimer;
|
||||||
static bool DISABLE_WATCHDOG = true;
|
static bool DISABLE_WATCHDOG = true;
|
||||||
#else
|
#else
|
||||||
static const QString DISABLE_WATCHDOG_FLAG{ "HIFI_DISABLE_WATCHDOG" };
|
static const QString DISABLE_WATCHDOG_FLAG{ "HIFI_DISABLE_WATCHDOG" };
|
||||||
static bool DISABLE_WATCHDOG = nsightActive() || QProcessEnvironment::systemEnvironment().contains(DISABLE_WATCHDOG_FLAG);
|
static bool DISABLE_WATCHDOG = true || nsightActive() || QProcessEnvironment::systemEnvironment().contains(DISABLE_WATCHDOG_FLAG);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_GLES)
|
#if defined(USE_GLES)
|
||||||
|
|
|
@ -14,12 +14,13 @@
|
||||||
<@include gpu/Color.slh@>
|
<@include gpu/Color.slh@>
|
||||||
<@include gpu/Transform.slh@>
|
<@include gpu/Transform.slh@>
|
||||||
<@include graphics/MaterialTextures.slh@>
|
<@include graphics/MaterialTextures.slh@>
|
||||||
<@include render-utils/ShaderConstants.h@>
|
|
||||||
|
|
||||||
<$declareStandardTransform()$>
|
<$declareStandardTransform()$>
|
||||||
|
|
||||||
<$declareMaterialTexMapArrayBuffer()$>
|
<$declareMaterialTexMapArrayBuffer()$>
|
||||||
|
|
||||||
|
<@include render-utils/ShaderConstants.h@>
|
||||||
|
|
||||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) out vec4 _positionWS;
|
layout(location=RENDER_UTILS_ATTR_POSITION_WS) out vec4 _positionWS;
|
||||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) out vec4 _positionES;
|
layout(location=RENDER_UTILS_ATTR_POSITION_ES) out vec4 _positionES;
|
||||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01;
|
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01;
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
|
|
||||||
<$declareMaterialTexMapArrayBuffer()$>
|
<$declareMaterialTexMapArrayBuffer()$>
|
||||||
|
|
||||||
|
|
||||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) out vec4 _positionES;
|
layout(location=RENDER_UTILS_ATTR_POSITION_ES) out vec4 _positionES;
|
||||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01;
|
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01;
|
||||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) out vec3 _normalWS;
|
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) out vec3 _normalWS;
|
||||||
|
|
|
@ -16,9 +16,14 @@
|
||||||
|
|
||||||
<$declareStandardTransform()$>
|
<$declareStandardTransform()$>
|
||||||
|
|
||||||
|
<@include render-utils/ShaderConstants.h@>
|
||||||
|
|
||||||
|
layout(location=RENDER_UTILS_ATTR_POSITION_WS) out vec4 _positionWS;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
// standard transform
|
// standard transform
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToClipPos(cam, obj, inPosition, gl_Position)$>
|
<$transformModelToClipPos(cam, obj, inPosition, gl_Position)$>
|
||||||
|
<$transformModelToWorldPos(obj, inPosition, _positionWS)$>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
<@include gpu/Config.slh@>
|
|
||||||
<$VERSION_HEADER$>
|
|
||||||
// <$_SCRIBE_FILENAME$>
|
|
||||||
// Generated on <$_SCRIBE_DATE$>
|
|
||||||
//
|
|
||||||
// Created by Olivier Prat on 06/05/17.
|
|
||||||
// Copyright 2017 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
<@include gpu/Inputs.slh@>
|
|
||||||
<@include gpu/Transform.slh@>
|
|
||||||
<@include render-utils/ShaderConstants.h@>
|
|
||||||
|
|
||||||
<$declareStandardTransform()$>
|
|
||||||
|
|
||||||
|
|
||||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) out vec4 _positionWS;
|
|
||||||
|
|
||||||
void main(void) {
|
|
||||||
// standard transform
|
|
||||||
TransformCamera cam = getTransformCamera();
|
|
||||||
TransformObject obj = getTransformObject();
|
|
||||||
<$transformModelToClipPos(cam, obj, inPosition, gl_Position)$>
|
|
||||||
<$transformModelToWorldPos(obj, inPosition, _positionWS)$>
|
|
||||||
}
|
|
|
@ -1 +1,2 @@
|
||||||
|
VERTEX skin_model
|
||||||
FRAGMENT model
|
FRAGMENT model
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
VERTEX skin_model_dq
|
||||||
FRAGMENT model
|
FRAGMENT model
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
VERTEX skin_model_normal_map
|
||||||
FRAGMENT model_normal_map
|
FRAGMENT model_normal_map
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
VERTEX skin_model_normal_map_dq
|
||||||
FRAGMENT model_normal_map
|
FRAGMENT model_normal_map
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
VERTEX skin_model_shadow
|
||||||
FRAGMENT model_shadow
|
FRAGMENT model_shadow
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
VERTEX skin_model_shadow_dq
|
||||||
FRAGMENT model_shadow
|
FRAGMENT model_shadow
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<$declareMaterialTexMapArrayBuffer()$>
|
<$declareMaterialTexMapArrayBuffer()$>
|
||||||
|
|
||||||
<@include MeshDeformer.slh@>
|
<@include MeshDeformer.slh@>
|
||||||
<$declareMeshDeformer(1, _SCRIBE_NULL, 1, 0, 1)$>
|
<$declareMeshDeformer(1, _SCRIBE_NULL, 1, _SCRIBE_NULL, 1)$>
|
||||||
<$declareMeshDeformerActivation(1, 1)$>
|
<$declareMeshDeformerActivation(1, 1)$>
|
||||||
|
|
||||||
<@include LightingModel.slh@>
|
<@include LightingModel.slh@>
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
<@include render-utils/ShaderConstants.h@>
|
<@include render-utils/ShaderConstants.h@>
|
||||||
|
|
||||||
|
layout(location=RENDER_UTILS_ATTR_POSITION_WS) out vec4 _positionWS;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec4 deformedPosition = vec4(0.0, 0.0, 0.0, 0.0);
|
vec4 deformedPosition = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
evalMeshDeformer(inPosition, deformedPosition,
|
evalMeshDeformer(inPosition, deformedPosition,
|
||||||
|
@ -30,5 +32,6 @@ void main(void) {
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToClipPos(cam, obj, deformedPosition, gl_Position)$>
|
<$transformModelToClipPos(cam, obj, deformedPosition, gl_Position)$>
|
||||||
|
<$transformModelToWorldPos(obj, deformedPosition, _positionWS)$>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
<@include render-utils/ShaderConstants.h@>
|
<@include render-utils/ShaderConstants.h@>
|
||||||
|
|
||||||
|
layout(location=RENDER_UTILS_ATTR_POSITION_WS) out vec4 _positionWS;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec4 deformedPosition = vec4(0.0, 0.0, 0.0, 0.0);
|
vec4 deformedPosition = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
evalMeshDeformer(inPosition, deformedPosition,
|
evalMeshDeformer(inPosition, deformedPosition,
|
||||||
|
@ -30,4 +32,5 @@ void main(void) {
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToClipPos(cam, obj, deformedPosition, gl_Position)$>
|
<$transformModelToClipPos(cam, obj, deformedPosition, gl_Position)$>
|
||||||
|
<$transformModelToWorldPos(obj, deformedPosition, _positionWS)$>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
<@include gpu/Config.slh@>
|
|
||||||
<$VERSION_HEADER$>
|
|
||||||
// <$_SCRIBE_FILENAME$>
|
|
||||||
// Generated on <$_SCRIBE_DATE$>
|
|
||||||
//
|
|
||||||
// Created by Hifi Engine Team.
|
|
||||||
// Created by Olivier Prat on 06/045/17.
|
|
||||||
// Copyright 2017 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
<@include gpu/Inputs.slh@>
|
|
||||||
<@include gpu/Transform.slh@>
|
|
||||||
<@include render-utils/ShaderConstants.h@>
|
|
||||||
|
|
||||||
<$declareStandardTransform()$>
|
|
||||||
|
|
||||||
<@include MeshDeformer.slh@>
|
|
||||||
<$declareMeshDeformer(_SCRIBE_NULL, _SCRIBE_NULL, 1, _SCRIBE_NULL, 1)$>
|
|
||||||
<$declareMeshDeformerActivation(1, 1)$>
|
|
||||||
|
|
||||||
<@include render-utils/ShaderConstants.h@>
|
|
||||||
|
|
||||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) out vec4 _positionWS;
|
|
||||||
|
|
||||||
void main(void) {
|
|
||||||
vec4 deformedPosition = vec4(0.0, 0.0, 0.0, 0.0);
|
|
||||||
evalMeshDeformer(inPosition, deformedPosition,
|
|
||||||
meshDeformer_doSkinning(_drawCallInfo.y), inSkinClusterIndex, inSkinClusterWeight,
|
|
||||||
meshDeformer_doBlendshape(_drawCallInfo.y), gl_VertexID);
|
|
||||||
|
|
||||||
// standard transform
|
|
||||||
TransformCamera cam = getTransformCamera();
|
|
||||||
TransformObject obj = getTransformObject();
|
|
||||||
<$transformModelToClipPos(cam, obj, deformedPosition, gl_Position)$>
|
|
||||||
<$transformModelToWorldPos(obj, deformedPosition, _positionWS)$>
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
<@include gpu/Config.slh@>
|
|
||||||
<$VERSION_HEADER$>
|
|
||||||
// <$_SCRIBE_FILENAME$>
|
|
||||||
// Generated on <$_SCRIBE_DATE$>
|
|
||||||
//
|
|
||||||
// Created by Hifi Engine Team.
|
|
||||||
// Created by Olivier Prat on 06/045/17.
|
|
||||||
// Copyright 2017 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
<@include gpu/Inputs.slh@>
|
|
||||||
<@include gpu/Transform.slh@>
|
|
||||||
<@include render-utils/ShaderConstants.h@>
|
|
||||||
|
|
||||||
<$declareStandardTransform()$>
|
|
||||||
|
|
||||||
<@include MeshDeformer.slh@>
|
|
||||||
<$declareMeshDeformer(_SCRIBE_NULL, _SCRIBE_NULL, 1, 1, 1)$>
|
|
||||||
<$declareMeshDeformerActivation(1, 1)$>
|
|
||||||
|
|
||||||
<@include render-utils/ShaderConstants.h@>
|
|
||||||
|
|
||||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) out vec4 _positionWS;
|
|
||||||
|
|
||||||
void main(void) {
|
|
||||||
vec4 deformedPosition = vec4(0.0, 0.0, 0.0, 0.0);
|
|
||||||
evalMeshDeformer(inPosition, deformedPosition,
|
|
||||||
meshDeformer_doSkinning(_drawCallInfo.y), inSkinClusterIndex, inSkinClusterWeight,
|
|
||||||
meshDeformer_doBlendshape(_drawCallInfo.y), gl_VertexID);
|
|
||||||
|
|
||||||
// standard transform
|
|
||||||
TransformCamera cam = getTransformCamera();
|
|
||||||
TransformObject obj = getTransformObject();
|
|
||||||
<$transformModelToClipPos(cam, obj, deformedPosition, gl_Position)$>
|
|
||||||
<$transformModelToWorldPos(obj, deformedPosition, _positionWS)$>
|
|
||||||
}
|
|
|
@ -86,8 +86,10 @@ void render::renderStateSortShapes(const RenderContextPointer& renderContext,
|
||||||
RenderArgs* args = renderContext->args;
|
RenderArgs* args = renderContext->args;
|
||||||
|
|
||||||
int numItemsToDraw = (int)inItems.size();
|
int numItemsToDraw = (int)inItems.size();
|
||||||
|
int lastItemToDraw = -1;
|
||||||
if (maxDrawnItems != -1) {
|
if (maxDrawnItems != -1) {
|
||||||
numItemsToDraw = glm::min(numItemsToDraw, maxDrawnItems);
|
numItemsToDraw = glm::min(numItemsToDraw, maxDrawnItems);
|
||||||
|
lastItemToDraw = numItemsToDraw - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
using SortedPipelines = std::vector<render::ShapeKey>;
|
using SortedPipelines = std::vector<render::ShapeKey>;
|
||||||
|
@ -98,7 +100,11 @@ void render::renderStateSortShapes(const RenderContextPointer& renderContext,
|
||||||
|
|
||||||
for (auto i = 0; i < numItemsToDraw; ++i) {
|
for (auto i = 0; i < numItemsToDraw; ++i) {
|
||||||
auto& item = scene->getItem(inItems[i].id);
|
auto& item = scene->getItem(inItems[i].id);
|
||||||
|
if (lastItemToDraw == i) {
|
||||||
|
if (!item.getKey().isShape()) {
|
||||||
|
qDebug() << "Item explored";
|
||||||
|
}
|
||||||
|
}
|
||||||
{
|
{
|
||||||
assert(item.getKey().isShape());
|
assert(item.getKey().isShape());
|
||||||
auto key = item.getShapeKey() | globalKey;
|
auto key = item.getShapeKey() | globalKey;
|
||||||
|
|
Loading…
Reference in a new issue