diff --git a/Templates/BaseGame/game/core/clientServer/scripts/client/levelLoad.cs b/Templates/BaseGame/game/core/clientServer/scripts/client/levelLoad.cs index c3fd04280..d9df77623 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/client/levelLoad.cs +++ b/Templates/BaseGame/game/core/clientServer/scripts/client/levelLoad.cs @@ -86,6 +86,8 @@ function clientCmdMissionEnd( %seq ) { if( $Client::missionRunning && $Client::missionSeq == %seq ) { + afxEndMissionNotify(); + clientEndMission(); $Client::missionSeq = -1; } diff --git a/Templates/BaseGame/game/core/clientServer/scripts/server/defaults.cs b/Templates/BaseGame/game/core/clientServer/scripts/server/defaults.cs index 28f54b841..b8e72e213 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/server/defaults.cs +++ b/Templates/BaseGame/game/core/clientServer/scripts/server/defaults.cs @@ -46,6 +46,9 @@ $Pref::Server::ConnectionError = // overrides pref::net::port for dedicated servers $Pref::Server::Port = 28000; +$Pref::Server::EnableDatablockCache = true; +$Pref::Server::DatablockCacheFilename = "core/clientServer/scripts/server/afx/cache/afx_datablock_cache.dbc"; + // If the password is set, clients must provide it in order // to connect to the server $Pref::Server::Password = ""; diff --git a/Templates/BaseGame/game/core/clientServer/scripts/server/server.cs b/Templates/BaseGame/game/core/clientServer/scripts/server/server.cs index 47be979db..9a40f5ab3 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/server/server.cs +++ b/Templates/BaseGame/game/core/clientServer/scripts/server/server.cs @@ -194,6 +194,8 @@ function onServerCreated() // Keep track of when the game started $Game::StartTime = $Sim::Time; + + onServerCreatedAFX(); } /// Shut down the server diff --git a/Templates/BaseGame/game/core/postFX/scripts/afxHighlight.cs b/Templates/BaseGame/game/core/postFX/scripts/afxHighlight.cs new file mode 100644 index 000000000..d7a310a19 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/afxHighlight.cs @@ -0,0 +1,46 @@ +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// This Post-Effect is adapted from the resource, +// "Silhoute selection via postFX for Torque3D" posted by Konrad Kiss. +// http://www.garagegames.com/community/resources/view/17821 +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +singleton ShaderData( PFX_afxHighlightShader ) +{ + DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; + DXPixelShaderFile = "shaders/AFX/afxPostFX_Highlight_P.hlsl"; + + //OGLVertexShaderFile = "shaders/common/postFx/gl//postFxV.glsl"; + //OGLPixelShaderFile = "shaders/common/postFx/gl/passthruP.glsl"; + + samplerNames[0] = "$inputTex"; + + pixVersion = 2.0; +}; + +singleton GFXStateBlockData( PFX_afxDefaultHighlightStateBlock ) +{ + zDefined = true; + zEnable = false; + zWriteEnable = false; + + samplersDefined = true; + samplerStates[0] = SamplerClampLinear; +}; + +singleton PostEffect( afxHighlightPostFX ) +{ + // Do not allow the selection effect to work in reflection + // passes by default so we don't do the extra drawing. + allowReflectPass = false; + + renderTime = "PFXAfterDiffuse"; + renderBin = "HighlightBin"; + renderPriority = 1; + isEnabled = true; + + shader = PFX_afxHighlightShader; + stateBlock = PFX_afxDefaultHighlightStateBlock; + texture[0] = "#highlight"; + texture[1] = "$backBuffer"; + target = "$backBuffer"; +}; \ No newline at end of file diff --git a/Templates/BaseGame/game/core/rendering/scripts/renderManager.cs b/Templates/BaseGame/game/core/rendering/scripts/renderManager.cs index d0d08f26b..1dcc62f69 100644 --- a/Templates/BaseGame/game/core/rendering/scripts/renderManager.cs +++ b/Templates/BaseGame/game/core/rendering/scripts/renderManager.cs @@ -90,6 +90,15 @@ function initRenderManager() // Resolve format change token last. DiffuseRenderPassManager.addManager( new RenderPassStateBin(FinalBin) { renderOrder = 1.7; stateToken = AL_FormatToken; } ); + + if(isObject(afxZodiacTerrainRenderer)) + { + DiffuseRenderPassManager.addManager( new afxZodiacTerrainRenderer() { bintype = "TerrainZodiac"; renderOrder = 1.41; processAddOrder = 1.41; } ); + DiffuseRenderPassManager.addManager( new afxZodiacPolysoupRenderer() { bintype = "PolysoupZodiac"; renderOrder = 1.42; processAddOrder = 1.42; } ); + DiffuseRenderPassManager.addManager( new afxZodiacGroundPlaneRenderer() { bintype = "GroundPlaneZodiac"; renderOrder = 1.43; processAddOrder = 1.43; } ); + DiffuseRenderPassManager.addManager( new afxZodiacMeshRoadRenderer() { bintype = "MeshRoadZodiac"; renderOrder = 1.44; processAddOrder = 1.44; } ); + DiffuseRenderPassManager.addManager( new afxRenderHighlightMgr() { renderOrder = 1.55; processAddOrder = 1.55; } ); // for selection-highlighting + } } /// This is the Default PostFX state block. Put here to prevent any missing object diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/afxPostFX_Highlight_ALT_P.hlsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxPostFX_Highlight_ALT_P.hlsl new file mode 100644 index 000000000..563942d8e --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxPostFX_Highlight_ALT_P.hlsl @@ -0,0 +1,58 @@ +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// This is the original Post-Effect Shader used in the resource, +// "Silhoute selection via postFX for Torque3D" posted by Konrad Kiss. +// http://www.garagegames.com/community/resources/view/17821 +// (currently not used for default AFX selection-highlighting) +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +#include "../common/shaderModel.hlsl" +#include "../common/shaderModelAutoGen.hlsl" +#include "shaders/common/postFX/postFx.hlsl" + +TORQUE_UNIFORM_SAMPLER2D(highlightBuffer,0); +TORQUE_UNIFORM_SAMPLER2D(backBuffer,1); +uniform float2 targetSize; + +float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 +{ + float2 offsets[9] = { + float2( 0.0, 0.0), + float2(-1.0, -1.0), + float2( 0.0, -1.0), + float2( 1.0, -1.0), + float2( 1.0, 0.0), + float2( 1.0, 1.0), + float2( 0.0, 1.0), + float2(-1.0, 1.0), + float2(-1.0, 0.0), + }; + + float2 PixelSize = 1.0 / targetSize; + + float avgval = 0; + + for(int i = 0; i < 9; i++) + { + float2 uv = IN.uv0 + offsets[i] * PixelSize; + float4 cpix = float4( TORQUE_TEX2D( highlightBuffer, uv ).rrr, 1.0 ); + avgval += clamp(cpix.r*256, 0, 1); + } + + avgval /= 9; + + float vis = round(1.0-(abs(frac(avgval)-0.5)*2)); + + float4 bb = TORQUE_TEX2D(backBuffer, IN.uv0); + float4 outlineColor = float4(vis, 0, 0, vis); + float4 overlayColor = float4(avgval, 0, 0, avgval); + //float4 outlineColor = float4(vis*0.5, vis*0.5, vis*0.5, vis*0.5); + //float4 overlayColor = float4(avgval, avgval, avgval, avgval); + + overlayColor *= 0.4; + + bb = lerp(bb, overlayColor, overlayColor.a); + + outlineColor = lerp(bb, outlineColor, outlineColor.a); + + return outlineColor; +} \ No newline at end of file diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/afxPostFX_Highlight_P.hlsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxPostFX_Highlight_P.hlsl new file mode 100644 index 000000000..91a14e834 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxPostFX_Highlight_P.hlsl @@ -0,0 +1,27 @@ +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// This Post-Effect Shader is adapted from the resource, +// "Silhoute selection via postFX for Torque3D" posted by Konrad Kiss. +// http://www.garagegames.com/community/resources/view/17821 +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +#include "../common/shaderModel.hlsl" +#include "../common/shaderModelAutoGen.hlsl" +#include "shaders/common/postFX/postFx.hlsl" + +TORQUE_UNIFORM_SAMPLER2D(highlightBuffer,0); +TORQUE_UNIFORM_SAMPLER2D(backBuffer,1); +uniform float2 targetSize; + +float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 +{ + float4 bufferColor = TORQUE_TEX2D(backBuffer, IN.uv0); + float4 highlightColor = TORQUE_TEX2D(highlightBuffer, IN.uv0); + + if (highlightColor.a > 0.0) + bufferColor.rgb = clamp(highlightColor.a*(bufferColor.rgb*1.4 + 0.05), 0, 1); + + //if (highlightColor.r + highlightColor.g + highlightColor.b > 0.0) + // bufferColor.rgb = clamp(bufferColor.rgb*1.4 + 0.05, 0, 1); + + return bufferColor; +} \ No newline at end of file diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Interior_P.hlsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Interior_P.hlsl new file mode 100644 index 000000000..ddf031a0e --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Interior_P.hlsl @@ -0,0 +1,28 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - PIXEL SHADER +// +// afxZodiac_Interior_P.hlsl +// This is the pixel shader for rendering zodiacs on interiors. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +#include "../common/shaderModel.hlsl" + +struct ConnectData +{ + float4 hpos : TORQUE_POSITION; + float2 texCoord : TEXCOORD0; +}; + +TORQUE_UNIFORM_SAMPLER2D(zodiacMap,0); +uniform float4 zodiacColor; + +float4 main( ConnectData IN ) : TORQUE_TARGET0 +{ + float4 outColor = zodiacColor*TORQUE_TEX2D(zodiacMap, IN.texCoord); + return outColor; +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Interior_V.hlsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Interior_V.hlsl new file mode 100644 index 000000000..ceffc05e7 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Interior_V.hlsl @@ -0,0 +1,40 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - VERTEX SHADER +// +// afxZodiac_Interior_P.hlsl +// This is the pixel shader for rendering zodiacs on interiors. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +#include "../common/shaderModel.hlsl" +struct VertData +{ + float3 position : POSITION; + float4 color : COLOR0; + float2 texCoord : TEXCOORD0; +}; + +struct ConnectData +{ + float4 hpos : TORQUE_POSITION; + float2 texCoord : TEXCOORD0; +}; + +//----------------------------------------------------------------------------- +// Main +//----------------------------------------------------------------------------- +ConnectData main( VertData IN, + uniform float4x4 modelView : register(C0) + ) +{ + ConnectData OUT; + + OUT.hpos = mul(modelView, float4(IN.position,1.0)); + OUT.texCoord = IN.texCoord; + + return OUT; +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Polysoup_P.hlsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Polysoup_P.hlsl new file mode 100644 index 000000000..3aff7f5c3 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Polysoup_P.hlsl @@ -0,0 +1,28 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - PIXEL SHADER +// +// afxZodiac_Polysoup_P.hlsl +// This is the pixel shader for rendering zodiacs on polysoup models. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +#include "../common/shaderModel.hlsl" + +struct ConnectData +{ + float4 hpos : TORQUE_POSITION; + float2 texCoord : TEXCOORD0; +}; + +TORQUE_UNIFORM_SAMPLER2D(zodiacMap,0); +uniform float4 zodiacColor; + +float4 main( ConnectData IN ) : TORQUE_TARGET0 +{ + float4 outColor = zodiacColor*TORQUE_TEX2D(zodiacMap, IN.texCoord); + return outColor; +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Polysoup_V.hlsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Polysoup_V.hlsl new file mode 100644 index 000000000..a1c125da1 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Polysoup_V.hlsl @@ -0,0 +1,40 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - VERTEX SHADER +// +// afxZodiac_Polysoup_P.hlsl +// This is the pixel shader for rendering zodiacs on polysoup models. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +#include "../common/shaderModel.hlsl" +struct VertData +{ + float3 position : POSITION; + float4 color : COLOR0; + float2 texCoord : TEXCOORD0; +}; + +struct ConnectData +{ + float4 hpos : TORQUE_POSITION; + float2 texCoord : TEXCOORD0; +}; + +//----------------------------------------------------------------------------- +// Main +//----------------------------------------------------------------------------- +ConnectData main( VertData IN, + uniform float4x4 modelView : register(C0) + ) +{ + ConnectData OUT; + + OUT.hpos = mul(modelView, float4(IN.position,1.0)); + OUT.texCoord = IN.texCoord; + + return OUT; +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Terrain_P.hlsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Terrain_P.hlsl new file mode 100644 index 000000000..7bc1dc6e9 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Terrain_P.hlsl @@ -0,0 +1,28 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - PIXEL SHADER +// +// afxZodiac_Terrain_P.hlsl +// This is the pixel shader for rendering zodiacs on terrain. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +#include "../common/shaderModel.hlsl" + +struct ConnectData +{ + float4 hpos : TORQUE_POSITION; + float2 texCoord : TEXCOORD0; +}; + +TORQUE_UNIFORM_SAMPLER2D(zodiacMap,0); +uniform float4 zodiacColor; + +float4 main( ConnectData IN ) : TORQUE_TARGET0 +{ + float4 outColor = zodiacColor*TORQUE_TEX2D(zodiacMap, IN.texCoord); + return outColor; +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Terrain_V.hlsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Terrain_V.hlsl new file mode 100644 index 000000000..446d9e63f --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/afxZodiac_Terrain_V.hlsl @@ -0,0 +1,40 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - VERTEX SHADER +// +// afxZodiac_Terrain_P.hlsl +// This is the pixel shader for rendering zodiacs on terrain. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +#include "../common/shaderModel.hlsl" +struct VertData +{ + float3 position : POSITION; + float4 color : COLOR0; + float2 texCoord : TEXCOORD0; +}; + +struct ConnectData +{ + float4 hpos : TORQUE_POSITION; + float2 texCoord : TEXCOORD0; +}; + +//----------------------------------------------------------------------------- +// Main +//----------------------------------------------------------------------------- +ConnectData main( VertData IN, + uniform float4x4 modelView : register(C0) + ) +{ + ConnectData OUT; + + OUT.hpos = mul(modelView, float4(IN.position,1.0)); + OUT.texCoord = IN.texCoord; + + return OUT; +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Interior_P.glsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Interior_P.glsl new file mode 100644 index 000000000..d3d549d37 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Interior_P.glsl @@ -0,0 +1,24 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - PIXEL SHADER +// +// afxZodiac_Interior_P.glsl +// This is the pixel shader for rendering zodiacs on interiors. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +uniform sampler2D zodiacMap; +uniform vec4 zodiacColor; + +varying vec4 hpos; +varying vec2 texCoord; + +//~~~~~~~~~~~~~~~~~~~~// + +void main() +{ + gl_FragColor = zodiacColor*texture2D(zodiacMap, texCoord); +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Interior_V.glsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Interior_V.glsl new file mode 100644 index 000000000..d1d2a8b9b --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Interior_V.glsl @@ -0,0 +1,24 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - VERTEX SHADER +// +// afxZodiac_Interior_V.glsl +// This is the vertex shader for rendering zodiacs on interiors. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +uniform mat4 modelview; + +varying vec2 texCoord; +varying vec4 position, color; + +//~~~~~~~~~~~~~~~~~~~~// + +void main() +{ + texCoord = gl_MultiTexCoord0.st; + gl_Position = modelview * gl_Vertex; +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Polysoup_P.glsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Polysoup_P.glsl new file mode 100644 index 000000000..d38af2fdb --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Polysoup_P.glsl @@ -0,0 +1,25 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - PIXEL SHADER +// +// afxZodiac_Polysoup_P.glsl +// This is the pixel shader for rendering zodiacs on polysoup models. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +uniform sampler2D zodiacMap; +uniform vec4 zodiacColor; + +in vec4 hpos; +in vec2 texCoord; + +out vec4 OUT_FragColor0; +//~~~~~~~~~~~~~~~~~~~~// + +void main() +{ + OUT_FragColor0 = zodiacColor*texture(zodiacMap, texCoord); +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Polysoup_V.glsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Polysoup_V.glsl new file mode 100644 index 000000000..ad3503db3 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Polysoup_V.glsl @@ -0,0 +1,30 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - VERTEX SHADER +// +// afxZodiac_Polysoup_V.glsl +// This is the vertex shader for rendering zodiacs on polysoup models. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +#include "../../common/gl/hlslCompat.glsl" + +uniform mat4 modelview; + +out vec2 texCoord; + +in vec4 vPosition; +in vec4 vColor; +in vec2 vTexCoord0; + +//~~~~~~~~~~~~~~~~~~~~// + +void main() +{ + texCoord = vTexCoord0.st; + gl_Position = modelview * vPosition; + correctSSP(gl_Position); +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Terrain_P.glsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Terrain_P.glsl new file mode 100644 index 000000000..434e967cc --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Terrain_P.glsl @@ -0,0 +1,25 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - PIXEL SHADER +// +// afxZodiac_Terrain_P.glsl +// This is the pixel shader for rendering zodiacs on terrain. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +uniform sampler2D zodiacMap; +uniform vec4 zodiacColor; + +in vec4 hpos; +in vec2 texCoord; + +out vec4 OUT_FragColor0; +//~~~~~~~~~~~~~~~~~~~~// + +void main() +{ + OUT_FragColor0 = zodiacColor*texture(zodiacMap, texCoord); +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Terrain_V.glsl b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Terrain_V.glsl new file mode 100644 index 000000000..73547b958 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shaders/AFX/gl/afxZodiac_Terrain_V.glsl @@ -0,0 +1,30 @@ + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +// Arcane-FX - VERTEX SHADER +// +// afxZodiac_Terrain_V.glsl +// This is the vertex shader for rendering zodiacs on terrain. +// +// Copyright (C) Faust Logic, Inc. +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// + +#include "../../common/gl/hlslCompat.glsl" + +uniform mat4 modelview; + +out vec2 texCoord; + +in vec4 vPosition; +in vec4 vColor; +in vec2 vTexCoord0; + +//~~~~~~~~~~~~~~~~~~~~// + +void main() +{ + texCoord = vTexCoord0.st; + gl_Position = modelview * vPosition; + correctSSP(gl_Position); +} + +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Templates/BaseGame/game/data/ui/UI.cs b/Templates/BaseGame/game/data/ui/UI.cs index eac7f9232..3260a95be 100644 --- a/Templates/BaseGame/game/data/ui/UI.cs +++ b/Templates/BaseGame/game/data/ui/UI.cs @@ -39,6 +39,7 @@ function UI::create( %this ) exec("./scripts/guis/profiler.gui"); exec("./scripts/guis/netGraphGui.gui"); + exec("./scripts/guis/RecordingsDlg.gui"); exec("./scripts/guis/FileDialog.gui"); exec("./scripts/guis/guiMusicPlayer.gui"); exec("./scripts/guis/startupGui.gui");