Commit graph

429 commits

Author SHA1 Message Date
John3 100e18d232 forget the empty template XD added delete demo function 2016-06-29 19:21:01 -05:00
John3 c822d13109 added deleteDemo function 2016-06-29 19:16:25 -05:00
Azaezel 2723bfbc91 corrects corruption in precipitation class 2016-06-23 11:44:17 -05:00
John3 9b8f0eee44 added "how to use". Added delete button (Disabled right now) 2016-06-21 22:09:06 -05:00
John3 4699a2142b Enable to play recorded gameplay demo from main menu. 2016-06-21 22:06:09 -05:00
Areloch 64fab756f8 Merge pull request #1659 from rextimmy/linux_vizshader_fixes
Linux vix shader fixes
2016-06-21 12:36:12 -05:00
rextimmy 59f1c331c1 Linux vix shader fixes 2016-06-21 17:02:44 +10:00
John3 0966037211 added $appName 2016-06-20 20:07:03 -05:00
John3 afcbe83a26 Corrected "Pref::Server::ConnectionError" description. 2016-06-20 19:30:54 -05:00
Areloch 963ef1ecdb Merge pull request #1654 from Azaezel/shape_mounting
Shape mounting
2016-06-20 13:15:35 -05:00
Areloch 80dcf3eba5 Merge pull request #1643 from Azaezel/TriggerTrouble
corrects https://github.com/GarageGames/Torque3D/issues/1273
2016-06-18 11:54:41 -05:00
Azaezel e9039b2261 Revert "Mounting demo script"
This reverts commit fb1fb5b7f39e4acb5a474789443cbe66b00cc414.
2016-06-17 10:41:38 -05:00
Azaezel 161cdcb02d Revert "Updated demo script"
This reverts commit b288411d1f16d499f59ac89a5070dc88889ed043.
2016-06-17 10:41:06 -05:00
OTHGMars b8565b2b80 Updated demo script 2016-06-17 10:41:05 -05:00
OTHGMars 16c547306f Mounting demo script 2016-06-17 10:41:03 -05:00
John3 c7917e566c cleanup observeParameters 2016-06-15 23:17:00 -05:00
John3 072e7ad563 clean up observeParameters 2016-06-15 23:02:42 -05:00
John3 66194245ff clean up energyPerDamagePoint 2016-06-15 23:00:13 -05:00
Azaezel b4dfb9ad08 corrects https://github.com/GarageGames/Torque3D/issues/1273 with suggested resolution 2016-06-09 13:23:37 -05:00
Areloch 3a73344abb Resolves merging-order conflicts for the vehicle physics PR, as well as correcting cmake not blacklisting the componentGroup files if TORQUE_EXPERIMENTAL_EC was flipped off. 2016-06-05 19:17:34 -05:00
Areloch 5122360552 Merge pull request #1587 from Areloch/ProfilerMenuTool
Profiler toggle and World Editor menu entry.
2016-05-31 23:32:31 -05:00
Areloch 823fc41abc Merge pull request #1620 from John3/spaceFolderSceneTree2
Bug space folder in scene tree 2
2016-05-31 23:28:45 -05:00
Areloch 2464b620ba Fixes several minor initialization issues that were causing problems with deletion/management of components and entities.
Also makes the ThirdPersonPlayer game object editor selectable again by removing an erroneously set field.
2016-05-31 12:51:23 -05:00
Areloch bbf7865a77 Makes sure if you don't spawn a game object into MissionGroup, it spawns it into MissionCleanup. 2016-05-30 21:30:02 -05:00
Areloch ec8882c3c8 Ensuring all names are the correct casing for Linux 2016-05-26 01:37:14 -05:00
Areloch fb7e4f92ef Adds in a GameObjects folder that lists all available game objects to the Scripted objects tab in the creator panel in the editor. 2016-05-25 22:16:24 -05:00
Areloch ee6d9961e3 Merge pull request #1582 from Azaezel/SubSurf
Reimplements a form of subsurface scattering
2016-05-25 13:35:44 -05:00
Areloch 358bbdb740 Removed script calls to some fields that no longer exist, which was causing console errors. 2016-05-25 13:32:20 -05:00
Areloch 9d47830a8b Merge branch 'development' of https://github.com/GarageGames/Torque3D into development 2016-05-24 20:09:53 -05:00
John3 4bb63f277e change pipe to underscore and fix prefabs assets 2016-05-21 15:10:35 -05:00
Areloch 6517b86491 Editor integration for creation of entities and GameObjects. 2016-05-21 11:47:10 -05:00
John3 7ae1d3d996 Bug space folder in scene tree.
Fix by David Robert Pemberton
https://www.garagegames.com/community/blogs/view/22295

You can see the folder "soldier actor"
<img src="http://i.imgur.com/8XSWrrF.png"/>
2016-05-20 17:04:56 -05:00
Areloch acf6ddb1ce Merge pull request #1617 from Azaezel/deferedWrapupOrder
removes w=z trick (was causing fisheye, effectively)
2016-05-20 00:10:33 -05:00
Areloch de276fc8b8 Merge pull request #1586 from Areloch/NetSimNetGraph
Expose Network Sim fields on NetGraph gui
2016-05-18 23:13:12 -05:00
Azaezel d79b9a2988 removes w=z trick (was causing fisheye, effectively) 2016-05-18 06:38:13 -05:00
Areloch 36bb0b3c54 Minor corrections to some component scripts to clear old references. 2016-05-17 23:57:30 -05:00
Areloch f703a84218 Duplicates the missing samplerstate configurations in the empty template, for parity. 2016-05-16 13:21:44 -05:00
Areloch 01dbbb580d Merge branch 'sliperySamplerState' of https://github.com/Azaezel/Torque3D into development 2016-05-16 10:59:48 -05:00
Areloch 6fe0b1789d Adds some example components, game objects and the tools and scripts to utilize them. 2016-05-15 16:24:47 -05:00
Azaezel c104313f43 updated empty template with stray script files from devhead that had yet to be converted 2016-05-08 21:21:52 -05:00
Areloch c645475e56 Adds in some missing script functions that let projectiles damage and destroy physics shapes. 2016-04-26 11:30:24 -05:00
Azaezel 3d6803865c missing samplerstate configurations 2016-04-25 11:36:23 -05:00
Areloch 25d2fd877b Makes the profiler pop-up act on a toggle, and also adds an entry into the World Editor's Tool menu to easily activate it. 2016-04-20 01:06:31 -05:00
Areloch 587ab6a39e Adds 2 fields to expose the net simulation functionality more readily to the NetGraph GUI.
Also added a Tools option to the World Editor menubar, with the NetGraph as the first option to make it easier to activate the NetGraph in the editor.
2016-04-20 00:46:41 -05:00
Areloch bab55d46a9 Merge pull request #1555 from Azaezel/CausticCaustics
fix for broken caustics reference
2016-04-19 22:04:00 -05:00
Azaezel 88356ae37f subsurface followup: cleanups and corrections for vectorlightP, fillins for spot, point, and opengl equivalents 2016-04-15 16:06:10 -05:00
Azaezel 00cc949011 reimplements a form of subsurface scattering 2016-04-15 00:20:55 -05:00
Areloch 60ffb8e902 Merge pull request #1568 from Azaezel/soSensitive9001
case sensitivity typofix
2016-04-10 09:28:47 -05:00
Azaezel df3cb6cb44 case sensitivity typofix 2016-03-25 18:46:25 -05:00
rextimmy 3a9b50f702 Direct3D11 common shader changes. 2016-03-20 21:50:21 +10:00
Azaezel 7f4bfad10a fix for broken caustics reference 2016-03-16 23:54:47 -05:00
Azaezel 4b983cf23e exposes several datablock entries to the particle editor gui subsystem
windCoefficient, animateTexture, framesPerSec, animTexFrames*, animTexTiling

*at time of writing, it will read and write this entry to disk, but will not update in realtime.
2016-03-11 23:36:00 -06:00
Azaezel 1c854b6009 opengl crashfix pow(x,y) needed to be passed matching vartypes. 2016-02-29 04:17:42 -06:00
Areloch 908be4818f Merge pull request #1519 from Azaezel/deferredShading
Deferred shading
2016-02-27 15:08:20 -06:00
Areloch c0e29d4a22 Correction for 2 of the render bin settings, as well as correcting the water shader over-exposing it's reflections. 2016-02-27 13:13:12 -06:00
Anis a34cf9e3f9 Merge pull request #1185 from MusicMonkey5555/script-improvements
Improved file open dialogue
2016-02-26 23:01:24 +01:00
Azaezel ca2ffea6cd Merge branch 'development' of https://github.com/GarageGames/Torque3D into ColorPickerAdvanced 2016-02-21 15:30:54 -06:00
Anis 5947933f99 Merge pull request #1434 from blackwc/fullscreen-cli-fix
fullscreen and windowed mode cli fix
2016-02-19 16:59:42 +01:00
Azaezel 8c5810adad The final step (barring any overlooked missing bits, requested refactors, and of course, rolling in dependencies already submitted as PRs) consists of:
renderPrePassMgr.cpp related:
A) shifting .addFeature( MFT_XYZ); calls from ProcessedShaderMaterial::_determineFeatures to ProcessedPrePassMaterial::_determineFeatures
B) mimicking the "// set the XXX if different" entries from RenderMeshMgr::render in RenderPrePassMgr::render
C) fleshing out ProcessedPrePassMaterial::getNumStages() so that it shares a 1:1 correlation with ProcessedShaderMaterial::getNumStages()
D) causing inline void Swizzle<T, mapLength>::ToBuffer( void *destination, const void *source, const dsize_t size )  to silently fail rather than fatally assert if a source or destination buffer is not yet ready to be filled. (support for #customTarget scripted render targets)

Reflections:
A) removing reflectRenderState.disableAdvancedLightingBins(true); entries. this would otherwise early out from prepass and provide no color data whatsoever.
B) removing the fd.features.addFeature( MFT_ForwardShading ); entry forcing all materials to be forward lit when reflected.
C) 2 things best described bluntly as working hacks:
C1) when reflected, a scattersky is rotated PI along it's z then x axis in order to draw properly.
C2) along similar lines, in terraincellmaterial, we shut off culling if it's a prepass material.

Skies: scattersky is given a pair of rotations for reflection purposes, all sky objects are given a z value for depth testing.
2016-02-16 02:50:49 -06:00
Azaezel 5ed06fff9d Script:
by and large, Opengl branch compatibility alterations, though do again note the inclusion of
   sampler["lightBuffer"] = "#lightinfo";
   sampler["colorBuffer"] = "#color";
   sampler["matInfoBuffer"] = "#matinfo";

and
   samplerNames[5] = "$lightBuffer";
   samplerNames[6] = "$colorBuffer";
   samplerNames[7] = "$matInfoBuffer";
entries. This is where the engine knows to pass along a given rendertarget for input into a predefined shader, as opposed to the prior phase's output to targets within procedural ones.

Shader:
the XXXLight.hlsl/glsls account for alterations in inputs, check for emissive and translucency, apply Felix's Normal Mapped Ambient. and pass the results along to  AL_DeferredOutput for final computation before returning the result.
the lighting.hlsl/.glsl consissts of removal of the overridden engine-specific phong specular variant, and defines the  AL_DeferredOutput  method, which equates to the previously used pixspecular feature defined along the lines of
http://books.google.com/books?id=GY-AAwAAQBAJ&pg=PA112&lpg=PA112&dq=blinn+phong+specular+gloss+hlsl&source=bl&ots=q9SKJkmWHB&sig=uLIHX10Zul0X0LL2ehSMq7IFBIM&hl=en&sa=X&ei=DbcsVPeWEdW1yASDy4LYDw&ved=0CB4Q6AEwAA#v=onepage&q=gloss%20&f=false

also includes visualizers

Long term impact: This area, along with the \game\shaders\common\lighting\advanced\lightingUtils.hlsl/.glsl pair will be where we plug in properly attenuated Cook-Torrence later, presuming the impact is not to hefty.
2016-02-16 02:29:54 -06:00
Azaezel 196b214eae engine:
defines and alters a series of material features for deferred shading in order to define a fully fleshed out multiple render target gbuffer patterned after the general principles outlined http://www.catalinzima.com/xna/tutorials/deferred-rendering-in-xna/creating-the-g-buffer/ (though I cannot stress enough *not* using the identical layout)

script:
removes dead material features (ie: those that never functioned to begin with)

shader:
bool getFlag(float flags, int num) definition for retreiving data from the 3rd (matinfo) gbuffer slot's red channel (more on that shortly)

purpose:
_A)_ Small primer on how material features function:
When a https://github.com/GarageGames/Torque3D/search?utf8=%E2%9C%93&q=_determineFeatures call is executed, certain conditions trigger a given .addFeature(MFT_SOMEFEATURE) call based upon material definition entries, be it a value, a texture reference, or even the presence or lack thereof for another feature. In general terms, the first to be executed is ProcessedShaderMaterial::_determineFeatures followed by ProcessedPrePassMaterial::_determineFeatures. The next commit will provide the bindings there. For now it's enough to understand that one of those two will trigger the shadergen subsystem, when rendering a material, to check it's associated list of features and spit out a shader if one is not already defined, or reference a pre-existing one that includes codelines determined by that list of features.

Relevant execution of this is as follows:
DeclareFeatureType( MFT_DeferredDiffuseMap ); - Name
ImplementFeatureType( MFT_DeferredDiffuseMap, MFG_Texture, 2.0f, false ); - Codeline Insertion Order
FEATUREMGR->registerFeature( MFT_DeferredDiffuseMap, new DeferredDiffuseMapHLSL ); - Hook to class which actually generates code
alternately    FEATUREMGR->registerFeature( MFT_Imposter, new NamedFeatureHLSL( "Imposter" ) ); - a simple feature that serves no purpose further than as a test of it's existence (to modify other features for instance)

class DeferredDiffuseMapHLSL : public ShaderFeatureHLSL - Class definition
{
getName  -embeded in the proceedural shader as a remline both up top and before actual code insertions
processPix  - pixel shader codeline insertions
getOutputTargets - used to determine which buffer is written to (assumes only one. depending on branched logic, older features that may be run for either forward or deferred rendering depending on circumstance may have a logical switch based on additional feature flags. as an example:  TerrainBaseMapFeatHLSL::getOutputTargets)
getResources - associated with the Resources struct, closely aligned with the hardware regestry
 getBlendOp - used to determine what blend operation to use if a material requires a second pass (defaults to overwriting)
setTexData - ???
processVert - vertex shader codeline insertions
};

_B)_
The resultant Gbuffer layout defined by the previous commit therefore is as follows:
defaultrendertarget (referred to in shaders as out.col or col depending on GFX plugin) contains either lighting and normal data, or color data depending on if it is used in a deferred or forward lit manner (note for forward lit, this data is replaced as a second step with color. why custommaterials have traditionally had problems with lighting)
color1 (referred to in shaders as out.col1 or col1 depending on GFX plugin) RGB color data and an A for blending operations (including transparency)
color2 (referred to in shaders as out.col2 or col2 depending on GFX plugin) contains:
 red channel comprising material flags such as metalness, emissive, ect,
 green channel for translucency (light shining through, as oposed to  see-through transparency), blue for
 blue for specular strength (how much light influences net color)
 alpha for specular power (generally how reflective/glossy an object is)

long term purpose:
further down the line, these will be used to condition data for use with a PBR subsystem, with further corrections to the underlying mathematics, strength being replaced by roughness, and power by metalness
2016-02-16 02:23:23 -06:00
Azaezel 5b5c6b9907 Deferred Shading
Phase 1: buffers
engine:
provides the following hooks and methods
A) render target "color", and "matinfo". these correspond to texture[0] = "#color";  texture[2] = "#matinfo"; entries in scripts
B) utilizes the independentMrtBitDepth method added GarageGames#857 to set color to an 8RGBA if cards support it
C) adds an RenderPrePassMgr::_initShaders() method to support void RenderPrePassMgr::clearBuffers(). This operates as a pseudo-postfx by rendering a veiwspace plane which fills the screen, then calls a shader which fills both the introduced rendertarget buffers and the prepass buffer to relevant defaults (white with full alpha for prepass, black with full alpha for color and material respectively)

script:
\game\tools\worldEditor\main.cs adds additional hooks similar to GarageGames#863 for colorbuffer, specular map, and backbuffer display
\game\core\scripts\client\lighting\advanced\deferredShading.cs adds the clearbuffer shader, visualizers, and the ShaderData( AL_DeferredShader )  +  PostEffect( AL_DeferredShading ) which combine the various buffers into the output which reaches the screen under normal conditions, as well as the extended debug visualizers.
again, note the lines

   texture[0] = "#color";
   texture[1] = "#lightinfo";
   texture[2] = "#matinfo";
   target = "$backBuffer";
in particular for the core tie-in.

shader:
\game\shaders\common\lighting\advanced\deferredColorShaderP.hlsl
\game\shaders\common\lighting\advanced\gl\deferredClearGBufferP.glsl
the previously mentioned shaders which clear the buffers to specified colors

\game\shaders\common\lighting\advanced\deferredShadingP.hlsl
\game\shaders\common\lighting\advanced\gl\deferredShadingP.glsl
the tie-in shaders

the rest are visualizers

purpose: to expose methodology that allows one to render color, lighting and material information such as specular and gloss which effect the result of both when combined

long term intent: the previous prepass lighting methodology while serviceable, unfortunately had the side effect of throwing out raw color information required by more modern pipelines and methodologies. This preserves that data while also allowing the manipulation to occur only on a screenspace (or reflected speudo-screenspace) basis.
2016-02-16 01:50:58 -06:00
Areloch cb22357eb2 Merge pull request #1461 from Azaezel/textureLinearization
Diffuse/albedo texture linearization
2016-02-16 01:23:16 -06:00
Areloch 98b3d3294d Merge of PR #855 2016-02-16 00:23:02 -06:00
Areloch a90eb9762b Re-submission of the Volumetric Fog PR, with cleanup. 2015-12-01 00:10:13 -06:00
Areloch 498ed63f0b Merge pull request #1438 from Azaezel/rektRadius
explosion cover miscalc
2015-11-14 00:43:49 -06:00
Areloch 1a009d6dd3 Merge pull request #1443 from Areloch/TAM_Implementation
TAML, Assets and Modules implementation
2015-11-12 23:54:27 -06:00
Areloch 92aa785bb2 Merge pull request #1442 from Azaezel/shadow_caching
This all seems to work pretty well.
2015-11-12 12:49:58 -06:00
Azaezel ce2964d2d0 diffuse/albedo texture linearization
http://http.developer.nvidia.com/GPUGems3/gpugems3_ch24.html
2015-11-11 13:52:46 -06:00
Areloch 9d726bb9ed Merge pull request #1453 from blackwc/playJournal-template-fix
playJournal fix and removed depcrecated command line options
2015-11-09 10:24:30 -06:00
Azaezel b778121fc4 castDynamicShadows defaults to false, flipped it over to true for materials on mobile/animated assets. 2015-11-02 23:06:51 -06:00
Azaezel 24f7dc8314 rtparams(#) needs to match the ssaomask register 2015-11-02 23:01:43 -06:00
blackwc ca37e9f84e fix playJournal instruction in comments 2015-10-28 22:52:16 -04:00
blackwc bba604a043 playJournal fix and removed depcrecated command line options 2015-10-28 22:46:17 -04:00
Areloch 48d38ca803 Merge pull request #1447 from blackwc/radioButton-image-new
improved radio button
2015-10-27 00:26:21 -05:00
Areloch 8253bcc343 Merge pull request #1446 from rextimmy/water_vertex_format_fix
Looks to work fine. Thanks!
2015-10-24 02:12:46 -05:00
blackwc ea1931d215 improved radio button 2015-10-23 20:37:22 -04:00
rextimmy 9c6ff1775b Removed unused vertex colors from GFXWaterVertex 2015-10-22 21:54:35 +10:00
Areloch a72802b677 Merge pull request #1435 from Azaezel/glowDebugEmpty
Looks good
2015-10-21 00:56:59 -05:00
Areloch aba6cf2d9e Merge pull request #1436 from Azaezel/ribbonShadersEmpty
Agreed, it makes sense that the shaders are common, so that people can start with empty and add their own art without worrying about stuff not working as expected.
2015-10-21 00:51:22 -05:00
Areloch f41f9fb7c8 Merge pull request #1431 from blackwc/sfxCompareProvider-fix
Seems to work fine.
2015-10-19 22:20:18 -05:00
Azaezel 348a0f20d9 Looks like according to reports, they also weren't checking for physicsshapes. 2015-10-18 23:48:29 -05:00
rextimmy 246785a8bf Removed unused vertex formats from ScatterSky 2015-10-16 21:30:39 +10:00
Azaezel 2753f562e8 shadow caching
SPECIAL NOTE: highly suggest https://github.com/GarageGames/Torque3D/pull/1441 or a variation thereof to prevent debug spew and false-postives for occlusion results.

With significant research, development and prototyping assistance from both @andr3wmac (shaders and partial hook work), and @LuisAntonRebollo (additional culling)

System operates as follows:
1) materials are given an additional castDynamicShadows boolean entry. (Default at time of writing is true by request. Personal usage at time of writing defaults to false. value is default-initialized in materialDefinition.cpp. script/gui exposed)
2) lights are given a staticRefreshFreq and dynamicRefreshFreq (in milliseconds). script/gui exposed
3) materials are (effectively) sorted into dynamic and static shadowmap render lists based on flag. (see shadowMapPass.cpp)
4) initial shadowmaps are generated for each light and 'list'.
5) as each refreshFreq times out, the relevant shadowmap for a given light is refreshed.

Special notes:
dynamicRefreshFreq for all lights is set to a (script exposed) 8MS refresh timer.
StaticRefreshFreq for the lions share of lights defaults to 250 MS (1/4 of a second)
scattersky's embedded light, which is intended to operate in a mobile manner, defaults to 8
to reiterate, these are all customizable per-light via script/inspector gui in the case of alternate project needs.
2015-10-13 18:12:19 -05:00
Areloch 7a3b40a86d Initial Implementation of the Taml, Asset and Modules systems.
Only has example and shape assets currently.
2015-10-13 15:19:36 -05:00
blackwc ef5bdc66d3 fullscreen and windowed mode cli fix update 2 2015-10-11 02:34:21 -04:00
Azaezel 2da94ed4ee explosion cover miscalc
%distscale can actually end up negative. causes miscalculations for applyimpulse and the like (or even healing if you've hacked in the capacity for negative damage)
2015-10-09 17:43:00 -05:00
Azaezel a100a00c99 missing ribbon shaders, empty template 2015-10-07 05:40:05 -05:00
Azaezel e0c275b56b missing empty template glow pass debug tool 2015-10-07 05:36:44 -05:00
blackwc 5239c2f183 fullscreen and windowed mode cli fix update 2015-10-07 04:56:36 -04:00
blackwc 6d6055c873 fullscreen and windowed mode cli fix 2015-10-07 03:28:48 -04:00
wcb 3c252689f3 sfxCompareProvider fix for Empty template 2015-10-06 02:07:01 -04:00
wcb 183c468dda sfxCompareProvider fix for Full template 2015-10-06 02:05:34 -04:00
Areloch 3d65f1f8cd Fixes it so when using SDL, the editor menubar will correctly react to accelerator commands. 2015-09-24 22:23:26 -05:00
Areloch 5ba5092d44 Merge pull request #1402 from Azaezel/SoSensitive3
Files caught by https://github.com/GarageGames/Torque3D/pull/1401
2015-09-16 21:27:30 -05:00
Areloch dd5f910b64 Companion PR to 1398 to add the change to the Empty template as well. 2015-09-05 12:07:47 -05:00
Areloch ec2da8c1c8 Merge pull request #1398 from Duion/patch-1 2015-09-05 00:20:29 -05:00
Areloch 5ee096de20 Added in explicit setting to vec2 in the shader functions per Az's suggestion, to avoid GLSL problems 2015-08-29 12:41:35 -05:00
Areloch 71c19a6151 Companion PR to #719
Adds the OGL side. redoing it to make sure the PR history is clean.
2015-08-28 00:27:08 -05:00
Areloch 95ab3a33a5 Merge pull request #719 from rextimmy/dxtnm-parallax-fix
Fix to allow parallax mapping with dxtnm textures via the red channel.
2015-08-27 23:59:20 -05:00