Commit graph

44 commits

Author SHA1 Message Date
AzaezelX 64103a58aa enum value listing
show the string value of masked enums in variable entries
also sort the combo case of scrolling and rotating materials
2025-03-06 19:04:22 -06:00
marauder2k7 1edfbcf447 fixes for reload and flush 2024-12-14 13:37:23 +00:00
marauder2k7 f6dc694bd4 fully working 2024-12-14 01:18:46 +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 c7cc86b357 clamp spot angle to 179,
up custommaterial inputs to 16
add Material::PhotometricMask:handling to processedcustommaterial
and for paranoias sake go ahead and be explicit about _getLightMaterial (those *should* be unneeded as they optionally default to that, but it's how they were in the beatup fork during testing)
2024-02-23 11:52:43 -06:00
marauder2k7 4417462499 Add support for both ies and cookie
Both ies and cookies can now exist on a light

We are still not using all the capabilities of an IES profile, such as candela and luminance values we are just using them as a mask for the moment

Issues compiling on mac and linux, will need to update the ies-loader to use torque methods instead of std::
2024-02-21 07:40:57 +00:00
AzaezelX 57037080b2 add an ignoreLighting entry to materials
by request:, flag to utterly ignore lighting in favor of the base texture
2023-02-14 20:57:44 -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 4c50270e25 fix orm vs single channel mapping 2022-12-03 08:54:30 -06:00
AzaezelX e45b959d7d correct imageassetarrays having a singular texture profile as oposed to a type per.
while that certainly works for most cases it falls apart when dealing with postfx where it's an unnamed array of variable types of inputs.
shifted the profile assignment to #define INIT_IMAGEASSET_ARRAY(name, profile, index) so there's still a really obvious point where you can see the default setting, even if it's not in the more desireable OG definition spot
for postfx in particular, given we can swap that, provided an example of how to do just that
2021-11-03 12:30:52 -05:00
AzaezelX f0d919e859 sound asset conversions - materials 2021-10-14 19:09:20 -05:00
AzaezelX bdf32f4f7b texture profile cleanups 2021-08-06 03:33:02 -05: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
AzaezelX 4250e1d1b4 simplification of the Class::_set<slotname>Asset methods, (as well as early outting before dAtoi(index) hurt itself if index was invalid)
also since I was in there, fixed isrgb accidently being flipped on by default
2020-10-12 04:43:47 -05:00
Areloch f0068c2435 Updates macromagic to properly set up for init'ing when image assets are set in material and terrain materials 2020-10-10 22:48:13 -05:00
AzaezelX 0c7811bd1a shift pbrconfig to ORM 2020-09-30 13:51:12 -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 4ce558f042 Reworks the terrain loader code to work with the assets.
Fixes the terrain asset creation, makes the loading logic go through the asset auto-import behavior when a filename or assetid is bound that is not found.
Corrects terrain material binding to properly save and load
Makes the terrain asset inspector fields work as expected.
2020-06-25 23:33:01 -05:00
Areloch 9b907e77ee Swaps some references from the windows SDK-specific FLT_MAX to T3D's F32_MAX
Takes the makeFullPath in findTSShapeConstructor and turn it into a string before passing it along to the Filename to make stricter compilers happy
Removed some referenced to fields that don't exist in the current build
Removed unneeded ASM language activation for the cmake files
Adjustments to material map assembling macros to better comply to stricter compilers
2020-05-13 02:10:11 -05:00
AzaezelX 5f59ebbacc uninitialized variables-materials 2020-05-11 15:59:22 -05:00
AzaezelX ff4b025c2c adds alphatest shadows for translucent objects
leverage the fact shadergen spits out a modified material per pass, in this instance the shadow pass, to basically flip the translucent aspect off if you've got both translucency and alphatesting flipped on.
2020-03-01 10:47:25 -06:00
Areloch f7b891442a Updated path handling for loose asset files for CPP, Image, Level, Material, PostFX, Shape, Terrain, TerrainMat and StateMachine assets to be more predictable in when and how they expando the loose file path into a full, useable path
Fixed loose file bindings for all associated slots in level asset, such as postFX file, decals, etc
Expanded TSStatic onInspect testcase to parse materialSlots and hook-in a specialized material field for editing/quick reference from the inspector
Adjusted expand behavior of guiTree to be more reliable
Added internal name 'stack' to inspectorGroup's stack child objects for easier access to add programatic fields
Removed redundant PreMult translucency type code
Added setting of feature so probes work when in forward/basic lit mode
Corrected indexing error in SQLiteObject class so it properly parses with the updated console API
Tweaked the FOV setting logic in GameConnection::onControlObjectChange to not be spammy
Fixed var when trying to bind the camera to the client
Added project setting field to dictate the default render mode between Forward or Deferred
Integrated MotionBlur PostFX into updated PostFX Editor paradigm and exposed the samples uniform as an editable field
Integrated DOF PostFX into updated PostFX Editor paradigm
Updated setting group name for vignette postFX
Shifted shaderCache to be in data/cache along with other cached files
Added helper function to replace strings in a file
Fixed ExampleCppObject asset to have correct loose file references
Adjusted editor default level logic so it can be modifed and then stored, as well as reset back to the original default
Fixed verve reference to root scene group
Adjusted location of a nonmodal gui profile so it loads at the correct time
Reorganized AssetBrowser loading and refresh logic so it doesn't stack multiple refresh requests back-to-back causing lag
Updated the search behavior to search not just the current address, but all child folders as well, making it far more useful
Initial work into zip and folder drag-and-drop asset importing support
Removed the import config setting for 'always display material maps' as it is redundant with the new importer context menu actions
Updated example asset type file
Ensured all asset types have proper handling for move, rename and delete actions
Fixed double-click behavior on folders in the AB
Fixed CPP asset preview
Added better logic to discern if a top-level folder belongs to a module or not in the AB directory browser
Added ability to convert a non-module top-level folder in the AB into a module
Added initial hooks for being able to generate a new Editor Tool, similar to how the AB can generate modules
Renamed CPP asset template files to have the .template so they aren't accidentally picked up by cmake
Fixed convex editor's material handling to work with AB and reference back properly
Updated AB images for folder up/down navigation buttons, and the breadcrumb divider arrow
Made PostFX Editor properly allow for input pass-through so you can still edit the level with it open
Added some additional common text gui profiles
Disabled calls to old editor settings logic in various editors to remove spam
Added callOnModules call so tools can initialize properly when the world editor is opened
Fixed logic test for visualizers
Added ability for cmake to scan tools directory for any tools that add source files
2020-02-04 01:47:28 -06:00
Areloch 66cc6fb9d1 Removes current implement of shadow caching
Also removes EC stuff as it's not ready for prime-time yet
2019-12-13 01:14:03 -06:00
Areloch 27ee09e491 Merge branch 'alpha40_premul' of https://github.com/Azaezel/Torque3D into Preview4_0 2019-11-22 21:27:52 -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
AzaezelX bd21a207ef largely based on work by @rextimmy: add premultiplied alpha 2019-11-22 10:02:01 -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 d034895e8f shifts glowmap out of the composite and to it's own texture, as well as featureset. (GL port pending design finalization) 2019-11-01 19:29:31 -05:00
AzaezelX bfccfca0ce more conversionwork from specular entries to pbrconfig ones, adds backend glowmul and glowmap var tracking, as well as pbrconfigmap composite slip-in for the glowmap (sans shaderfeatures just yet). seems to have busted forward lit application though... 2019-10-22 15:11:39 -05:00
AzaezelX 65cbf49c4a backend specularMap to PBRConfigMap alts.
left:
     addField( "specularMap", TypeImageFilename, Offset(mPBRConfigMapFilename, Material), MAX_STAGES,
scripthook till last since that *will* break all current materials.
2019-10-16 15:51:02 -05:00
Areloch ae857faae2 Adds test shapes of Kork and SpaceOrc
Sidestep of memleak from CSF at the moment
Minor fixes and corrections with asset importing and loose files
WIP of updated options menu
2019-05-28 17:24:29 -05:00
Areloch c283295f22 Merge branch 'CustomShaderFeatures' of https://github.com/Areloch/Torque3D into development 2019-05-11 21:53:08 -05:00
AzaezelX 57ee1882fa strip out unused pixspecular to cut down on sources of confusion 2019-05-05 20:10:14 -05:00
Areloch b4a1d18f42 Core implementation of Physical Based Rendering. 2018-09-15 20:19:57 -05:00
Areloch 5019478aad begun adding uniform hooks 2017-10-07 14:36:58 -05:00
Areloch dc5e502dec Initial implementation of Custom Shader Features. 2017-10-05 17:04:51 -05:00
Areloch 25686ed4be Implementation of sRGB image support. Overhauls the linearization setup to utilize the sRGB image types, as well as refactors the use of ColorF and ColorI to be properly internally consistent. ColorIs are used only for front-facing/editing/UI settings, and ColorFs, now renamed to LinearColorF to reduce confusion of purpose, are used for color info in the engine itself. This avoids confusing and expensive conversions back and forth between types and avoids botches with linearity. Majority work done by @rextimmy 2017-06-23 11:36:20 -05:00
Azaezel e475b3060b won't need that any more after this 2016-03-20 16:51:24 -05: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 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
Areloch 5c688260d5 Issue found with PVS-Studio:
Many places utilize post-incrementation with iterators, but it's better performance to use pre-incrementation.

Resolved by changing the iter++ instances to ++iter;
2015-07-13 23:08:17 -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
DavidWyand-GG 17113d3ba5 Blinn-Phong Specular Changes
Based on the work done here:
http://www.garagegames.com/community/blogs/view/21032
2013-10-29 15:10:23 -04:00
DavidWyand-GG 7dbfe6994d Engine directory for ticket #1 2012-09-19 11:15:01 -04:00