Fixing shaders to only have used vertex inputs

This commit is contained in:
Brad Davis 2018-10-23 16:25:48 -07:00 committed by Karol Suprynowicz
parent 8f1c08a02e
commit 60ec906637
13 changed files with 59 additions and 14 deletions

View file

@ -10,7 +10,12 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
layout(location=GPU_ATTR_NORMAL) in vec4 inNormal;
layout(location=GPU_ATTR_COLOR) in vec4 inColor;
layout(location=GPU_ATTR_TEXCOORD0) in vec4 inTexCoord0;
<@include gpu/Color.slh@>
<@include gpu/Transform.slh@>
<$declareStandardTransform()$>

View file

@ -9,7 +9,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
layout(location=GPU_ATTR_NORMAL) in vec4 inNormal;
<@include render-utils/ShaderConstants.h@>
<@include gpu/Transform.slh@>
@ -27,6 +30,7 @@
<@endif@>
void main(void) {
// standard transform
TransformCamera cam = getTransformCamera();
TransformObject obj = getTransformObject();

View file

@ -8,7 +8,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
layout(location=GPU_ATTR_COLOR) in vec4 inColor;
<@include gpu/Color.slh@>
<@include gpu/Transform.slh@>
<$declareStandardTransform()$>

View file

@ -12,7 +12,9 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
layout(location=0) out vec2 uv;

View file

@ -13,7 +13,9 @@
//
<@include gpu/Transform.slh@>
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
<@include render-utils/ShaderConstants.h@>
<$declareStandardTransform()$>

View file

@ -14,7 +14,9 @@
<@include gpu/Transform.slh@>
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
<@include graphics/Light.slh@>
<@include render-utils/ShaderConstants.h@>

View file

@ -12,7 +12,9 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
<@include gpu/Transform.slh@>
<@include graphics/Light.slh@>
<@include render-utils/ShaderConstants.h@>

View file

@ -12,7 +12,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
layout(location=GPU_ATTR_TEXCOORD0) in vec4 inTexCoord0;
<@include gpu/Transform.slh@>

View file

@ -12,7 +12,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
layout(location=GPU_ATTR_TEXCOORD0) in vec4 inTexCoord0;
<@include gpu/Transform.slh@>
<@include render-utils/ShaderConstants.h@>

View file

@ -11,7 +11,13 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
layout(location=GPU_ATTR_NORMAL) in vec4 inNormal;
layout(location=GPU_ATTR_COLOR) in vec4 inColor;
layout(location=GPU_ATTR_TEXCOORD0) in vec4 inTexCoord0;
layout(location=GPU_ATTR_TEXCOORD1) in vec4 inTexCoord1;
<@include gpu/Color.slh@>
<@include render-utils/ShaderConstants.h@>

View file

@ -10,8 +10,11 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/Color.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
layout(location=GPU_ATTR_TEXCOORD0) in vec4 inTexCoord0;
<@include gpu/Transform.slh@>
<@include render-utils/ShaderConstants.h@>
<@include gpu/Transform.slh@>

View file

@ -10,7 +10,12 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
layout(location=GPU_ATTR_NORMAL) in vec4 inNormal;
layout(location=GPU_ATTR_COLOR) in vec4 inColor;
layout(location=GPU_ATTR_TEXCOORD0) in vec4 inTexCoord0;
<@include gpu/Color.slh@>
<@include gpu/Transform.slh@>
<$declareStandardTransform()$>

View file

@ -12,7 +12,12 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
<@include gpu/Inputs.slh@>
<@include gpu/ShaderConstants.h@>
layout(location=GPU_ATTR_POSITION) in vec4 inPosition;
layout(location=GPU_ATTR_NORMAL) in vec4 inNormal;
layout(location=GPU_ATTR_COLOR) in vec4 inColor;
layout(location=GPU_ATTR_TEXCOORD0) in vec4 inTexCoord0;
<@include gpu/Color.slh@>
<@include gpu/Transform.slh@>
<$declareStandardTransform()$>