Initial implementation of the new Base Game Template and some starting modules.

This makes some tweaks to the engine to support this, specifically, it tweaks the hardcoded shaderpaths to defer to a pref variable, so none of the shader paths are hardcoded.

Also tweaks how post effects read in texture files, removing a bizzare filepath interpretation choice, where if the file path didn't start with "/" it forcefully appended the script's file path. This made it impossible to have images not in the same dir as the script file defining the post effect.

This was changed and the existing template's post effects tweaked for now to just add "./" to those few paths impacted, as well as the perf vars to support the non-hardcoded shader paths in the engine.
This commit is contained in:
Areloch 2017-02-24 02:40:56 -06:00
parent 5c8a82180b
commit 1ed8b05169
1572 changed files with 146699 additions and 85 deletions

View file

@ -28,6 +28,12 @@ $WORD::BITDEPTH = 3;
$WORD::REFRESH = 4;
$WORD::AA = 5;
//We need to hook the missing/warn material stuff early, so do it here
$Core::MissingTexturePath = "core/art/missingTexture";
$Core::UnAvailableTexturePath = "core/art/unavailable";
$Core::WarningTexturePath = "core/art/warnMat";
$Core::CommonShaderPath = "shaders/common";
//---------------------------------------------------------------------------------------------
// CorePackage
// Adds functionality for this mod to some standard functions.

View file

@ -55,6 +55,7 @@ singleton PostEffect( GammaPostFX )
texture[0] = "$backBuffer";
texture[1] = $HDRPostFX::colorCorrectionRamp;
targetFormat = getBestHDRFormat();
};
function GammaPostFX::preProcess( %this )

View file

@ -46,7 +46,7 @@ singleton ShaderData( MLAA_EdgeDetectionShader )
{
DXVertexShaderFile = "shaders/common/postFx/mlaa/offsetV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/mlaa/edgeDetectionP.hlsl";
OGLVertexShaderFile = "shaders/common/postFx/mlaa/gl/offsetV.glsl";
OGLPixelShaderFile = "shaders/common/postFx/mlaa/gl/edgeDetectionP.glsl";
@ -75,7 +75,7 @@ singleton ShaderData( MLAA_BlendWeightCalculationShader )
{
DXVertexShaderFile = "shaders/common/postFx/mlaa/passthruV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/mlaa/blendWeightCalculationP.hlsl";
OGLVertexShaderFile = "shaders/common/postFx/mlaa/gl/passthruV.glsl";
OGLPixelShaderFile = "shaders/common/postFx/mlaa/gl/blendWeightCalculationP.glsl";
@ -162,7 +162,7 @@ singleton PostEffect( MLAAFx )
texture[0] = "$inTex"; // Edges mask
texture[1] = "$inTex"; // Edges mask
texture[2] = "AreaMap33.dds";
texture[2] = "./AreaMap33.dds";
};
new PostEffect()

View file

@ -58,7 +58,7 @@ singleton PostEffect( CausticsPFX )
shader = PFX_CausticsShader;
stateBlock = PFX_CausticsStateBlock;
texture[0] = "#prepass";
texture[1] = "textures/caustics_1";
texture[2] = "textures/caustics_2";
texture[1] = "./textures/caustics_1";
texture[2] = "./textures/caustics_2";
target = "$backBuffer";
};

View file

@ -318,8 +318,8 @@ singleton GFXStateBlockData( PFX_DOFFinalStateBlock )
singleton ShaderData( PFX_DOFDownSampleShader )
{
DXVertexShaderFile = "shaders/common/postFx/dof/DOF_DownSample_V.hlsl";
DXPixelShaderFile = "shaders/common/postFx/dof/DOF_DownSample_P.hlsl";
DXVertexShaderFile = "shaders/common/postFx/dof/DOF_DownSample_V.hlsl";
DXPixelShaderFile = "shaders/common/postFx/dof/DOF_DownSample_P.hlsl";
OGLVertexShaderFile = "shaders/common/postFx/dof/gl/DOF_DownSample_V.glsl";
OGLPixelShaderFile = "shaders/common/postFx/dof/gl/DOF_DownSample_P.glsl";
@ -352,7 +352,7 @@ singleton ShaderData( PFX_DOFBlurXShader : PFX_DOFBlurYShader )
singleton ShaderData( PFX_DOFCalcCoCShader )
{
DXVertexShaderFile = "shaders/common/postFx/dof/DOF_CalcCoC_V.hlsl";
DXPixelShaderFile = "shaders/common/postFx/dof/DOF_CalcCoC_P.hlsl";
DXPixelShaderFile = "shaders/common/postFx/dof/DOF_CalcCoC_P.hlsl";
OGLVertexShaderFile = "shaders/common/postFx/dof/gl/DOF_CalcCoC_V.glsl";
OGLPixelShaderFile = "shaders/common/postFx/dof/gl/DOF_CalcCoC_P.glsl";
@ -366,7 +366,7 @@ singleton ShaderData( PFX_DOFCalcCoCShader )
singleton ShaderData( PFX_DOFSmallBlurShader )
{
DXVertexShaderFile = "shaders/common/postFx/dof/DOF_SmallBlur_V.hlsl";
DXPixelShaderFile = "shaders/common/postFx/dof/DOF_SmallBlur_P.hlsl";
DXPixelShaderFile = "shaders/common/postFx/dof/DOF_SmallBlur_P.hlsl";
OGLVertexShaderFile = "shaders/common/postFx/dof/gl/DOF_SmallBlur_V.glsl";
OGLPixelShaderFile = "shaders/common/postFx/dof/gl/DOF_SmallBlur_P.glsl";

View file

@ -200,7 +200,7 @@ singleton PostEffect( SSAOPostFx )
stateBlock = SSAOStateBlock;
texture[0] = "#prepass";
texture[1] = "noise.png";
texture[1] = "./noise.png";
texture[2] = "#ssao_pow_table";
target = "$outTex";