Removes gui_solid material shader usages from scene rendering.

This was SVN commit r25582.
This commit is contained in:
vladislavbelov
2021-05-27 20:13:47 +00:00
parent 25b9faf1cb
commit f7ad2daf62
13 changed files with 92 additions and 25 deletions
@@ -0,0 +1,22 @@
!!ARBvp1.0
#ifdef USE_INSTANCING
PARAM instancingTransform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, instancingTransform[0], vertex.position;
DP4 position.y, instancingTransform[1], vertex.position;
DP4 position.z, instancingTransform[2], vertex.position;
MOV position.w, 1.0;
#else
ATTRIB position = vertex.position;
#endif
PARAM transform[4] = { program.local[4..7] };
DP4 result.position.x, transform[0], position;
DP4 result.position.y, transform[1], position;
DP4 result.position.z, transform[2], position;
DP4 result.position.w, transform[3], position;
MOV result.color, vertex.color;
END
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/solid.vp">
<vertex file="arb/model_solid.vp">
<uniform if="USE_INSTANCING" name="instancingTransform" loc="0" type="mat4"/>
<uniform name="transform" loc="4" type="mat4"/>
<stream name="pos"/>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/solid.vp">
<vertex file="arb/model_solid.vp">
<uniform if="USE_INSTANCING" name="instancingTransform" loc="0" type="mat4"/>
<uniform name="transform" loc="4" type="mat4"/>
<stream name="pos"/>
@@ -1,3 +1,7 @@
!!ARBfp1.0
MOV result.color, fragment.color;
PARAM color = program.local[0];
MOV result.color, color;
END
+8 -16
View File
@@ -1,22 +1,14 @@
!!ARBvp1.0
#ifdef USE_INSTANCING
PARAM instancingTransform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, instancingTransform[0], vertex.position;
DP4 position.y, instancingTransform[1], vertex.position;
DP4 position.z, instancingTransform[2], vertex.position;
MOV position.w, 1.0;
#else
ATTRIB position = vertex.position;
#endif
PARAM transform[4] = { program.local[4..7] };
PARAM transform[4] = { program.local[0..3] };
DP4 result.position.x, transform[0], position;
DP4 result.position.y, transform[1], position;
DP4 result.position.z, transform[2], position;
DP4 result.position.w, transform[3], position;
TEMP position;
MOV result.color, vertex.color;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
END
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/solid.vp">
<uniform name="transform" loc="0" type="mat4"/>
<stream name="pos"/>
</vertex>
<fragment file="arb/solid.fp">
<uniform name="color" loc="0" type="vec4"/>
</fragment>
</program>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/solid"/>
</technique>
<technique>
<require shaders="glsl"/>
<pass shader="glsl/solid"/>
</technique>
</effect>
@@ -0,0 +1,10 @@
#version 110
uniform mat4 transform;
attribute vec3 a_vertex;
void main()
{
gl_Position = transform * vec4(a_vertex, 1.0);
}
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/solid.vs">
<stream name="pos"/>
<attrib name="a_vertex" semantics="gl_Vertex"/>
</vertex>
<fragment file="glsl/solid.fs"/>
</program>
+1
View File
@@ -150,6 +150,7 @@ X2(skinBlendMatrices_0, "skinBlendMatrices[0]")
X(skyBoxRot)
X(skyCube)
X(sky_simple)
X(solid)
X(sunColor)
X(sunDir)
X(tex)
+4 -4
View File
@@ -226,7 +226,7 @@ void CDebugRenderer::DrawBoundingBox(const CBoundingBoxAligned& boundingBox, con
void CDebugRenderer::DrawBoundingBox(const CBoundingBoxAligned& boundingBox, const CColor& color, const CMatrix3D& transform)
{
CShaderTechniquePtr shaderTech = g_Renderer.GetShaderManager().LoadEffect(str_gui_solid);
CShaderTechniquePtr shaderTech = g_Renderer.GetShaderManager().LoadEffect(str_solid);
shaderTech->BeginPass();
CShaderProgramPtr shader = shaderTech->GetShader();
@@ -272,7 +272,7 @@ void CDebugRenderer::DrawBoundingBoxOutline(const CBoundingBoxAligned& boundingB
void CDebugRenderer::DrawBoundingBoxOutline(const CBoundingBoxAligned& boundingBox, const CColor& color, const CMatrix3D& transform)
{
CShaderTechniquePtr shaderTech = g_Renderer.GetShaderManager().LoadEffect(str_gui_solid);
CShaderTechniquePtr shaderTech = g_Renderer.GetShaderManager().LoadEffect(str_solid);
shaderTech->BeginPass();
CShaderProgramPtr shader = shaderTech->GetShader();
@@ -315,7 +315,7 @@ void CDebugRenderer::DrawBoundingBoxOutline(const CBoundingBoxAligned& boundingB
void CDebugRenderer::DrawBrush(const CBrush& brush, const CColor& color)
{
CShaderTechniquePtr shaderTech = g_Renderer.GetShaderManager().LoadEffect(str_gui_solid);
CShaderTechniquePtr shaderTech = g_Renderer.GetShaderManager().LoadEffect(str_solid);
shaderTech->BeginPass();
CShaderProgramPtr shader = shaderTech->GetShader();
@@ -362,7 +362,7 @@ void CDebugRenderer::DrawBrush(const CBrush& brush, const CColor& color)
void CDebugRenderer::DrawBrushOutline(const CBrush& brush, const CColor& color)
{
CShaderTechniquePtr shaderTech = g_Renderer.GetShaderManager().LoadEffect(str_gui_solid);
CShaderTechniquePtr shaderTech = g_Renderer.GetShaderManager().LoadEffect(str_solid);
shaderTech->BeginPass();
CShaderProgramPtr shader = shaderTech->GetShader();
+1 -1
View File
@@ -464,7 +464,7 @@ void SilhouetteRenderer::RenderDebugOverlays(const CCamera& UNUSED(camera))
m = proj * m;
CShaderTechniquePtr shaderTech = g_Renderer.GetShaderManager().LoadEffect(str_gui_solid);
CShaderTechniquePtr shaderTech = g_Renderer.GetShaderManager().LoadEffect(str_solid);
shaderTech->BeginPass();
CShaderProgramPtr shader = shaderTech->GetShader();
+1 -1
View File
@@ -276,7 +276,7 @@ void TerrainRenderer::RenderTerrainShader(const CShaderDefines& context, int cul
return;
// render the solid black sides of the map first
CShaderTechniquePtr techSolid = g_Renderer.GetShaderManager().LoadEffect(str_gui_solid);
CShaderTechniquePtr techSolid = g_Renderer.GetShaderManager().LoadEffect(str_solid);
techSolid->BeginPass();
CShaderProgramPtr shaderSolid = techSolid->GetShader();
shaderSolid->Uniform(str_transform, g_Renderer.GetViewCamera().GetViewProjection());