Commit graph

363 commits

Author SHA1 Message Date
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
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 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