Remove Untextured material.
This commit is contained in:
parent
80cab0ed28
commit
d5c91dcfe4
@ -1,18 +1,14 @@
|
||||
uniform sampler2D Albedo;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
in vec4 color;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
vec3 getLightFactor(float specMapValue);
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture(Albedo, uv);
|
||||
vec4 col = texture(Albedo, uv) * color;
|
||||
vec3 LightFactor = getLightFactor(1.);
|
||||
FragColor = vec4(color.xyz * LightFactor, 1.);
|
||||
FragColor = vec4(col.xyz * LightFactor, 1.);
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ uniform sampler2D tex;
|
||||
|
||||
in vec2 uv;
|
||||
in vec3 nor;
|
||||
in vec4 color;
|
||||
layout (location = 0) out vec3 RSMColor;
|
||||
layout (location = 1) out vec3 RSMNormals;
|
||||
|
||||
void main()
|
||||
{
|
||||
RSMColor = texture(tex, uv).xyz;
|
||||
RSMColor = texture(tex, uv).xyz * color.rgb;
|
||||
RSMNormals = .5 * normalize(nor) + .5;
|
||||
}
|
||||
|
@ -11,10 +11,12 @@ uniform mat4 TextureMatrix =
|
||||
|
||||
layout(location = 0) in vec3 Position;
|
||||
layout(location = 1) in vec3 Normal;
|
||||
layout(location = 2) in vec4 Color;
|
||||
layout(location = 3) in vec2 Texcoord;
|
||||
|
||||
out vec3 nor;
|
||||
out vec2 uv;
|
||||
out vec4 color;
|
||||
|
||||
|
||||
void main(void)
|
||||
@ -24,4 +26,5 @@ void main(void)
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
||||
nor = (vec4(Normal, 0.)).xyz;
|
||||
uv = (TextureMatrix * vec4(Texcoord, 1., 1.)).xy;
|
||||
color = Color.zyxw;
|
||||
}
|
||||
|
@ -587,7 +587,6 @@ void IrrDriver::renderSolidSecondPass()
|
||||
GroupedSM<SM_SPLATTING>::reset();
|
||||
GroupedSM<SM_UNLIT>::reset();
|
||||
GroupedSM<SM_DETAILS>::reset();
|
||||
GroupedSM<SM_UNTEXTURED>::reset();
|
||||
setTexture(0, m_rtts->getRenderTarget(RTT_TMP1), GL_NEAREST, GL_NEAREST);
|
||||
setTexture(1, m_rtts->getRenderTarget(RTT_TMP2), GL_NEAREST, GL_NEAREST);
|
||||
setTexture(2, m_rtts->getRenderTarget(RTT_HALF1_R), GL_LINEAR, GL_LINEAR);
|
||||
@ -625,10 +624,6 @@ void IrrDriver::renderSolidSecondPass()
|
||||
glUseProgram(MeshShader::DetailledObjectPass2Shader::Program);
|
||||
for (unsigned i = 0; i < GroupedSM<SM_DETAILS>::MeshSet.size(); i++)
|
||||
drawDetailledObjectPass2(*GroupedSM<SM_DETAILS>::MeshSet[i], GroupedSM<SM_DETAILS>::MVPSet[i]);
|
||||
|
||||
glUseProgram(MeshShader::UntexturedObjectShader::Program);
|
||||
for (unsigned i = 0; i < GroupedSM<SM_UNTEXTURED>::MeshSet.size(); i++)
|
||||
drawUntexturedObject(*GroupedSM<SM_UNTEXTURED>::MeshSet[i], GroupedSM<SM_UNTEXTURED>::MVPSet[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,13 +199,6 @@ void STKAnimatedMesh::render()
|
||||
GroupedSM<SM_DETAILS>::TIMVSet.push_back(invmodel);
|
||||
}
|
||||
|
||||
for_in(mesh, ShadedMesh[SM_UNTEXTURED])
|
||||
{
|
||||
GroupedSM<SM_UNTEXTURED>::MeshSet.push_back(mesh);
|
||||
GroupedSM<SM_UNTEXTURED>::MVPSet.push_back(AbsoluteTransformation);
|
||||
GroupedSM<SM_UNTEXTURED>::TIMVSet.push_back(invmodel);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,6 @@ ShadedMaterial MaterialTypeToShadedMaterial(video::E_MATERIAL_TYPE type, video::
|
||||
return SM_UNLIT;
|
||||
else if (textures[1] && type != irr_driver->getShader(ES_NORMAL_MAP))
|
||||
return SM_DETAILS;
|
||||
else if (!textures[0])
|
||||
return SM_UNTEXTURED;
|
||||
else
|
||||
return SM_DEFAULT;
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ enum ShadedMaterial
|
||||
SM_GRASS,
|
||||
SM_UNLIT,
|
||||
SM_DETAILS,
|
||||
SM_UNTEXTURED,
|
||||
SM_COUNT
|
||||
};
|
||||
|
||||
|
@ -365,13 +365,6 @@ void STKMeshSceneNode::render()
|
||||
GroupedSM<SM_DETAILS>::TIMVSet.push_back(invmodel);
|
||||
}
|
||||
|
||||
for_in(mesh, ShadedMesh[SM_UNTEXTURED])
|
||||
{
|
||||
GroupedSM<SM_UNTEXTURED>::MeshSet.push_back(mesh);
|
||||
GroupedSM<SM_UNTEXTURED>::MVPSet.push_back(AbsoluteTransformation);
|
||||
GroupedSM<SM_UNTEXTURED>::TIMVSet.push_back(invmodel);
|
||||
}
|
||||
|
||||
if (!ShadedMesh[SM_GRASS].empty())
|
||||
glUseProgram(MeshShader::GrassPass2Shader::Program);
|
||||
for_in(mesh, ShadedMesh[SM_GRASS])
|
||||
|
Loading…
Reference in New Issue
Block a user