More tweaks to GLES legacy pipeline
This commit is contained in:
parent
067518df5d
commit
11024569b0
@ -108,7 +108,7 @@ void main ()
|
||||
else if(uMaterialType == Solid2Layer)
|
||||
gl_FragColor = render2LayerSolid();
|
||||
else if(uMaterialType == LightMap)
|
||||
gl_FragColor = renderLightMap();
|
||||
gl_FragColor = renderSolid();
|
||||
else if(uMaterialType == DetailMap)
|
||||
gl_FragColor = renderDetailMap();
|
||||
else if(uMaterialType == SphereMap)
|
||||
|
@ -92,6 +92,7 @@ bool COGLES2FixedPipelineRenderer::OnRender(IMaterialRendererServices* service,
|
||||
Driver->setTextureRenderStates(Driver->getCurrentMaterial(), false);
|
||||
|
||||
s32 materialType = 0;
|
||||
bool second_texture = false;
|
||||
|
||||
switch(Driver->getCurrentMaterial().MaterialType)
|
||||
{
|
||||
@ -102,10 +103,13 @@ bool COGLES2FixedPipelineRenderer::OnRender(IMaterialRendererServices* service,
|
||||
case EMT_LIGHTMAP_ADD:
|
||||
case EMT_LIGHTMAP_M2:
|
||||
case EMT_LIGHTMAP_M4:
|
||||
materialType = 2;
|
||||
break;
|
||||
case EMT_LIGHTMAP_LIGHTING:
|
||||
case EMT_LIGHTMAP_LIGHTING_M2:
|
||||
case EMT_LIGHTMAP_LIGHTING_M4:
|
||||
materialType = 2;
|
||||
second_texture = true;
|
||||
break;
|
||||
case EMT_DETAIL_MAP:
|
||||
materialType = 3;
|
||||
@ -161,6 +165,9 @@ bool COGLES2FixedPipelineRenderer::OnRender(IMaterialRendererServices* service,
|
||||
s32 TextureUnit0 = 0;
|
||||
//s32 TextureUnit1 = 1;
|
||||
|
||||
if (second_texture)
|
||||
TextureUnit0 = 1;
|
||||
|
||||
IMaterialRendererServices::setPixelShaderConstant("uTextureUnit0", &TextureUnit0, 1);
|
||||
//IMaterialRendererServices::setPixelShaderConstant("uTextureUnit1", &TextureUnit1, 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user