Commit graph

224 commits

Author SHA1 Message Date
AzaezelX 9eb87b9555 fix probe capturepoint nudge utility 2024-12-16 12:01:53 -06:00
marauder2k7 f288ffccba cubemap baking fix
the key part of this issue was to invert the order we were baking the faces. Not much of a fix but it works better than before need to get a proper fix implement
the way the issue is copying X+ into every other face but isnt doing it in the reverse order means the rtv for face 0 must be being replicated into all other faces.
2024-12-04 21:57:32 +00:00
AzaezelX 56e4484ff6 remove glowbin as it's own render pass 2024-05-30 17:29:42 -05:00
Brian Roberts d464c450d5
Merge pull request #1259 from marauder2k9-torque/test-cubemap-mip-gen
Test PR for generating cubemap mips
2024-04-24 23:14:02 -05:00
marauder2k7 ce4d861658 Test PR for generating cubemap mips
note ibl skips prefilter step and prefilter just becomes the cubeRefl.getCubemap()

Generates cubemap mip levels after the bake correctly on DX side.
2024-04-18 07:56:52 +01:00
AzaezelX fe26ffc375 shift capturing from a globalMacro to a sceneRenderstate S32
lets us ditch shader recompilation so that can be done on the fly without hitches, though does cost us a per-shader const for objects and postfx
2024-04-16 13:51:41 -05:00
marauder2k7 2b295fb7f0 rest of virtuals removed
virtuals removed and replaced with override where necessary on the rest of the code base, clang-tidy to the rescue.
2024-03-18 18:40:22 +00:00
marauder2k7 efbe5e90f5 virtuals removed
virtuals removed and replaced with override where necessary, clang-tidy to the rescue.
2024-03-18 18:13:00 +00:00
AzaezelX 8c38448428 probe capture fixes
review of per and post bake protocols showed that the CAPTURING shader macro was not being properly recompiled in. as opengl was not playing nice with a simple batch shader recompilation for all effected shaders, a full lightmanager restart is at time of writing required. once we have a proper globally cached scene structure stored off GPU side, we'll want to change  GFXShader::addGlobalMacro("CAPTURING", String("1")); on over to dirtying that value in the cached buffer via setting a shader global uniform
review of prefilter examples shows a fixed sample count of 1024 across multiple implementations, so we'll use the standard barring further research into where that number is comming from for a scalar approach
review of gl shaders shows a doubleup in compiled state testing, so slimmed that down and added additional debugging reports
2023-12-05 13:32:03 -06:00
AtomicWalrus 75625dc679 Reverse depth & 32F buffer format
-Adds reversed depth projection model, dramatically increasing depth buffer effective resolution.
-Adds 32F depth 8U stencil format GFXFormatD32FS8X24 (following DX naming conventions). Note this is a 64-bit format, and likely not suitable for mobile platforms. Revert to GFXFormatD24S8 in renderManager.tscript for mobile & "ancient" platforms.
-Corrects alignment of texture type details array.
2023-04-14 20:13:28 -06:00
Johan Mattsson 5b8bfffdec
Fix operator 2023-03-05 12:12:57 +01:00
AzaezelX f5a34308f9 add a docsURL; macro to link a given set of script config vars to git or similar storage urls via clicking on the inspector 2023-01-27 01:13:15 -06:00
Brian Roberts 95b8028e5a
Merge pull request #943 from Azaezel/alpha403/emissiveToReciveShadows
emissive  to recivesShadows
2023-01-09 15:28:30 -06:00
AzaezelX 5f319e50ed ammend caputre mask so that skylight et al gets terrain, but skips editor-only renders 2023-01-03 06:53:59 -06:00
AzaezelX 645f88d4af emissive to recivesShadows
now we've got a glow mask and multiplier, ditch the emissive flag in favor of a proper recivesShadows
2022-12-29 13:38:30 -06:00
AzaezelX d23ee397e6 adds wetness
cliffsnotes:
   $Core::WetnessTexture = "core/rendering/images/wetMap.png"; //for the influence degree map
probes/skylight have a new canDamp boolean, set to off for probes, on for skylight by default.
:levelinfo has a dampness multiplier (0-1)
kicked up numTextures from 8 to 16 for shaderdata and postfx since that hit the 8 texture-in prior limit, and we've already adopted apis that can handle the higher count
2022-11-21 21:12:23 -06:00
AzaezelX 04f4a5fcf4 dedicated server nulltexturemanager work
also supress warning for imageassets not loading a texture in nulldevice, and early out of _determineFeatures shadergen methods under the same conditions
2022-10-01 12:44:45 -05:00
AzaezelX ad3c961579 get probes displaying with low Texture quality
refactored detection of texture sizes for cubemaps
removed the assumption that if we give U32 GFXTextureManager::getTextureDownscalePower( GFXTextureProfile *profile ) no profile, it should go right ahead and downscale anyway
sniped the downscaling strings in the resulting U32 getProbeTexSize(); and void setCubeTexSize(const U32 cubemapFaceSize); until sucj time as we can properly follow up all possible combinations of shiping in one scale, and a customer choosing to use lower resolution textures as the current result is a hard shutoff entirely
2022-09-14 15:58:32 -05:00
AzaezelX 5453d53f4c correct capturing flag test 2022-08-28 17:24:59 -05:00
AzaezelX 748f884671 adds light fade and cap trackign to probe manager
prebake removes them, postbake restores them to ap settings.
also went ahead and threw the probes::capturing val at it as well
2022-08-28 14:27:15 -05:00
AzaezelX 111f0c840d probe capture cleanups pt1
fix high-metalness object capture (had the lerp the wrong direction for canceling out NULL-ibl due to full metallic)
use dStrcmp for (Con::getVariable("$Probes::Capturing", "0") comparisons. and early out on rendering probes when we are capturing, not when we aren't.
2022-08-27 17:25:35 -05:00
JeffR d044ae0702 Removed unneeded default irradiance and prefilter cubemaps, and their convars
Added getGUIPath console function to guiAsset
Corrected console function documentation for getScriptPath in MaterialAsset
Added getter console functions to PostEffectAsset
Added getAnimationPath console function to PostEffectAsset
Fixes handling of mapto with the reskin usage when generating preview renders for ShapeAssets
Standardizes getShapeFile to getShapePath on ShapeAsset to better match formatting of other getters on assets
Adds sanity checking for getStringWidth to prevent crash if there's an issue with the font being ready at time of request(from Az)
Earlies out on rendering of impostors if it's the deferred bin to prevent unneeded duplicate rendering messing up results(from Az)
Fixed duplicate naming of quality levels on LightingQualityList
Added check so if _makePrettyResString is handed a 'human formatted' resolution string(as in, has <width> x <height> it can handle that properly
Shifted yes/no and on/off option lists to globals for ease and consistency of handling on options menu
Improves check for unapplied graphics options on options menu and applies them all at once
Add sanitizing of variable names so getVariable doesn't have issues when looking up array variables in optionsMenu logic
Adds better tracking of what options menu category is shown so refreshes don't reset it
Add better handling for changing resolution in options menu and getting it to apply properly
Adds better utility functions for setting bools vs optionsLists vs quality lists and updates options fields to use the most appropriate
Removes redundant setting of $pref::SFX::channelVolume vars in defaults.tscript
Removed unneeded extra logging from asset browser drag-n-drop actions
Adds item to RMB context menu in AB to regenerate preview images
Fixes move command for asset types(needed to properly reference the full path of the associated files) and added it for shapes, animations and terrains
Added logic so when the dropdown for selecting a target module on the Create New Asset window is changed, it forcefully updates the target path to point to the module to avoid erroneous paths being provided
Adds proper clamping of values to Forest Editor's brush size in the editor bar. Could be set to below 1 even though it would visually clamp to 1.
Temporarily disables fields and handling of 'open in Torsion'.
Fixes bad pixel in gui/images/tab_border.png which was causing it to fail to generate bitmap array properly
Makes the New GUI option from menubar in GUI Editor use same Create New Asset method as everything else
Disables access to the CubemapDesc reflector field in the material editor as it's not nominally used now in favor of probes
Adds proper loading of roughness and metalness fields in material editor
Fixes the default ReflectProbePreviewMat to use a better base DiffuseMap (No Material) rather than the occluder
Fixes disable display for some options in the advanced panel in the shape editor so they look more fitting to everything else
Adds check to avoid spam of markItem errors in the event requested tree item is invalid
Fixed remove material button and command in TerrainMaterial Editor
2022-04-03 20:00:30 -05:00
JeffR 28bf6c5b8f Ensures that the capturing flag is toggled regardless of how we invoke for a probe to bake(previously it was only done with the batch bake) 2022-02-14 08:58:19 -06:00
JeffR e04f844240 Scaling correction to probes in deferred mode to improve parallax adjustment
Ensure that probes are masked to be rendered during bake passes so they can contribute during a bake allowing multibakes
Adjusted order of the connect data for the forward shaders to fix a mis-port issue
2022-02-13 19:24:01 -06:00
JeffR 79eebdd5f3 Cleaned and repacked work to update the probe bin and reflection probe behavior to clean and standardize it. 2022-02-12 15:53:40 -06:00
AzaezelX b60d51969e brdf handling corrections
1-handle the brdfTexture in linear space, not srgb.
2-clamp surface.NoV across the board for consistency. (solves several new and ongoing artifacts)
2021-11-13 19:05:26 -06:00
AzaezelX 42bc6fa358 differentiate forward lit and deferred ibl vars
since we're not currently using the same arrays et al for the whole pass, need to make sure those don't fight
2021-10-26 12:32:37 -05:00
Robert MacGregor 5d26dba7da * BugFix: Clear some MSVC compiler warnings. 2021-10-07 00:27:39 -04:00
Robert MacGregor 1b6b803a20 * BugFix: Clear a lot of warnings and correct a few actual programming errors along the way. 2021-10-04 20:04:21 -04:00
Areloch 5525f8ecdd Converts all game, gui editor, and system classes to utilize assets
Processed core, tools and default modules to utilize assets
Converted all console types that were string based, such as TypeImageFilename to utilize const char*/the string table, which avoids a lot of type swapping shenanigans and avoids string corruption
Removed unneeded MainEditor mockup module
Removed some unused/duplicate image assets from the tools
2021-07-19 01:07:08 -05:00
Lukas Aldershaab 099dd4f1f3 Parametrize script extension, default to 'tscript' 2021-01-19 21:32:31 +01:00
rextimmy 5a933c00d3 Removed old fixed function code from GFX. 2021-01-05 12:57:17 +10:00
AzaezelX 53f9f49410 mMipCount was never being filled out. just use mPrefilterArray->getMipMapLevels() direct 2020-12-05 00:04:19 -06:00
Areloch 94e6d19fb2 Ensures that baking is consistently set to use HDR formats or not which avoids an occasional mismatch crash
Also corrected a string formatting issue with loading static cubemaps on probes that could lead to a crash
Fixed the resources loaded handling so it would correctly initialize the probe's cubemaps even if the initial ghost network packet assigned a cubemap before we fully init'd the client object
2020-10-29 23:27:07 -05:00
Areloch 6a3603c737 Overhauls the handling of probes to utilize an active probe list to improve performance and allow a greater total number of active probes in a scene.
Also fixes handling of metal materials during bakes to render properly, and fixes a possible double-up return in findObjectByType, which could cause doubling when getting probes in the scene
2020-10-19 00:53:09 -05:00
AzaezelX 0c7811bd1a shift pbrconfig to ORM 2020-09-30 13:51:12 -05:00
Areloch 350d3e6702 Fixes 2 minor mistake corrections 2020-09-20 01:19:08 -05:00
Areloch 8956559bfd Various misc. tweaks and fixes based on static code analysis to minimize/fix memleaks, crashes, or other performance impacting code. 2020-09-19 18:25:10 -05:00
Areloch 5289fdf7f1 Re-implements the dynamic cubemap mode option for reflection probes 2020-09-11 02:13:05 -05:00
AzaezelX 1e66b118b6 more prepass cleanup, plus skip out early on _determinefeatures for deferred if we're translucent 2020-08-03 16:45:05 -05:00
AzaezelX f829303ded cleanup singlechannel glowmask leftovers (we use a full rgb map now) 2020-07-12 17:39:16 -05:00
Areloch 638a515702 Merge branch 'alpha40_BandingBreakup' of https://github.com/Azaezel/Torque3D into Preview4_0_w_alph40_cleanups 2020-05-16 02:16:52 -05:00
AzaezelX 8aa03a4ac9 uninitialized variables-renderinstance
(cherry picked from commit dcbc22bf8450250f192ae56b303affd760f63db1)
2020-05-11 15:17:09 -05:00
AzaezelX 1a33d483a3 ensure we've got a known stateblock set for GeneratePrefilterMap 2020-04-14 12:40:31 -05:00
Areloch 6ade6f08ce Updated Assimp
Added initial behavior for ImageAssets to hold a list of GFX resources of different texture profiles to avoid mem leaks with incorrect-typed usages
Added function to ImageAsset to get best-fit asset, allowing for fallbacks if the requested assetID is not found
Added function to ShapeAsset to get best-fit asset, allowing for fallbacks if the requested assetID is not found
Disabled fields for dynamic and static shadowmap refresh rates
Moved noShape model to core/rendering/shapes to place it in a more logical module position
Added an include to avoid undefined type compile error and removed unneeded semicolon from zone code
Added call to reload probe textures when a reloadTextures call is made
Adjusted default directional light shadowmap settings to not be as extreme
Added utility function to probe manager to allow any class to request a 'best fit' list of probes that would affect a given location, allowing other classes such as fog or particles to utilize IBL. Also updated probeManager's forward rendering to utilize same function to reduce code duplication.
Shifted shape loader code to utilize assimp for loader consistency and testing
Changed render bin used for SSAO postfx so it runs at the right time
Made Core_Rendering module scan for assets
Updated loose file references to a number of assets to follow proper formatting
Refactored asset import code to follow a more consistent object heirarchy structure on importing assets, allowing more reliable cross-referencing between inbound items
Updated asset import logic for materials/images so that they properly utilize ImageType. Images correctly save out the assigned image type, materials reference the images' type to know what map slot they should be used in. Importer logic also updated to better find-and-add associated images based on type.
Cleaned up a bunch of old, outdated code in the asset importer
Added initial handling for in-place importing of files without needing to process them through the UI.
Added ability to edit module script from RMB context menu if torsion path is set
Updated list field code for variable inspector to utilize correct ownerObject field
2020-03-19 09:47:38 -05:00
AzaezelX d75593bf6f hooks up missing probe capture filters 2020-01-01 22:37:27 -06:00
Brian Roberts c0226d4640 mac crashfix and compilation correction. the former's down to a typo, the latter, needed specification for which class->setTexture(near identical sig) to use 2019-12-05 21:30:01 -06:00
Areloch ac77315e29 Merge branch 'alph40_pbrConfig_BREAKINGWip' of https://github.com/Azaezel/Torque3D into Preview4_0 2019-11-22 21:24:59 -06:00
Areloch 72ceede272 Added Forward Material debug viz for HLSL(so far) and integrated it back into editor flagging.
Re-added logic to track existing probe shader consts instead of constantly recreating it
Added logic for pre multiplied translucency mode
2019-11-21 00:48:55 -06:00
AzaezelX 63a4d69a33 clip out eroneous test casuing issues with MFT_SubSurface 2019-11-08 05:54:30 -06:00