Changed Shader conventions
Uniform variable are now CamelCase Former-commit-id: 7b08fb6b7d32f0f9a92b5086719f3e9981483e16
This commit is contained in:
parent
ea1275e4f5
commit
a9e82f6014
|
|
@ -1,10 +1,10 @@
|
||||||
#version 110
|
#version 110
|
||||||
|
|
||||||
varying vec2 TexCoord;
|
varying vec2 vTexCoord;
|
||||||
|
|
||||||
uniform sampler2D diffuseMap;
|
uniform sampler2D DiffuseMap;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_FragColor = texture2D(diffuseMap, TexCoord);
|
gl_FragColor = texture2D(DiffuseMap, vTexCoord);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ attribute vec2 TexCoord0;
|
||||||
|
|
||||||
uniform mat4 WorldViewProjMatrix;
|
uniform mat4 WorldViewProjMatrix;
|
||||||
|
|
||||||
varying vec2 TexCoord;
|
varying vec2 vTexCoord;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = WorldViewProjMatrix * vec4(Position, 1.0);
|
gl_Position = WorldViewProjMatrix * vec4(Position, 1.0);
|
||||||
TexCoord = TexCoord0;
|
vTexCoord = TexCoord0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,10 @@ void NzMaterial::Apply() const
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ambientColorLocation = shader->GetUniformLocation("ambientColor");
|
int ambientColorLocation = shader->GetUniformLocation("AmbientColor");
|
||||||
int diffuseColorLocation = shader->GetUniformLocation("diffuseColor");
|
int diffuseColorLocation = shader->GetUniformLocation("DiffuseColor");
|
||||||
int shininessLocation = shader->GetUniformLocation("shininess");
|
int shininessLocation = shader->GetUniformLocation("Shininess");
|
||||||
int specularColorLocation = shader->GetUniformLocation("specularColor");
|
int specularColorLocation = shader->GetUniformLocation("SpecularColor");
|
||||||
|
|
||||||
if (ambientColorLocation != -1)
|
if (ambientColorLocation != -1)
|
||||||
shader->SendColor(ambientColorLocation, m_ambientColor);
|
shader->SendColor(ambientColorLocation, m_ambientColor);
|
||||||
|
|
@ -52,7 +52,7 @@ void NzMaterial::Apply() const
|
||||||
|
|
||||||
if (m_diffuseMap)
|
if (m_diffuseMap)
|
||||||
{
|
{
|
||||||
int diffuseMapLocation = shader->GetUniformLocation("diffuseMap");
|
int diffuseMapLocation = shader->GetUniformLocation("DiffuseMap");
|
||||||
if (diffuseMapLocation != -1)
|
if (diffuseMapLocation != -1)
|
||||||
{
|
{
|
||||||
nzUInt8 textureUnit;
|
nzUInt8 textureUnit;
|
||||||
|
|
@ -71,7 +71,7 @@ void NzMaterial::Apply() const
|
||||||
|
|
||||||
if (m_specularMap)
|
if (m_specularMap)
|
||||||
{
|
{
|
||||||
int specularMapLocation = shader->GetUniformLocation("specularMap");
|
int specularMapLocation = shader->GetUniformLocation("SpecularMap");
|
||||||
if (specularMapLocation != -1)
|
if (specularMapLocation != -1)
|
||||||
{
|
{
|
||||||
nzUInt8 textureUnit;
|
nzUInt8 textureUnit;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue