Commit 61d7c92a authored by Marc SCHWEITZER's avatar Marc SCHWEITZER 🚴
Browse files

enh(viz): improve flat shading by using fragment shader computed normals

Flat shading may often be broken if point normals are shared between faces. To overcome this, we chose to compute normals in the fragment shader using eye position derivatives. Doing so, the outdated and never used Gouraud shading mode was removed. This removes a shader combination, which makes maintenance easier.

Closes #652 and #766

Merge branch '766-confidential-issue' into 'dev'

See merge request sight/sight!621
parents 27ad19e3 911a64d5
......@@ -111,8 +111,7 @@ public:
{
AMBIENT = 0,
FLAT = 1,
GOURAUD = 2, //FLAT<<1 -> 10
PHONG = 4 //FLAT<<2 -> 100
PHONG = 2
} ShadingType;
/**
......@@ -145,7 +144,7 @@ public:
} WrappingType;
/** @{
* @brief get/set the shading models(flat, gouraud, phong)
* @brief get/set the shading models(flat, phong)
*/
ShadingType& getShadingMode();
const ShadingType& getShadingMode() const;
......@@ -201,7 +200,7 @@ public:
protected:
/// Shading mode (flat, Gouraud, Phong)
/// Shading mode (flat, Phong)
ShadingType m_shadingMode;
/// Fill mode (flat, wireframe, point)
......
......@@ -57,7 +57,6 @@ SIGHT_IMPLEMENT_ENUM_REFLECTION((sight) (data) (Material) (ShadingType))
builder
.value("AMBIENT", sight::data::Material::AMBIENT)
.value("FLAT", sight::data::Material::FLAT)
.value("GOURAUD", sight::data::Material::GOURAUD)
.value("PHONG", sight::data::Material::PHONG)
;
}
......
......@@ -1902,7 +1902,6 @@ inline data::Material::sptr _generate<data::Material>(const std::size_t variant)
data::Material::ShadingType shading[] = {
data::Material::ShadingType::AMBIENT,
data::Material::ShadingType::FLAT,
data::Material::ShadingType::GOURAUD,
data::Material::ShadingType::PHONG
};
......
......@@ -108,7 +108,7 @@ public:
/// Updates material polygon mode (surface, point, wireframe or edge).
VIZ_QT3D_QT_API Q_INVOKABLE void updatePolygonMode(int _polygonMode);
/// Updates material shading mode (ambient/flat/gouraud/phong).
/// Updates material shading mode (ambient/flat/phong).
VIZ_QT3D_QT_API Q_INVOKABLE void updateShadingMode(int _shadingMode);
/// Updates material color.
......
......@@ -10,7 +10,7 @@ flat in vec3 v_out_f3FlatColor;
out vec4 f_out_f4FragColor;
uniform vec3 u_f3AmbientColCopy;
uniform int u_iLightingMode; //0=ambient, 1=flat, 2=gouraud, 4=phong.
uniform int u_iLightingMode; //0=ambient, 1=flat, 2=phong.
// Include functions from another shader called 'lighting.inc.glsl'.
#pragma include lighting.inc.glsl
......@@ -26,10 +26,6 @@ void main()
{
f_out_f4FragColor = vec4(v_out_f3FlatColor, 1.0);
}
else if(u_iLightingMode == 2) //Gouraud lighting.
{
f_out_f4FragColor = vec4(v_out_f3Color, 1.0);
}
else //Phong lighting.
{
vec3 f3ResultCol = lighting(v_out_f3Position, normalize(v_out_f3Normal));
......
......@@ -14,7 +14,7 @@ uniform mat4 modelView;
uniform mat3 modelViewNormal;
uniform mat4 mvp;
uniform int u_iLightingMode; //0=ambient, 1=flat, 2=gouraud, 4=phong.
uniform int u_iLightingMode; //0=ambient, 1=flat, 2=phong.
// Include functions from another shader called 'lighting.inc.glsl'.
#pragma include lighting.inc.glsl
......@@ -32,10 +32,5 @@ void main()
v_out_f3FlatColor = lighting(v_out_f3Position, normalize(modelViewNormal * vertexNormal));
}
if(u_iLightingMode == 2) //If gouraud lighting, compute color in vertex shader.
{
v_out_f3Color = lighting(v_out_f3Position, normalize(v_out_f3Normal));
}
gl_Position = mvp * vec4(vertexPosition, 1.0);
}
......@@ -62,8 +62,7 @@ public:
{
AMBIENT = 0,
FLAT = 1,
GOURAUD = 2,
PHONG = 4
PHONG = 2
} LightingMode;
/// Constructs a lighting rendering technique.
......
......@@ -59,7 +59,7 @@ public:
/// Updates material polygon mode (surface, point or wireframe)
VIZ_SCENE3D_API void updatePolygonMode(int _polygonMode);
/// Update material shading mode (flat/gouraud/phong) in fixed function pipeline
/// Update material shading mode (flat/phong)
VIZ_SCENE3D_API void updateShadingMode(
int _shadingMode,
int _numLights,
......@@ -67,7 +67,7 @@ public:
bool useTextureAlpha
);
/// Update material color in fixed function pipeline
/// Update material color
VIZ_SCENE3D_API void updateRGBAMode(data::Material::sptr _sightMaterial);
void setHasMeshNormal(bool _hasMeshNormal);
......
......@@ -53,7 +53,6 @@ static const std::regex s_LIGHT_PARAM_REGEX("u_f[2-4]?(NumLights|Light(Ambient|D
static const std::string s_AMBIENT = "Ambient";
static const std::string s_FLAT = "Flat";
static const std::string s_GOURAUD = "Gouraud";
static const std::string s_PIXELLIGHTING = "PixelLit";
//-----------------------------------------------------------------------------
......@@ -118,10 +117,6 @@ std::string Shading::getPermutation(data::Material::ShadingType _mode, bool _dif
suffix = s_FLAT;
break;
case data::Material::GOURAUD:
suffix = s_GOURAUD;
break;
case data::Material::PHONG:
suffix = s_PIXELLIGHTING;
break;
......@@ -239,8 +234,7 @@ std::string Shading::setPermutationInProgramName(const std::string& _name, const
prgName = std::regex_replace(_name, regexConcat, "$1");
// Replace the shading technique
static const std::regex regexShading("(" + s_AMBIENT + ")|(" + s_FLAT + ")|(" + s_GOURAUD + ")|("
+ s_PIXELLIGHTING + ")");
static const std::regex regexShading("(" + s_AMBIENT + ")|(" + s_FLAT + ")|(" + s_PIXELLIGHTING + ")");
prgName = std::regex_replace(prgName, regexShading, _permutation);
return prgName;
......
......@@ -9,7 +9,12 @@ uniform float u_fShininess;
uniform float u_fNumLights;
uniform vec4 u_f4LightAmbientCol;
#ifdef FLAT
// We have to use a different uniform name otherwise Ogre fails to refresh the constant value when switching shaders
uniform vec4 u_f4LightPosVs[MAX_LIGHTS];
#else
uniform vec4 u_f4LightPos[MAX_LIGHTS];
#endif
uniform vec3 u_f3LightDiffuseCol[MAX_LIGHTS];
uniform vec3 u_f3LightSpecularCol[MAX_LIGHTS];
......@@ -29,7 +34,11 @@ vec4 lighting(vec3 _f3NormalDir_N, vec3 _f3Pos)
// for(int i = 0; i < int(u_fNumLights); ++i)
for(int i = int(u_fNumLights); --i >= 0 ;)
{
#ifdef FLAT
vec3 f3LightDir = u_f4LightPosVs[i].w * _f3Pos - u_f4LightPosVs[i].xyz;
#else
vec3 f3LightDir = u_f4LightPos[i].w * _f3Pos - u_f4LightPos[i].xyz;
#endif
vec3 f3LightDir_N = normalize(f3LightDir);
float fCosTheta = abs(dot(-f3LightDir_N, _f3NormalDir_N ));
......@@ -56,7 +65,11 @@ vec3 lightingBlinnPhong(vec3 _f3NormalDir_N, vec3 _f3Pos, vec3 _f3DiffuseCol)
// (look at "for(int i = int(u_fNumLights)...")
for(int i = 0; i < int(u_fNumLights); ++i)
{
#ifdef FLAT
vec3 f3LightDir = u_f4LightPosVs[i].w * _f3Pos - u_f4LightPosVs[i].xyz;
#else
vec3 f3LightDir = u_f4LightPos[i].w * _f3Pos - u_f4LightPos[i].xyz;
#endif
// We use the Blinn-Phong lighting model.
float fLitDiffuseCol_N = clamp(abs(dot( normalize(f3LightDir), _f3NormalDir_N )), 0, 1);
......
......@@ -4,9 +4,9 @@
#extension GL_GOOGLE_include_directive : enable
#endif // GLSL_LANG_VALIDATOR
#ifdef PIXEL_LIT
#if defined(FLAT) || defined(PHONG)
#include "Lighting.inc.glsl"
#endif // PIXEL_LIT
#endif
// This defines getFragmentColor() and getFragmentAlpha()
#include "MaterialColor_FP.inc.glsl"
......
......@@ -8,9 +8,12 @@ uniform int u_useTextureAlpha;
// Input semantics
layout(location = 0) in vec3 v_f3Normal_Ws;
#ifdef PIXEL_LIT
#if defined(FLAT)
layout(location = 1) in vec3 v_f3Position_Vs;
#elif defined(PHONG)
layout(location = 1) in vec3 v_f3Position_Ws;
#endif
#endif
#ifdef FLAT
layout(location = 2) flat in vec4 v_f4Color;
......@@ -27,8 +30,12 @@ uniform sampler2D u_texture;
// Compute illumination or forward illumination received from the vertex shader
vec4 getFragmentColor()
{
#ifdef PIXEL_LIT
#if defined(FLAT)
vec3 xTangent = dFdx( v_f3Position_Vs );
vec3 yTangent = dFdy( v_f3Position_Vs );
vec3 faceNormal_Vs = normalize( cross( xTangent, yTangent ) );
vec4 colorOut = lighting(normalize(faceNormal_Vs), v_f3Position_Vs) * v_f4Color;
#elif defined(PHONG)
vec4 colorOut = lighting(normalize(v_f3Normal_Ws), v_f3Position_Ws) * v_f4Color;
#else
vec4 colorOut = v_f4Color;
......
......@@ -4,17 +4,12 @@
#extension GL_GOOGLE_include_directive : enable
#endif // GLSL_LANG_VALIDATOR
// Extern functions
#if defined(FLAT) || (!defined(AMBIENT) && !defined(PIXEL_LIT))
#include "Lighting.inc.glsl"
#endif // PIXEL_LIT
uniform mat4 u_worldViewProj;
uniform mat4 u_worldView;
uniform mat4 u_world;
uniform mat4 u_normalMatrix;
#ifdef AUTOSTEREO
uniform mat4 u_worldView;
uniform mat4 u_proj;
#endif // AUTOSTEREO
......@@ -41,15 +36,17 @@ layout(location = 2) out vec2 vTexCoord;
#else
#if defined(PIXEL_LIT) || defined(CEL_SHADING)
# if defined(PHONG) || defined(CEL_SHADING)
layout(location = 0) out vec3 v_f3Normal_Ws;
# endif
# ifdef PIXEL_LIT
# if defined(PHONG)
layout(location = 1) out vec3 v_f3Position_Ws;
# elif defined(FLAT)
layout(location = 1) out vec3 v_f3Position_Vs;
# endif
# ifdef FLAT
# if defined(FLAT)
layout(location = 2) flat out vec4 v_f4Color;
# else
layout(location = 2) out vec4 v_f4Color;
......@@ -61,12 +58,12 @@ layout(location = 3) out vec2 v_f2TexCoord;
#endif // R2VB
#ifndef AMBIENT
#if defined(FLAT) || defined(PHONG)
vec4 lighting(vec3 _normal, vec3 _position);
#else
uniform vec4 u_ambient;
uniform vec4 u_diffuse;
#endif // AMBIENT
#endif // FLAT || PHONG
void main(void)
{
......@@ -90,11 +87,11 @@ void main(void)
gl_Position = u_worldViewProj * position;
#endif
# if defined(PIXEL_LIT) || defined(CEL_SHADING)
# if defined(PHONG) || defined(CEL_SHADING)
v_f3Normal_Ws = normalize(u_normalMatrix * vec4(normal, 0.f)).xyz;
# endif
# ifdef PIXEL_LIT
# if defined(PHONG)
v_f3Position_Ws = (u_world * position).xyz;
# ifdef VERTEX_COLOR
......@@ -104,19 +101,18 @@ void main(void)
# endif // VERTEX_COLOR
# else
# ifdef AMBIENT
v_f4Color = vec4(u_ambient.rgb + u_diffuse.rgb, u_diffuse.a);
# ifdef FLAT
v_f3Position_Vs = (u_worldView * position).xyz;
v_f4Color = vec4(1.,1.,1.,1.);
# else
vec3 position_WS = (u_world * position).xyz;
vec3 normal_WS = normalize(u_normalMatrix * vec4(normal, 0.f)).xyz;
v_f4Color = lighting(normal_WS, position_WS);
# endif // AMBIENT
v_f4Color = vec4(u_ambient.rgb + u_diffuse.rgb, u_diffuse.a);
# endif
# ifdef VERTEX_COLOR
v_f4Color *= colour;
# endif // VERTEX_COLOR
# endif // PIXEL_LIT
# endif // PHONG || CEL_SHADING
# ifdef DIFFUSE_TEX
v_f2TexCoord = uv0;
......
......@@ -4,9 +4,9 @@
#extension GL_GOOGLE_include_directive : enable
#endif // GLSL_LANG_VALIDATOR
#ifdef PIXEL_LIT
#if defined(FLAT) || defined(PHONG)
#include "Lighting.inc.glsl"
#endif // PIXEL_LIT
#endif
// Uniforms
#ifdef DIFFUSE_TEX
......@@ -16,7 +16,7 @@ uniform int u_useTextureAlpha;
// Input semantics
layout(location = 0) in vec3 v_f3Normal_Ws;
#ifdef PIXEL_LIT
#if defined(PHONG)
layout(location = 1) in vec3 v_f3Position_Ws;
#endif
......@@ -40,7 +40,7 @@ uniform int u_fog;
vec4 getFragmentColor()
{
#ifdef PIXEL_LIT
#if defined(PHONG)
vec4 colorOut = lighting(normalize(v_f3Normal_Ws), v_f3Position_Ws) * v_f4Color;
#else
vec4 colorOut = v_f4Color;
......
......@@ -16,7 +16,7 @@ vertex_program R2VB/Ambient_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, AMBIENT=1
preprocessor_defines R2VB=1
}
//---------------------------------------------------------------------------
......@@ -25,7 +25,7 @@ vertex_program R2VB/Ambient+VT_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, AMBIENT=1,VERTEX_COLOR=1
preprocessor_defines R2VB=1, VERTEX_COLOR=1
}
//---------------------------------------------------------------------------
......@@ -34,7 +34,7 @@ vertex_program R2VB/Ambient+DfsTex_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, AMBIENT=1,DIFFUSE_TEX=1
preprocessor_defines R2VB=1, DIFFUSE_TEX=1
}
//---------------------------------------------------------------------------
......@@ -43,7 +43,7 @@ vertex_program R2VB/Ambient+VT+DfsTex_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, AMBIENT=1,VERTEX_COLOR=1,DIFFUSE_TEX=1
preprocessor_defines R2VB=1, VERTEX_COLOR=1,DIFFUSE_TEX=1
}
//---------------------------------------------------------------------------
......@@ -84,47 +84,11 @@ vertex_program R2VB/Flat+VT+DfsTex_VP glsl
//---------------------------------------------------------------------------
vertex_program R2VB/Gouraud_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1
}
//---------------------------------------------------------------------------
vertex_program R2VB/Gouraud+VT_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, VERTEX_COLOR=1
}
//---------------------------------------------------------------------------
vertex_program R2VB/Gouraud+DfsTex_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, DIFFUSE_TEX=1
}
//---------------------------------------------------------------------------
vertex_program R2VB/Gouraud+VT+DfsTex_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, VERTEX_COLOR=1,DIFFUSE_TEX=1
}
//---------------------------------------------------------------------------
vertex_program R2VB/PixelLit_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, PIXEL_LIT=1
preprocessor_defines R2VB=1, PHONG=1
}
//---------------------------------------------------------------------------
......@@ -133,7 +97,7 @@ vertex_program R2VB/PixelLit+VT_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, PIXEL_LIT=1,VERTEX_COLOR=1
preprocessor_defines R2VB=1, PHONG=1,VERTEX_COLOR=1
}
//---------------------------------------------------------------------------
......@@ -142,7 +106,7 @@ vertex_program R2VB/PixelLit+DfsTex_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, PIXEL_LIT=1,DIFFUSE_TEX=1
preprocessor_defines R2VB=1, PHONG=1,DIFFUSE_TEX=1
}
//---------------------------------------------------------------------------
......@@ -151,7 +115,7 @@ vertex_program R2VB/PixelLit+VT+DfsTex_VP glsl
{
source RenderScene_VP.glsl
preprocessor_defines R2VB=1, PIXEL_LIT=1,VERTEX_COLOR=1,DIFFUSE_TEX=1
preprocessor_defines R2VB=1, PHONG=1,VERTEX_COLOR=1,DIFFUSE_TEX=1
}
//-----------------------------------------------------------------------------
......
......@@ -42,11 +42,8 @@ def generatePermutations(baseConfig, *configs):
if currentConfig[1]:
currentPermutation += [currentConfig[1]]
# Concatenate attached shaders
currentPermutation += [config[2] + currentConfig[2]]
# Concatenate params
paramsDict = appendDict(config[3], currentConfig[3])
paramsDict = appendDict(config[2], currentConfig[2])
currentPermutation.append(paramsDict)
......@@ -65,7 +62,6 @@ def generatePermutations(baseConfig, *configs):
lightingParams = [ '// Lighting',
'param_named_auto u_f3CameraPos camera_position',
'param_named u_fNumLights float 1.0',
'param_named_auto u_f4LightPos light_position_array 10',
'param_named_auto u_f4LightAmbientCol ambient_light_colour',
'param_named_auto u_f3LightDiffuseCol light_diffuse_colour_array 10',
'param_named_auto u_f3LightSpecularCol light_specular_colour_array 10',
......@@ -74,6 +70,10 @@ lightingParams = [ '// Lighting',
'param_named_auto u_f4SpecularCol surface_specular_colour',
'param_named_auto u_fShininess surface_shininess']
lightingParamsFlat = lightingParams + [ 'param_named_auto u_f4LightPosVs light_position_view_space_array 10' ]
lightingParams += [ 'param_named_auto u_f4LightPos light_position_array 10' ]
## Common parameters used for ambient lighting
ambientParams = [ '// Ambient',
'param_named_auto u_ambient surface_ambient_colour',
......@@ -99,33 +99,31 @@ diffuseColorParams = ['// Diffuse color',
ppColorParams = ['param_named u_colorPrimitiveTexture int 0']
## 'Name', '#Define', 'Attached vp', {parameters dict}
cfgAmbient = ['Ambient', 'AMBIENT=1', '', { 'renderSceneVP' : ambientParams } ]
cfgFlat = ['Flat', 'FLAT=1', 'Lighting_VP', { 'renderSceneVP' : lightingParams } ]
cfgAmbient = ['Ambient', '', { 'renderSceneVP' : ambientParams } ]
cfgGouraud = ['Gouraud', '', 'Lighting_VP', { 'renderSceneVP' : lightingParams } ]
cfgFlat = ['Flat', 'FLAT=1', { 'defaultFP' : lightingParamsFlat } ]
cfgPixelLit = ['PixelLit', 'PIXEL_LIT=1', '', { 'defaultFP' : lightingParams,
cfgPixelLit = ['PixelLit', 'PHONG=1', { 'defaultFP' : lightingParams,
'depthPeelingFP' : lightingParams,
'dualDepthPeelingFP' : lightingParams,
'HT_weight_blendFP' : lightingParams,
'weighted_blendFP' : lightingParams } ]
cfgEdgeNormal = ['Edge_Normal', 'EDGE_NORMAL=1', '', { } ]
cfgEdgeNormal = ['Edge_Normal', 'EDGE_NORMAL=1', { } ]
cfgVertexColor = ['VT', 'VERTEX_COLOR=1', '', { } ]
cfgVertexColor = ['VT', 'VERTEX_COLOR=1', { } ]
cfgDiffuseTex = ['DfsTex', 'DIFFUSE_TEX=1', '', { 'defaultFP' : texParams + texAlphaParams,
cfgDiffuseTex = ['DfsTex', 'DIFFUSE_TEX=1', { 'defaultFP' : texParams + texAlphaParams,
'depthPeelingFP' : texParams + texAlphaParams,
'dualDepthPeelingFP' : texParams + texAlphaParams,
'HT_weight_blendFP' : texParams + texAlphaParams,
'weighted_blendFP' : texParams + texAlphaParams } ]
cfgTriangles = ['Triangles', 'TRIANGLES=1', '', { 'renderSceneGP' : [], } ]
cfgQuad = ['Quad', 'QUAD=1', '', { } ]
cfgTetra = ['Tetra', 'TETRA=1', '', { } ]
cfgTriangles = ['Triangles', 'TRIANGLES=1', { 'renderSceneGP' : [], } ]
cfgQuad = ['Quad', 'QUAD=1', { } ]
cfgTetra = ['Tetra', 'TETRA=1', { } ]
cfgPerPrimitiveColor = ['PPColor', 'PER_PRIMITIVE_COLOR=1', '', { 'renderSceneGP' : ppColorParams} ]
cfgPerPrimitiveColor = ['PPColor', 'PER_PRIMITIVE_COLOR=1', { 'renderSceneGP' : ppColorParams} ]
## Configurations for vertex programs
## Basis are the different lighting techniques, and optional are vertex color and diffuse texture
......@@ -133,7 +131,6 @@ configsListVP = []
configsListVP += generatePermutations(cfgAmbient, cfgVertexColor, cfgDiffuseTex)
configsListVP += generatePermutations(cfgFlat, cfgVertexColor, cfgDiffuseTex)
configsListVP += generatePermutations(cfgGouraud, cfgVertexColor, cfgDiffuseTex)
configsListVP += generatePermutations(cfgPixelLit, cfgVertexColor, cfgDiffuseTex)
## Configurations for fragment programs
......@@ -142,7 +139,6 @@ configsListFP = []
configsListFP += generatePermutations(cfgAmbient, cfgVertexColor, cfgDiffuseTex)
configsListFP += generatePermutations(cfgFlat, cfgVertexColor, cfgDiffuseTex)
configsListFP += generatePermutations(cfgGouraud, cfgVertexColor, cfgDiffuseTex)
configsListFP += generatePermutations(cfgPixelLit, cfgVertexColor, cfgDiffuseTex)
configsListFP += [cfgEdgeNormal]
......
......@@ -9,7 +9,7 @@
// Vertex shader materials
//-----------------------------------------------------------------------------
{% for shading, defines, shadersVP, params in configsVP %}
{% for shading, defines, params in configsVP %}
//---------------------------------------------------------------------------
......@@ -23,6 +23,7 @@ vertex_program Default/{{ shading }}_VP glsl
{
// Common
param_named_auto u_worldViewProj worldviewproj_matrix
param_named_auto u_worldView worldview_matrix
param_named_auto u_world world_matrix
param_named_auto u_normalMatrix inverse_transpose_world_matrix
{% for param in params['renderSceneVP'] %}
......@@ -36,7 +37,7 @@ vertex_program Default/{{ shading }}_VP glsl
// Default technique
//-----------------------------------------------------------------------------
{% for shading, defines, shadersVP, params in configsFP %}
{% for shading, defines, params in configsFP %}
//-----------------------------------------------------------------------------
......@@ -58,7 +59,7 @@ fragment_program Default/{{ shading }}_FP glsl
// Cell shading + depth peeling technique
//-----------------------------------------------------------------------------
{% for shading, defines, shadersVP, params in configsVP %}
{% for shading, defines, params in configsVP %}
//---------------------------------------------------------------------------
......
......@@ -9,7 +9,7 @@
// Vertex shader materials
//-----------------------------------------------------------------------------
{% for shading, defines, shadersVP, params in configsVP %}
{% for shading, defines, params in configsVP %}
//---------------------------------------------------------------------------
......@@ -26,7 +26,7 @@ vertex_program R2VB/{{ shading }}_VP glsl
// Geometry shader materials
//-----------------------------------------------------------------------------
{% for shading, defines, shadersGP, params in configsGP %}
{% for shading, defines, params in configsGP %}
//---------------------------------------------------------------------------
......