Updated shader convention
Vertex input are now prefixed by "Vertex" (VertexPosition, VertexNormal, ..) Same for Material input (MaterialAmbientColor, MaterialShininess, ...) Former-commit-id: 1fbf8b8b32546a21ee23ff83714c860a9a8fce4f
This commit is contained in:
@@ -111,14 +111,14 @@ bool NzGLSLShader::Create()
|
||||
return false;
|
||||
}
|
||||
|
||||
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Position], "Position");
|
||||
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Normal], "Normal");
|
||||
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Diffuse], "Diffuse");
|
||||
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Tangent], "Tangent");
|
||||
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Position], "VertexPosition");
|
||||
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Normal], "VertexNormal");
|
||||
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Diffuse], "VertexDiffuse");
|
||||
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Tangent], "VertexTangent");
|
||||
|
||||
NzString uniform;
|
||||
uniform.Reserve(10); // 8 + 2
|
||||
uniform = "TexCoord";
|
||||
uniform.Reserve(16); // 14 + 2
|
||||
uniform = "VertexTexCoord";
|
||||
|
||||
unsigned int maxTexCoords = NzRenderer::GetMaxTextureUnits();
|
||||
for (unsigned int i = 0; i < maxTexCoords; ++i)
|
||||
|
||||
Reference in New Issue
Block a user