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
|
||||
|
||||
varying vec2 TexCoord;
|
||||
varying vec2 vTexCoord;
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
uniform sampler2D DiffuseMap;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(diffuseMap, TexCoord);
|
||||
gl_FragColor = texture2D(DiffuseMap, vTexCoord);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ attribute vec2 TexCoord0;
|
|||
|
||||
uniform mat4 WorldViewProjMatrix;
|
||||
|
||||
varying vec2 TexCoord;
|
||||
varying vec2 vTexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = WorldViewProjMatrix * vec4(Position, 1.0);
|
||||
TexCoord = TexCoord0;
|
||||
vTexCoord = TexCoord0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ void NzMaterial::Apply() const
|
|||
}
|
||||
#endif
|
||||
|
||||
int ambientColorLocation = shader->GetUniformLocation("ambientColor");
|
||||
int diffuseColorLocation = shader->GetUniformLocation("diffuseColor");
|
||||
int shininessLocation = shader->GetUniformLocation("shininess");
|
||||
int specularColorLocation = shader->GetUniformLocation("specularColor");
|
||||
int ambientColorLocation = shader->GetUniformLocation("AmbientColor");
|
||||
int diffuseColorLocation = shader->GetUniformLocation("DiffuseColor");
|
||||
int shininessLocation = shader->GetUniformLocation("Shininess");
|
||||
int specularColorLocation = shader->GetUniformLocation("SpecularColor");
|
||||
|
||||
if (ambientColorLocation != -1)
|
||||
shader->SendColor(ambientColorLocation, m_ambientColor);
|
||||
|
|
@ -52,7 +52,7 @@ void NzMaterial::Apply() const
|
|||
|
||||
if (m_diffuseMap)
|
||||
{
|
||||
int diffuseMapLocation = shader->GetUniformLocation("diffuseMap");
|
||||
int diffuseMapLocation = shader->GetUniformLocation("DiffuseMap");
|
||||
if (diffuseMapLocation != -1)
|
||||
{
|
||||
nzUInt8 textureUnit;
|
||||
|
|
@ -71,7 +71,7 @@ void NzMaterial::Apply() const
|
|||
|
||||
if (m_specularMap)
|
||||
{
|
||||
int specularMapLocation = shader->GetUniformLocation("specularMap");
|
||||
int specularMapLocation = shader->GetUniformLocation("SpecularMap");
|
||||
if (specularMapLocation != -1)
|
||||
{
|
||||
nzUInt8 textureUnit;
|
||||
|
|
|
|||
Loading…
Reference in New Issue