mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
HPL1: rename shaders
This commit is contained in:
parent
e60398f271
commit
95791efb81
@ -72,7 +72,7 @@ cMaterial_Additive::cMaterial_Additive(const tString &asName, iLowLevelGraphics
|
||||
mbIsGlowing = false;
|
||||
mbUsesLights = false;
|
||||
|
||||
_fogShader = mpProgramManager->CreateProgram("Fog_Trans", "Fog_Trans_Alpha");
|
||||
_fogShader = mpProgramManager->CreateProgram("hpl1_Fog_Trans", "hpl1_Fog_Trans_Alpha");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -70,7 +70,7 @@ cMaterial_Alpha::cMaterial_Alpha(const tString &asName, iLowLevelGraphics *apLow
|
||||
mbIsGlowing = false;
|
||||
mbUsesLights = false;
|
||||
|
||||
_fogShader = mpProgramManager->CreateProgram("Fog_Trans", "Fog_Trans_Alpha");
|
||||
_fogShader = mpProgramManager->CreateProgram("hpl1_Fog_Trans", "hpl1_Fog_Trans_Alpha");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -102,8 +102,8 @@ iMaterial_BaseLight::iMaterial_BaseLight(const tString &asLightVertexProgram,
|
||||
_shaders[eBaseLightProgram_Spot2] = mpProgramManager->CreateProgram(sSpotVtxProgram, sSpotFragProgram2);
|
||||
}
|
||||
|
||||
_diffuseShader = mpProgramManager->CreateProgram("Diffuse_Color", "Diffuse_Color");
|
||||
_ambientShader = mpProgramManager->CreateProgram("Diffuse_Color", "Ambient_Color");
|
||||
_diffuseShader = mpProgramManager->CreateProgram("hpl1_Diffuse_Color", "hpl1_Diffuse_Color");
|
||||
_ambientShader = mpProgramManager->CreateProgram("hpl1_Diffuse_Color", "hpl1_Ambient_Color");
|
||||
|
||||
///////////////////////////////////////////
|
||||
// Normalization map
|
||||
|
@ -44,8 +44,8 @@ cMaterial_Bump::cMaterial_Bump(const tString &asName, iLowLevelGraphics *apLowLe
|
||||
cImageManager *apImageManager, cTextureManager *apTextureManager,
|
||||
cRenderer2D *apRenderer, cGpuProgramManager *apProgramManager,
|
||||
eMaterialPicture aPicture, cRenderer3D *apRenderer3D)
|
||||
: iMaterial_BaseLight("Diffuse_Light",
|
||||
"Bump_Light",
|
||||
: iMaterial_BaseLight("hpl1_Diffuse_Light",
|
||||
"hpl1_Bump_Light",
|
||||
asName, apLowLevelGraphics, apImageManager, apTextureManager, apRenderer, apProgramManager,
|
||||
aPicture, apRenderer3D) {
|
||||
mbUseSpecular = false;
|
||||
|
@ -45,8 +45,8 @@ cMaterial_BumpColorSpec::cMaterial_BumpColorSpec(const tString &asName, iLowLeve
|
||||
cImageManager *apImageManager, cTextureManager *apTextureManager,
|
||||
cRenderer2D *apRenderer, cGpuProgramManager *apProgramManager,
|
||||
eMaterialPicture aPicture, cRenderer3D *apRenderer3D)
|
||||
: iMaterial_BaseLight("DiffuseSpec_Light",
|
||||
"BumpColorSpec_Light",
|
||||
: iMaterial_BaseLight("hpl1_DiffuseSpec_Light",
|
||||
"hpl1_BumpColorSpec_Light",
|
||||
asName, apLowLevelGraphics, apImageManager, apTextureManager, apRenderer, apProgramManager,
|
||||
aPicture, apRenderer3D) {
|
||||
mbUseSpecular = true;
|
||||
|
@ -44,8 +44,8 @@ cMaterial_BumpSpec::cMaterial_BumpSpec(const tString &asName, iLowLevelGraphics
|
||||
cImageManager *apImageManager, cTextureManager *apTextureManager,
|
||||
cRenderer2D *apRenderer, cGpuProgramManager *apProgramManager,
|
||||
eMaterialPicture aPicture, cRenderer3D *apRenderer3D)
|
||||
: iMaterial_BaseLight("DiffuseSpec_Light",
|
||||
"BumpSpec_Light",
|
||||
: iMaterial_BaseLight("hpl1_DiffuseSpec_Light",
|
||||
"hpl1_BumpSpec_Light",
|
||||
asName, apLowLevelGraphics, apImageManager, apTextureManager, apRenderer, apProgramManager,
|
||||
aPicture, apRenderer3D) {
|
||||
mbUseSpecular = true;
|
||||
|
@ -52,7 +52,7 @@ cMaterial_BumpSpec2D::cMaterial_BumpSpec2D(const tString &asName, iLowLevelGraph
|
||||
mbHasSpecular = true;
|
||||
mType = eMaterialType_BumpSpec;
|
||||
|
||||
_shader = mpProgramManager->CreateProgram("BumpSpec2D_Light", "BumpSpec2D_Light");
|
||||
_shader = mpProgramManager->CreateProgram("hpl1_BumpSpec2D_Light", "hpl1_BumpSpec2D_Light");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -43,8 +43,8 @@ cMaterial_Diffuse::cMaterial_Diffuse(const tString &asName, iLowLevelGraphics *a
|
||||
cImageManager *apImageManager, cTextureManager *apTextureManager,
|
||||
cRenderer2D *apRenderer, cGpuProgramManager *apProgramManager,
|
||||
eMaterialPicture aPicture, cRenderer3D *apRenderer3D)
|
||||
: iMaterial_BaseLight("Diffuse_Light",
|
||||
"Diffuse_Light",
|
||||
: iMaterial_BaseLight("hpl1_Diffuse_Light",
|
||||
"hpl1_Diffuse_Light",
|
||||
asName, apLowLevelGraphics, apImageManager, apTextureManager, apRenderer, apProgramManager,
|
||||
aPicture, apRenderer3D) {
|
||||
mbUseSpecular = false;
|
||||
|
@ -43,8 +43,8 @@ cMaterial_DiffuseSpec::cMaterial_DiffuseSpec(const tString &asName, iLowLevelGra
|
||||
cImageManager *apImageManager, cTextureManager *apTextureManager,
|
||||
cRenderer2D *apRenderer, cGpuProgramManager *apProgramManager,
|
||||
eMaterialPicture aPicture, cRenderer3D *apRenderer3D)
|
||||
: iMaterial_BaseLight("DiffuseSpec_Light",
|
||||
"DiffuseSpec_Light",
|
||||
: iMaterial_BaseLight("hpl1_DiffuseSpec_Light",
|
||||
"hpl1_DiffuseSpec_Light",
|
||||
asName, apLowLevelGraphics, apImageManager, apTextureManager, apRenderer, apProgramManager,
|
||||
aPicture, apRenderer3D) {
|
||||
mbUseSpecular = true;
|
||||
|
@ -76,8 +76,8 @@ cMaterial_EnvMap_Reflect::cMaterial_EnvMap_Reflect(const tString &asName, iLowLe
|
||||
mbIsGlowing = false;
|
||||
mbUsesLights = false;
|
||||
|
||||
_diffuseProgram = mpProgramManager->CreateProgram("Diffuse_Color", "Diffuse_Color");
|
||||
_diffuseReflectProgram = mpProgramManager->CreateProgram("Diffuse_EnvMap_Reflect", "Diffuse_EnvMap_Reflect");
|
||||
_diffuseProgram = mpProgramManager->CreateProgram("hpl1_Diffuse_Color", "hpl1_Diffuse_Color");
|
||||
_diffuseReflectProgram = mpProgramManager->CreateProgram("hpl1_Diffuse_EnvMap_Reflect", "hpl1_Diffuse_EnvMap_Reflect");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -63,17 +63,17 @@ iMaterial_Fallback01_BaseLight::iMaterial_Fallback01_BaseLight(
|
||||
|
||||
const char *firstPassFragment = "";
|
||||
if (abNormalMap)
|
||||
firstPassFragment = "Fallback01_Bump_Light";
|
||||
firstPassFragment = "hpl1_Fallback01_Bump_Light";
|
||||
else
|
||||
firstPassFragment = "Fallback01_Diffuse_Light_p1";
|
||||
firstPassFragment = "hpl1_Fallback01_Diffuse_Light_p1";
|
||||
|
||||
_programs[eBaseLightProgram_Point1] = mpProgramManager->CreateProgram("Fallback01_Diffuse_Light_p1", firstPassFragment);
|
||||
_programs[eBaseLightProgram_Point2] = mpProgramManager->CreateProgram("Fallback01_Diffuse_Light_p2", "Fallback01_Diffuse_Light_p2");
|
||||
_programs[eBaseLightProgram_Spot1] = mpProgramManager->CreateProgram("Fallback01_Diffuse_Light_p1", firstPassFragment);
|
||||
_programs[eBaseLightProgram_Spot2] = mpProgramManager->CreateProgram("Fallback01_Diffuse_Light_Spot_p2", "Fallback01_Diffuse_Light_Spot");
|
||||
_programs[eBaseLightProgram_Point1] = mpProgramManager->CreateProgram("hpl1_Fallback01_Diffuse_Light_p1", firstPassFragment);
|
||||
_programs[eBaseLightProgram_Point2] = mpProgramManager->CreateProgram("hpl1_Fallback01_Diffuse_Light_p2", "hpl1_Fallback01_Diffuse_Light_p2");
|
||||
_programs[eBaseLightProgram_Spot1] = mpProgramManager->CreateProgram("hpl1_Fallback01_Diffuse_Light_p1", firstPassFragment);
|
||||
_programs[eBaseLightProgram_Spot2] = mpProgramManager->CreateProgram("hpl1_Fallback01_Diffuse_Light_Spot_p2", "hpl1_Fallback01_Diffuse_Light_Spot");
|
||||
|
||||
_diffuseShader = mpProgramManager->CreateProgram("Diffuse_Color", "Diffuse_Color");
|
||||
_ambientShader = mpProgramManager->CreateProgram("Diffuse_Color", "Ambient_Color");
|
||||
_diffuseShader = mpProgramManager->CreateProgram("hpl1_Diffuse_Color", "hpl1_Diffuse_Color");
|
||||
_ambientShader = mpProgramManager->CreateProgram("hpl1_Diffuse_Color", "hpl1_Ambient_Color");
|
||||
|
||||
mpNormalizationMap = mpTextureManager->CreateCubeMap("Normalization", false);
|
||||
mpNormalizationMap->SetWrapS(eTextureWrap_ClampToEdge);
|
||||
|
@ -55,15 +55,15 @@ iMaterial_Fallback02_BaseLight::iMaterial_Fallback02_BaseLight(
|
||||
|
||||
Common::fill(_gpuPrograms, _gpuPrograms + eBaseLightProgram_LastEnum, nullptr);
|
||||
|
||||
_gpuPrograms[eBaseLightProgram_Point1] = mpProgramManager->CreateProgram("Fallback02_Diffuse_Light_p1", "Fallback02_Diffuse_Light_p1");
|
||||
_gpuPrograms[eBaseLightProgram_Point1] = mpProgramManager->CreateProgram("hpl1_Fallback02_Diffuse_Light_p1", "hpl1_Fallback02_Diffuse_Light_p1");
|
||||
//the second pass is the same as the second pass of fallback01
|
||||
_gpuPrograms[eBaseLightProgram_Point2] = mpProgramManager->CreateProgram("Fallback02_Diffuse_Light_p2", "Fallback01_Diffuse_Light_p2");
|
||||
_gpuPrograms[eBaseLightProgram_Spot1] = mpProgramManager->CreateProgram("Fallback02_Diffuse_Light_p1", "Fallback02_Diffuse_Light_p1");
|
||||
_gpuPrograms[eBaseLightProgram_Spot2] = mpProgramManager->CreateProgram("Fallback02_Diffuse_Light_Spot_p2", "Fallback02_Diffuse_Light_Spot_p2");
|
||||
_gpuPrograms[eBaseLightProgram_Spot3] = mpProgramManager->CreateProgram("Fallback02_Diffuse_Light_Spot_p3", "Fallback02_Diffuse_Light_Spot_p3");
|
||||
_gpuPrograms[eBaseLightProgram_Point2] = mpProgramManager->CreateProgram("hpl1_Fallback02_Diffuse_Light_p2", "hpl1_Fallback01_Diffuse_Light_p2");
|
||||
_gpuPrograms[eBaseLightProgram_Spot1] = mpProgramManager->CreateProgram("hpl1_Fallback02_Diffuse_Light_p1", "hpl1_Fallback02_Diffuse_Light_p1");
|
||||
_gpuPrograms[eBaseLightProgram_Spot2] = mpProgramManager->CreateProgram("hpl1_Fallback02_Diffuse_Light_Spot_p2", "hpl1_Fallback02_Diffuse_Light_Spot_p2");
|
||||
_gpuPrograms[eBaseLightProgram_Spot3] = mpProgramManager->CreateProgram("hpl1_Fallback02_Diffuse_Light_Spot_p3", "hpl1_Fallback02_Diffuse_Light_Spot_p3");
|
||||
|
||||
_diffuseGpuProgram = mpProgramManager->CreateProgram("Diffuse_Color", "Diffuse_Color");
|
||||
_ambientGpuProgram = mpProgramManager->CreateProgram("Diffuse_Color", "Ambient_Color");
|
||||
_diffuseGpuProgram = mpProgramManager->CreateProgram("hpl1_Diffuse_Color", "hpl1_Diffuse_Color");
|
||||
_ambientGpuProgram = mpProgramManager->CreateProgram("hpl1_Diffuse_Color", "hpl1_Ambient_Color");
|
||||
|
||||
mpNormalizationMap = mpTextureManager->CreateCubeMap("Normalization", false);
|
||||
mpNormalizationMap->SetWrapS(eTextureWrap_ClampToEdge);
|
||||
|
@ -71,7 +71,7 @@ cMaterial_Modulative::cMaterial_Modulative(const tString &asName, iLowLevelGraph
|
||||
mbIsGlowing = false;
|
||||
mbUsesLights = false;
|
||||
|
||||
_fogShader = mpProgramManager->CreateProgram("Fog_Trans", "Fog_Trans_Mod");
|
||||
_fogShader = mpProgramManager->CreateProgram("hpl1_Fog_Trans", "hpl1_Fog_Trans_Mod");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -69,7 +69,7 @@ cMaterial_ModulativeX2::cMaterial_ModulativeX2(const tString &asName, iLowLevelG
|
||||
mbIsTransperant = true;
|
||||
mbIsGlowing = false;
|
||||
mbUsesLights = false;
|
||||
_fogShader = mpProgramManager->CreateProgram("Fog_Trans", "Fog_Trans_ModX2");
|
||||
_fogShader = mpProgramManager->CreateProgram("hpl1_Fog_Trans", "hpl1_Fog_Trans_ModX2");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -85,9 +85,9 @@ cMaterial_Water::cMaterial_Water(const tString &asName, iLowLevelGraphics *apLow
|
||||
mbIsGlowing = false;
|
||||
mbUsesLights = false;
|
||||
|
||||
_fogProgram = mpProgramManager->CreateProgram("Water_Fog", "Water_Fog");
|
||||
_diffuseProgram = mpProgramManager->CreateProgram("Water_Diffuse", "Water_Diffuse");
|
||||
_refractProgram = mpProgramManager->CreateProgram("refract_water", "refract_water");
|
||||
_fogProgram = mpProgramManager->CreateProgram("hpl1_Water_Fog", "hpl1_Water_Fog");
|
||||
_diffuseProgram = mpProgramManager->CreateProgram("hpl1_Water_Diffuse", "hpl1_Water_Diffuse");
|
||||
_refractProgram = mpProgramManager->CreateProgram("hpl1_refract_water", "hpl1_refract_water");
|
||||
|
||||
mfTime = 0;
|
||||
}
|
||||
|
@ -116,15 +116,15 @@ cRenderer3D::cRenderer3D(iLowLevelGraphics *apLowLevelGraphics, cResources *apRe
|
||||
Hpl1::logInfo(Hpl1::kDebugGraphics, "%s", "Load Renderer3D gpu programs:\n");
|
||||
cGpuProgramManager *pProgramManager = apResources->GetGpuProgramManager();
|
||||
|
||||
mRenderSettings.extrudeProgram = pProgramManager->CreateProgram("ShadowExtrude", "ShadowExtrude");
|
||||
mRenderSettings.extrudeProgram = pProgramManager->CreateProgram("hpl1_ShadowExtrude", "hpl1_ShadowExtrude");
|
||||
|
||||
///////////////////////////////////
|
||||
// Load diffuse program, for stuff like query rendering
|
||||
_diffuseProgram = pProgramManager->CreateProgram("Diffuse_Color", "Diffuse_Color");
|
||||
_diffuseProgram = pProgramManager->CreateProgram("hpl1_Diffuse_Color", "hpl1_Diffuse_Color");
|
||||
|
||||
///////////////////////////////////
|
||||
// Fog Vertex Program Init
|
||||
_solidFogProgram = pProgramManager->CreateProgram("Fog_Solid", "Fog_Solid");
|
||||
_solidFogProgram = pProgramManager->CreateProgram("hpl1_Fog_Solid", "hpl1_Fog_Solid");
|
||||
|
||||
///////////////////////////////////
|
||||
// Fog Texture Init
|
||||
@ -186,8 +186,8 @@ cRenderer3D::cRenderer3D(iLowLevelGraphics *apLowLevelGraphics, cResources *apRe
|
||||
/////////////////////////////////////////////
|
||||
// Create Refraction programs
|
||||
mbRefractionAvailable = true;
|
||||
_refractProgram = pProgramManager->CreateProgram("refract", "refract");
|
||||
_refractSpecProgram = pProgramManager->CreateProgram("refract", "refract_special");
|
||||
_refractProgram = pProgramManager->CreateProgram("hpl1_refract", "hpl1_refract");
|
||||
_refractSpecProgram = pProgramManager->CreateProgram("hpl1_refract", "hpl1_refract_special");
|
||||
if (!_refractProgram || !_refractSpecProgram) {
|
||||
mbRefractionAvailable = false;
|
||||
Hpl1::logInfo(Hpl1::kDebugGraphics, "%s", "refraction will not be supported");
|
||||
|
@ -92,12 +92,12 @@ cRendererPostEffects::cRendererPostEffects(iLowLevelGraphics *apLowLevelGraphics
|
||||
/////////////////
|
||||
// Blur programs
|
||||
mbBlurFallback = false; // Set to true if the fallbacks are used.
|
||||
_blur2DProgram = mpGpuManager->CreateProgram("PostEffect_Blur", "PostEffect_Blur_2D");
|
||||
_blurRectProgram = mpGpuManager->CreateProgram("PostEffect_Blur", "PostEffect_Blur_Rect");
|
||||
_blur2DProgram = mpGpuManager->CreateProgram("hpl1_PostEffect_Blur", "hpl1_PostEffect_Blur_2D");
|
||||
_blurRectProgram = mpGpuManager->CreateProgram("hpl1_PostEffect_Blur", "hpl1_PostEffect_Blur_Rect");
|
||||
|
||||
/////////////////
|
||||
// Bloom programs
|
||||
_bloomProgram = mpGpuManager->CreateProgram("PostEffect_Bloom", "PostEffect_Bloom");
|
||||
_bloomProgram = mpGpuManager->CreateProgram("hpl1_PostEffect_Bloom", "hpl1_PostEffect_Bloom");
|
||||
|
||||
// Bloom blur textures
|
||||
mpBloomBlurTexture = mpLowLevelGraphics->CreateTexture(
|
||||
@ -114,11 +114,11 @@ cRendererPostEffects::cRendererPostEffects(iLowLevelGraphics *apLowLevelGraphics
|
||||
|
||||
/////////////////
|
||||
// MotionBlur programs
|
||||
_motionBlurProgram = mpGpuManager->CreateProgram("PostEffect_Motion", "PostEffect_Motion"); // CHECK APPLE
|
||||
_motionBlurProgram = mpGpuManager->CreateProgram("hpl1_PostEffect_Motion", "hpl1_PostEffect_Motion"); // CHECK APPLE
|
||||
|
||||
/////////////////
|
||||
// Depth of Field programs
|
||||
_depthOfFieldProgram = mpGpuManager->CreateProgram("PostEffect_DoF", "PostEffect_DoF");
|
||||
_depthOfFieldProgram = mpGpuManager->CreateProgram("hpl1_PostEffect_DoF", "hpl1_PostEffect_DoF");
|
||||
|
||||
// Depth of Field blur textures
|
||||
mpDofBlurTexture = mpLowLevelGraphics->CreateTexture(cVector2l(256, 256),
|
||||
|
Loading…
Reference in New Issue
Block a user