mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-04 21:10:32 +00:00
Torque3D - Game Engine
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. |
||
|---|---|---|
| Engine | ||
| My Projects | ||
| Templates | ||
| Tools | ||
| .gitattributes | ||
| .gitignore | ||
| allProjects.txt | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| generateAllProjects.bat | ||
| projects.xml | ||
| README.md | ||
Torque 3D
MIT Licensed Open Source version of Torque 3D from GarageGames
More Information
Pre-compiled Version
In addition to GitHub we also have a couple of pre-packaged files for you to download if you would prefer to not compile the code yourself. They are available from the downloads page on the wiki.
Related repositories
- Torque 3D main repository (you are here!)
- Project Manager repository
- Offline documentation repository
License
Copyright (c) 2012 GarageGames, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.