Merge branch 'development' of https://github.com/GarageGames/Torque3D into development

This commit is contained in:
Areloch 2016-05-24 20:09:53 -05:00
commit 9d47830a8b
36 changed files with 623 additions and 171 deletions

View file

@ -55,7 +55,7 @@ new ShaderData( AL_DeferredShader )
singleton PostEffect( AL_DeferredShading )
{
renderTime = "PFXBeforeBin";
renderTime = "PFXAfterBin";
renderBin = "SkyBin";
shader = AL_DeferredShader;
stateBlock = AL_DeferredShadingState;

View file

@ -39,9 +39,11 @@ new GFXStateBlockData( AL_VectorLightState )
mSamplerNames[0] = "prePassBuffer";
samplerStates[1] = SamplerClampPoint; // Shadow Map (Do not change this to linear, as all cards can not filter equally.)
mSamplerNames[1] = "shadowMap";
samplerStates[2] = SamplerClampLinear; // SSAO Mask
mSamplerNames[2] = "ssaoMask";
samplerStates[3] = SamplerWrapPoint; // Random Direction Map
samplerStates[2] = SamplerClampPoint; // Shadow Map (Do not change this to linear, as all cards can not filter equally.)
mSamplerNames[2] = "dynamicShadowMap";
samplerStates[3] = SamplerClampLinear; // SSAO Mask
mSamplerNames[3] = "ssaoMask";
samplerStates[4] = SamplerWrapPoint; // Random Direction Map
cullDefined = true;
cullMode = GFXCullNone;
@ -114,8 +116,10 @@ new GFXStateBlockData( AL_ConvexLightState )
mSamplerNames[0] = "prePassBuffer";
samplerStates[1] = SamplerClampPoint; // Shadow Map (Do not use linear, these are perspective projections)
mSamplerNames[1] = "shadowMap";
samplerStates[2] = SamplerClampLinear; // Cookie Map
samplerStates[3] = SamplerWrapPoint; // Random Direction Map
samplerStates[2] = SamplerClampPoint; // Shadow Map (Do not use linear, these are perspective projections)
mSamplerNames[2] = "dynamicShadowMap";
samplerStates[3] = SamplerClampLinear; // Cookie Map
samplerStates[4] = SamplerWrapPoint; // Random Direction Map
cullDefined = true;
cullMode = GFXCullCW;

View file

@ -46,7 +46,6 @@ ConnectData main( CloudVert IN )
ConnectData OUT;
OUT.hpos = mul(modelview, float4(IN.pos,1.0));
OUT.hpos.w = OUT.hpos.z;
float2 uv = IN.uv0;
uv += texOffset;

View file

@ -63,7 +63,6 @@ ConnectData main( CloudVert IN )
ConnectData OUT;
OUT.hpos = mul(modelview, float4(IN.pos,1.0));
OUT.hpos.w = OUT.hpos.z;
// Offset the uv so we don't have a seam directly over our head.
float2 uv = IN.uv0 + float2( 0.5, 0.5 );

View file

@ -41,7 +41,6 @@ out vec2 texCoord;
void main()
{
gl_Position = tMul(modelview, IN_pos);
gl_Position.w = gl_Position.z;
vec2 uv = IN_uv0;
uv += texOffset;

View file

@ -62,7 +62,6 @@ void main()
vec2 IN_uv0 = vTexCoord0.st;
gl_Position = modelview * IN_pos;
gl_Position.w = gl_Position.z;
// Offset the uv so we don't have a seam directly over our head.
vec2 uv = IN_uv0 + vec2( 0.5, 0.5 );

View file

@ -73,100 +73,380 @@ new GuiControlProfile (NetGraphPacketLossProfile)
};
//--- OBJECT WRITE BEGIN ---
new GuiControl(NetGraphGui) {
profile = "NetGraphProfile";
%guiContent = new GuiControl(NetGraphGui) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 2";
profile = "NetGraphProfile";
visible = "1";
noCursor = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
noCursor = "1";
new GuiGraphCtrl(NetGraph) {
profile = "NetGraphKeyContainerProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "432 5";
centerY = "1";
plotColor[0] = "1 1 1 1";
plotColor[1] = "1 0 0 1";
plotColor[2] = "0 1 0 1";
plotColor[3] = "0 0 1 1";
plotColor[4] = "0 1 1 1";
plotColor[5] = "0 0 0 1";
plotType[0] = "PolyLine";
plotType[1] = "PolyLine";
plotType[2] = "PolyLine";
plotType[3] = "PolyLine";
plotType[4] = "PolyLine";
plotType[5] = "PolyLine";
plotInterval[0] = "0";
plotInterval[1] = "0";
plotInterval[2] = "0";
plotInterval[3] = "0";
plotInterval[4] = "0";
plotInterval[5] = "0";
position = "816 5";
extent = "200 200";
minExtent = "8 2";
visible = "1";
};
new GuiControl() {
profile = "NetGraphKeyContainerProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "432 205";
extent = "200 52";
minExtent = "8 2";
profile = "NetGraphKeyContainerProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiControl() {
position = "816 205";
extent = "200 104";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphKeyContainerProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiTextCtrl(GhostsActive) {
profile = "NetGraphGhostsActiveProfile";
horizSizing = "left";
vertSizing = "bottom";
text = "Ghosts Active";
maxLength = "255";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 0";
extent = "100 18";
minExtent = "8 2";
visible = "1";
text = "Ghosts Active";
maxLength = "255";
};
new GuiTextCtrl(GhostUpdates) {
profile = "NetGraphGhostUpdatesProfile";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphGhostsActiveProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl(GhostUpdates) {
text = "Ghost Updates";
maxLength = "255";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "100 0";
extent = "100 18";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphGhostUpdatesProfile";
visible = "1";
text = "Ghost Updates";
maxLength = "255";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl(BitsSent) {
profile = "NetGraphBitsSentProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "0 18 ";
extent = "100 18";
minExtent = "8 2";
visible = "1";
text = "Bytes Sent";
maxLength = "255";
};
new GuiTextCtrl(BitsReceived) {
profile = "NetGraphBitsReceivedProfile";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 18";
extent = "100 18";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphBitsSentProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl(BitsReceived) {
text = "Bytes Received";
maxLength = "255";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "100 18";
extent = "100 18";
minExtent = "8 2";
visible = "1";
text = "Bytes Received";
maxLength = "255";
};
new GuiTextCtrl(Latency) {
profile = "NetGraphLatencyProfile";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphBitsReceivedProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl(Latency) {
text = "Latency";
maxLength = "255";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 36";
extent = "100 18";
minExtent = "8 2";
visible = "1";
text = "Latency";
maxLength = "255";
};
new GuiTextCtrl(PacketLoss) {
profile = "NetGraphPacketLossProfile";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphLatencyProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl(PacketLoss) {
text = "Packet Loss";
maxLength = "255";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "100 36";
extent = "59 18";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphPacketLossProfile";
visible = "1";
text = "Packet Loss";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Network Simulation:";
maxLength = "255";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 52";
extent = "97 18";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphPacketLossProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Simulated Latency:";
maxLength = "255";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 68";
extent = "91 18";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphPacketLossProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "ms";
maxLength = "255";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "179 68";
extent = "20 18";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphPacketLossProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl(NetGraphSimLatency) {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
text = "0";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "112 67";
extent = "64 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Simulated Packet Loss:";
maxLength = "255";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 83";
extent = "111 18";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphPacketLossProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "%";
maxLength = "255";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "179 84";
extent = "20 18";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "NetGraphPacketLossProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl(NetGraphSimPacket) {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
text = "0";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "112 85";
extent = "64 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextEditProfile";
visible = "1";
active = "1";
command = "if(NetGraphSimLatency.text $= \"\" || NetGraphSimLatency.text < 0)\n{\n NetGraphSimLatency.text = 0;\n}\n\nif(NetGraphSimPacket.text $= \"\" || NetGraphSimPacket.text < 0)\n{\n NetGraphSimLatency.text = 0;\n}\nelse if(NetGraphSimPacket.text > 100)\n{\n NetGraphSimPacket.text = 100;\n}\n\nnetSimulateLag( NetGraphSimLatency.text, NetGraphSimPacket.text );";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
@ -186,7 +466,10 @@ function toggleNetGraph()
Canvas.add(NetGraphGui);
}
else
{
Canvas.remove(NetGraphGui);
netSimulateLag( 0, 0 );
}
}
function NetGraph::updateStats()
@ -236,3 +519,39 @@ function NetGraph::toggleKey()
PacketLoss.visible = 0;
}
}
function NetGraphSimLatency::onReturn(%this)
{
NetGraph.updateNetworkSimulation();
}
function NetGraphSimPacket::onReturn(%this)
{
NetGraph.updateNetworkSimulation();
}
function NetGraph::updateNetworkSimulation(%this)
{
%latency = NetGraphSimLatency.getText();
if(%latency $= "" || %latency < 0)
{
NetGraphSimLatency.text = 0;
%latency = 0;
}
%packetLoss = NetGraphSimPacket.getText();
if(%packetLoss $= "" || %packetLoss < 0)
{
NetGraphSimLatency.text = 0;
%packetLoss = 0;
}
else if(%packetLoss > 100)
{
NetGraphSimPacket.text = 100;
%packetLoss = 100;
}
netSimulateLag( %latency, %packetLoss );
}

View file

@ -55,7 +55,7 @@ new ShaderData( AL_DeferredShader )
singleton PostEffect( AL_DeferredShading )
{
renderTime = "PFXBeforeBin";
renderTime = "PFXAfterBin";
renderBin = "SkyBin";
shader = AL_DeferredShader;
stateBlock = AL_DeferredShadingState;

View file

@ -39,9 +39,11 @@ new GFXStateBlockData( AL_VectorLightState )
mSamplerNames[0] = "prePassBuffer";
samplerStates[1] = SamplerClampPoint; // Shadow Map (Do not change this to linear, as all cards can not filter equally.)
mSamplerNames[1] = "shadowMap";
samplerStates[2] = SamplerClampLinear; // SSAO Mask
mSamplerNames[2] = "ssaoMask";
samplerStates[3] = SamplerWrapPoint; // Random Direction Map
samplerStates[2] = SamplerClampPoint; // Shadow Map (Do not change this to linear, as all cards can not filter equally.)
mSamplerNames[2] = "dynamicShadowMap";
samplerStates[3] = SamplerClampLinear; // SSAO Mask
mSamplerNames[3] = "ssaoMask";
samplerStates[4] = SamplerWrapPoint; // Random Direction Map
cullDefined = true;
cullMode = GFXCullNone;
@ -114,8 +116,10 @@ new GFXStateBlockData( AL_ConvexLightState )
mSamplerNames[0] = "prePassBuffer";
samplerStates[1] = SamplerClampPoint; // Shadow Map (Do not use linear, these are perspective projections)
mSamplerNames[1] = "shadowMap";
samplerStates[2] = SamplerClampLinear; // Cookie Map
samplerStates[3] = SamplerWrapPoint; // Random Direction Map
samplerStates[2] = SamplerClampPoint; // Shadow Map (Do not use linear, these are perspective projections)
mSamplerNames[2] = "dynamicShadowMap";
samplerStates[3] = SamplerClampLinear; // Cookie Map
samplerStates[4] = SamplerWrapPoint; // Random Direction Map
cullDefined = true;
cullMode = GFXCullCW;

View file

@ -46,7 +46,6 @@ ConnectData main( CloudVert IN )
ConnectData OUT;
OUT.hpos = mul(modelview, float4(IN.pos,1.0));
OUT.hpos.w = OUT.hpos.z;
float2 uv = IN.uv0;
uv += texOffset;

View file

@ -63,7 +63,6 @@ ConnectData main( CloudVert IN )
ConnectData OUT;
OUT.hpos = mul(modelview, float4(IN.pos,1.0));
OUT.hpos.w = OUT.hpos.z;
// Offset the uv so we don't have a seam directly over our head.
float2 uv = IN.uv0 + float2( 0.5, 0.5 );

View file

@ -41,7 +41,6 @@ out vec2 texCoord;
void main()
{
gl_Position = tMul(modelview, IN_pos);
gl_Position.w = gl_Position.z;
vec2 uv = IN_uv0;
uv += texOffset;

View file

@ -62,7 +62,6 @@ void main()
vec2 IN_uv0 = vTexCoord0.st;
gl_Position = modelview * IN_pos;
gl_Position.w = gl_Position.z;
// Offset the uv so we don't have a seam directly over our head.
vec2 uv = IN_uv0 + vec2( 0.5, 0.5 );

View file

@ -770,6 +770,15 @@ function EditorCameraSpeedMenu::setupGuiControls(%this)
// Set up min/max camera slider range
eval("CameraSpeedDropdownCtrlContainer-->Slider.range = \"" @ %minSpeed @ " " @ %maxSpeed @ "\";");
}
//////////////////////////////////////////////////////////////////////////
// Tools Menu Handler
//////////////////////////////////////////////////////////////////////////
function EditorUtilitiesMenu::onSelectItem(%this, %id, %text)
{
return Parent::onSelectItem(%this, %id, %text);
}
//////////////////////////////////////////////////////////////////////////
// World Menu Handler Object Menu
//////////////////////////////////////////////////////////////////////////

View file

@ -252,6 +252,18 @@ function EditorGui::buildMenus(%this)
// last menu items in EditorLightingMenu::onAdd().
};
%this.menuBar.insert(%lightingMenu, %this.menuBar.getCount());
// Tools Menu
%toolsMenu = new PopupMenu()
{
superClass = "MenuBuilder";
class = "EditorUtilitiesMenu";
barTitle = "Tools";
item[0] = "Network Graph" TAB "n" TAB "toggleNetGraph();";
};
%this.menuBar.insert(%toolsMenu, %this.menuBar.getCount());
// Help Menu
%helpMenu = new PopupMenu()