Commit graph

44 commits

Author SHA1 Message Date
Areloch 6a40b8bb84 Merge pull request #1559 from rextimmy/dx11_clean
Direct3D11 Support
2016-03-29 00:51:23 -05:00
Anis e0133384e0 Merge pull request #1552 from Azaezel/aLovelyGlow
should actually let HDR have a say for glows.
2016-03-21 19:31:21 +01:00
rextimmy 41e5caf22b Direct3D11 Engine/source changes 2016-03-20 21:52:11 +10:00
Azaezel 74e3ee5214 turns out independent sized render targets was causing lighting artifacting. 2016-03-16 00:45:57 -05:00
Azaezel fd961db215 should actually let HDR have a say for glows. 2016-03-15 22:33:32 -05:00
Areloch 908be4818f Merge pull request #1519 from Azaezel/deferredShading
Deferred shading
2016-02-27 15:08:20 -06:00
Dušan Jocić 28d303c5ea Added immutable vertex and index buffers. 2016-02-20 21:28:18 +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 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 41038ec9ae Merge pull request #1502 from Lopuska/patch-1
Glow buffer graphic corruption fix on OpenGL.
2016-01-16 13:07:06 -06:00
Anis cae97cac37 Glow buffer graphic corruption fix on OpenGL.
Caused by a wrong target size. (probably it was ok on the very old OpenGL 1.5 version)
Before fix, wrong behaviour:
http://goo.gl/dik7Ia
After fix, all right:
http://goo.gl/IsrckM
2016-01-14 23:51:35 +01:00
Areloch a90eb9762b Re-submission of the Volumetric Fog PR, with cleanup. 2015-12-01 00:10:13 -06: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
Areloch a5b48225c7 Corrected the terrain issue caused by unwanted early-outing due to prior changes. 2015-07-29 10:14:19 -05:00
Areloch 3a18819e1e Issue found by PVS Studio:
Several instances where we utilize a pointer variable without properly testing that they aren't null first.
2015-07-28 23:25:09 -05:00
LukasPJ c5dd7230ad Fix for rendering particles to the glow buffer 2015-05-28 20:41:42 +10:00
Ben Payne 364dd3634d Remove dead code that contains a delete of an uninitialized pointer 2015-02-20 18:42:30 -05:00
Azaezel c6cdfafe4e cleaned up variant of https://github.com/GarageGames/Torque3D/pull/768 alterations: opengl support, in-shader bug-reporting, direction vector fit to material slider-bar. 2014-12-21 14:07:42 -06:00
Daniel Buckmaster 5af91bf07a Merge pull request #921 from lukaspj/Mixed-Particle-Rendering-Warning-Fix
Remove warning
2014-12-21 19:06:57 +11:00
Azaezel 98048fd974 Merge branch 'GlowingParticles' of https://github.com/lukaspj/Torque3D into glowParticles
Conflicts:
	Engine/source/renderInstance/renderParticleMgr.cpp
2014-12-16 18:48:28 -06: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 b731f3cbe5 Merge pull request #932 from BeamNG/reduce_RT_changes
Reduce innecesary changes on Render Target textures.
2014-11-30 02:22:52 +01:00
LuisAntonRebollo 98926b1ae1 Merge pull request #928 from BeamNG/renderparticlemanager_sampler_names
Change RenderParticleMgr for use sampler names
2014-11-30 02:22:19 +01:00
LuisAntonRebollo 1c95ce21d6 Merge pull request #608 from BeamNG/use_gfxdevice_setupgenericshaders
Use GFXDevice::setupGenericShaders for support non Fixed Fuction Pipelines.
2014-11-30 02:20:00 +01:00
LukasPJ 30a8401d14 Add support for rendering particles to the glow buffer 2014-11-28 23:34:26 +01:00
LuisAntonRebollo dd08fd2e7d Add OpenGL support. 2014-11-08 20:21:50 +01:00
LuisAntonRebollo c0b2e6536b Reduce innecesary changes on Render Target textures. 2014-11-08 18:34:21 +01:00
LuisAntonRebollo 53ac49ee91 Change RenderParticleMgr for use sampler names instead of harcoded locations for allow OpenGL. 2014-11-08 18:03:49 +01:00
LukasPJ 537441fc15 Remove warning 2014-11-08 05:04:42 +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
bank 62006e8b3c Remove unneeded double-initialization of the vars. 2014-10-19 14:30:46 +11:00
Lukas Joergensen 981b37e548 Re-enable MixedParticleRendering 2014-08-08 00:34:32 +02:00
Daniel Buckmaster 1702573b78 Merge pull request #612 from GarageGames/platform-type-consistency
Platform type consistency
2014-05-10 11:40:40 +10:00
Areloch 4594a13740 Fixed the assert crash by making sure the glow material instance keeps the original material instance's user object 2014-04-16 10:43:37 -05:00
LuisAntonRebollo 33742599b3 Use GFXDevice::setupGenericShaders for support non Fixed Fuction Pipelines.
OpenGL and DirectX11 not support FFP, and GFDevice::disableShaders has not the necessary information to decide the shader to be used.

GFDevice::SetupGenericShaders is used instead of GFDevice::disableShaders.

GFDevice::disableShaders will be deprecated on T3D 4.0
2014-04-13 17:57:40 +02:00
Daniel Buckmaster 87d9e245b7 Merge remote-tracking branch 'smally/platform_type_consistency' into platform-type-consistency
Conflicts:
	Engine/source/platform/platformCPUCount.cpp
2014-04-04 13:43:25 +11:00
Thomas Fischer 004f04660b refactored the constructor to not use a default reference to a static member 2014-03-15 12:26:51 +01:00
DavidWyand-GG c65cca26dd Viewport Fix for Glow PostFX
- Modified the glow postFX to now respect the current viewport settings.
- This fixes glow rendering for the Oculus Rift and any other time the
glow rendering should be limited to a region of the back buffer.
2013-10-23 02:15:14 -04:00
cpusci 4c35fd37af Simple pass over the codebase to standardize the platform types. 2013-08-04 16:26:01 -05:00
Thomas Fischer 53abbe066d added checks for valid pointers after locking 2013-06-30 17:51:38 +02:00
thecelloman b4ea1123dc Remove Interior Object format (DIF) 2013-04-05 12:39:26 -04:00
DavidWyand-GG 6637948067 Fix for Issue #132 for RenderOcclusionMgr Rendering 2012-11-08 17:47:32 -05:00
bank d2700f881c Source changes needed for Linux build. 2012-09-23 15:31:56 +04:00
DavidWyand-GG 7dbfe6994d Engine directory for ticket #1 2012-09-19 11:15:01 -04:00