Commit graph

88 commits

Author SHA1 Message Date
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
Azaezel
3d6803865c missing samplerstate configurations 2016-04-25 11:36:23 -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
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
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
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
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
a90eb9762b Re-submission of the Volumetric Fog PR, with cleanup. 2015-12-01 00:10:13 -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
blackwc
bba604a043 playJournal fix and removed depcrecated command line options 2015-10-28 22:46:17 -04:00
blackwc
ea1931d215 improved radio button 2015-10-23 20:37:22 -04: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
blackwc
ef5bdc66d3 fullscreen and windowed mode cli fix update 2 2015-10-11 02:34:21 -04: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
183c468dda sfxCompareProvider fix for Full template 2015-10-06 02:05:34 -04:00
Duion
03e0874f9c Update messageBox.ed.cs
Must be "Canvas" instead of "0"
2015-08-13 23:39:15 +02:00
Areloch
8248ecdeac Looks like WHEEL_DELTA is defined for win and osx, but not linux. Retooling to utilize a $pref instead, as that will let the scroll speed be modifiable for any projects that need it. 2015-08-05 17:44:55 -05:00
Daniel Buckmaster
009bff7f88 Merge pull request #863 from Azaezel/GlowbufferVisualizer
glow buffer debug visualiser
2015-07-01 22:24:16 +10:00
Daniel Buckmaster
39f0e269d6 Merge pull request #1328 from GarageGames/release-3.7
Release 3.7
2015-06-24 19:00:57 +10:00
Areloch
9368b7b915 Adjusted the popup issue fix to ensure nothing breaks in either regular or oculus mode. 2015-06-01 22:34:55 -05:00
Daniel Buckmaster
9cfc852192 Apply vignette settings properly for #1302. 2015-05-16 17:52:58 +10:00
James Urquhart
3a457749ec Oculus VR DK2 Support
- Updated to work with 0.5.x SDK
- Uses Oculus Rendering rather than PostFX
- Stereo rendering refactored so more rendering info is grabbed from the DisplayDevice
- Implements an Offscreen Canvas for in-game gui with oculus
- Message dialogs and metrics display can now go to the OffScreen Canvas (if oculus demo is setup correctly)
2015-05-06 23:09:51 +01:00
Areloch
2f69ffd2d4 Fixes issue #1277
Adds the file path to the saveDataFile call (missionpath\missionname.forest as the format)

This correctly utilizes the forest object's datafile field if it's set.
If not, it will create a new forest item with the missionPath\missionName.forest convention.

This also removes the checks for the hardcoded "theForest" forest object name, so that if it is renamed for some reason, it doesn't break.

Lastly, this corrects a minor semi-related bug, where if you are in the forest editor and have a brush selected, and then click to paint, but no forest object currently exists, it prompts to create one. Once the forest object is created, it would trigger the editor to inspect the newly made forest object. If you attempted to paint the currently selected brush, there was a mis-match in the inspector information, and it would trigger a crash.

This has been corrected by re-initializing the forest editor's selected tool mode so it can be utilized immediately after the forest object is created.
2015-04-27 21:45:57 +10:00
Miodrag Sejic
351d5f08e9 vignette_final
+added: gui slider for maximum exposure of vignetting
+changed: shaders to logical min/max floats
this pr contains the glsl shaders as well and therefore makes the
https://github.com/GarageGames/Torque3D/pull/1225 Pull Request obsolete
2015-03-07 14:03:12 +01:00
LuisAntonRebollo
aa35157eef PlatformSDL implementation. 2015-01-19 01:17:37 +01:00
Daniel Buckmaster
450a6c6c80 Merge pull request #969 from eightyeight/options-for-godrays
Added settings for god-ray PostFX.
2014-12-22 14:52:09 +11:00
Daniel Buckmaster
4af7227559 Fixed some ranges. 2014-12-21 23:20:48 +11:00
Daniel Buckmaster
154be2ae0e Merge pull request #974 from Azaezel/sound_provider_fallback_request
re-orders sound device provider wieghting
2014-12-21 19:06:06 +11:00
LuisAntonRebollo
98e3651db5 Merge pull request #940 from BeamNG/add_opengl_support
Add/Activate OpenGL render.
2014-11-30 02:48:13 +01:00
LuisAntonRebollo
ac31cf18b7 Merge pull request #611 from BeamNG/templates_shader_data_decl
Add sampler names to Templates ShaderData declarations necesary for OpenGL.
2014-11-30 02:20:24 +01:00
Azaezel
55c3717ffa re-orders sound device provider wieghting to preffer xaudio over directsound as d-sound is getting tossed soon. 2014-11-29 05:20:46 -06:00
ChelaruCatalin
cea768a3b1 Improved God Ray
Add control for the number of samples and other controls for God Rays
shader.
2014-11-29 07:53:31 +11:00
LuisAntonRebollo
dd08fd2e7d Add OpenGL support. 2014-11-08 20:21:50 +01:00
Daniel Buckmaster
3082bb3adc Merge pull request #884 from GarageGames/development-3.6
Version 3.6.2
2014-11-05 20:28:01 +11:00
Daniel Buckmaster
be75d5eaab Merge pull request #886 from eightyeight/fix-postfx-manager
Reduce minimum tab width in PostFX manager
2014-11-04 14:20:03 +11:00
Daniel Buckmaster
719fcd7d2d Reduce minimum tab width in PostFX manager. 2014-11-04 14:16:32 +11:00
Daniel Buckmaster
ed820f2dd4 Merge pull request #761 from J0linar/PostFx_Vignette
Added Vignette PostFx
2014-11-04 13:30:47 +11:00
Daniel Buckmaster
ef9bc91bff Merge pull request #744 from lukaspj/Ribbon-Implementation
Ribbon and RibbonNode
2014-10-28 15:19:17 +11:00
Azaezel
f18dd9e438 glow buffer debug visualiser
pure script, there will be several of these using identical methodology for deferred. displays a given buffer via the
 texture[0] = "#glowbuffer"; entry,
passed along to a given shader via the
samplerNames[0] = "glowBuffer";entry
which corresponds to an expected variable name and register.

as much documentation for later as tool
2014-10-24 10:04:17 -05:00