Commit graph

169 commits

Author SHA1 Message Date
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
Lukas Aldershaab
89b0c7f73b Console Refactor 2023-09-13 10:33:20 +02:00
JeffR
0bdacb8795 Testing just disabling gfx device enumeration in test mode 2023-07-23 14:42:13 -05:00
Areloch
368b687043 This implements a fix to an issue with the CICD that causes a segfault.
The fix adds a sanity check to the D3D and GL device enumeration function that exits early if there's no registered display from the OS(implying it's running in commandline).
With newer versions of SDL, attempting to enumerate the GL device causes a segfault because the OS will return back a valid context, but the context isn't actually valid. So when tested against, it crashes. Avoiding enumerating the device when you're not in a position to render works around the issue.

TODO: If the machine is running in terminal-only mode, and thus has no valid render context, but still has a monitor plugged into the machine, it can sidestep the sanity check and still result in a segfault. Need a more robust check for that circumstance in a future fix.
2023-07-23 01:04:29 -05:00
marauder2k7
e0119efbb5 move border to gfxglstateblock 2023-07-19 16:33:01 +01:00
marauder2k7
63b2aba467
Apply suggestions from code review 2023-07-19 15:41:24 +01:00
marauder2k7
e325902bac init commit 2023-07-19 13:36:14 +01:00
XXTH
a81c6ebd06 clean up 2023-05-12 11:42:06 +02:00
XXTH
e0ab3830af bsd ready 2023-05-10 14:58:47 +02:00
AzaezelX
0d4221fa59 uninitialized and unused value cleanups
(cherry picked from commit 1f08602cf0ad84409cd8b3520510f9c6ce7d5f9c)
2023-05-01 10:40:02 -05:00
AtomicWalrus
c64c2212ad Fix for MacOS OGL 4.1 support
Workaround: MacOS does not have access to glClipControl.

Because the lower range of the 32F buffer is not available using this workaround, the improvements to depth behavior from depth reversal will be limited on MacOS. Behavior is equivalent to reversed depth on a 24UINT buffer; Better than stock, but not dramatically.
2023-04-15 15:21:49 -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
AzaezelX
aafbb7bfba add debug reportingfor cubemap arrays, and correct transcription flaw 2022-09-18 07:30:47 -05:00
Brian Roberts
3a800e51cc
Merge pull request #891 from Azaezel/alpha401/CubeMapMangle
get probes displaying with low Texture quality
2022-09-15 18:01:24 -05:00
Jeff Hutchinson
2e006390f8 Add GFXFormatA8L8 for OpenGL 2022-09-15 17:59:00 -04: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
Areloch
cd82186231 Fixes setter issue for image/shape/material custom inspector fields where it was not correctly passing through the changed value from the Asset Browser select
Swapped the water's disableTrueReflections variable to be enableTrueReflections for simplicity and consistency(also fixed a persistent typo)
Swapped disableVerticalSync to be enableVerticalSync for simplicity and consistency
Swapped disableParallaxMapping to be enableParallaxMapping for simplicity and consistency
Fix click detection on slider mode entries for guiGameSettingsCtrl so the click position correctly matches the percentage
Fixed problem where postFX initialization would always exec default.postfxpreset.tscript, even if a level's got it's own preset, which can cause problems
Fixed range field type behavior so that editing the values applies in real time, and also consistently applies between slider and text field
2022-08-30 01:29:39 -05:00
Robert MacGregor
39952a490f * Cleanup: Resolve several compiler warnings associated with TORQUE_DEBUG. 2022-04-25 18:23:15 -04:00
rextimmy
e1398895b3 fix opengl device not returning the correct anisotropic value 2021-12-15 20:09:18 +10:00
AzaezelX
0527865462 set cubemapsaver profile to one that preserves sizes
also aug size mismatches for the popup so they're reported
2021-11-21 14:28:51 -06:00
Jeff Hutchinson
90951b3cc8
Merge pull request #619 from Azaezel/alpha40/glcubefix
fix opengl cubemap display
2021-10-11 21:13:25 -04:00
AzaezelX
bce14ab63f fix opengl cubemap display 2021-10-11 20:02:49 -05:00
Brian Roberts
ed80136322
Merge pull request #615 from JeffProgrammer/gl_meminfo
OpenGL Memory Info Extensions
2021-10-11 19:31:10 -05:00
Robert MacGregor
1385b29f03 * Adjustment: Initial testing with extensions to load GPU VRAM. 2021-10-10 20:53:55 -04:00
Jeff Hutchinson
a458c97217 Implement more extensions to get graphics card memory for OpenGL on windows and Linux.
(cherry picked from commit da942cdb79a87b76e629b36415c83067e3620a70)
2021-10-10 20:09:02 -04:00
AzaezelX
e2e1c491ac Merge branch 'Preview4_0' of https://github.com/TorqueGameEngines/Torque3D into kermithelpme 2021-10-09 11:32:13 -05: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
AzaezelX
c523951e65 Merge branch 'Preview4_0' into alpha40/SGCleanups2 2021-09-22 18:47:31 -05:00
AzaezelX
9775d69988 pad shader uniform length pipe by 1 to avoid a bug with some integrated chips clipping 2021-09-21 17:10:07 -05:00
Robert MacGregor
c8a5ccb191 * [OpenGL] BugFix: Correct shader errors being thrown during the load phase due to direct use of glUseProgram causing desync with GFXGLDevice. 2021-09-17 17:39:29 -04:00
Brian Roberts
86a8fb5854
Merge pull request #523 from Azaezel/alpha40/windowWonk
report if SDL_CreateWindow is unable to create a window at all
2021-08-10 22:29:05 -05:00
AzaezelX
fc9d767256 report if SDL_CreateWindow is unable to create a window at all 2021-08-09 23:48:01 -05:00
AzaezelX
a944b6435c give useful data when not finding a given shader var 2021-08-09 20:19:16 -05:00
Marc
3d2f3bda64 Fixes a resolution switching issue when the game uses **only** OpenGL as the renderer
Canvas.tscript fixes provided by @OTHG_Mars
2021-03-18 21:37:36 +00:00
rextimmy
5a933c00d3 Removed old fixed function code from GFX. 2021-01-05 12:57:17 +10:00
Lukas Aldershaab
9caa08b7f0 Fix off-by-one in mip levels for OpenGL 2021-01-02 18:19:26 +01:00
Lukas Aldershaab
3c8d07a03e Cleanup and fixes 2021-01-02 02:08:22 +01:00
Lukas Aldershaab
e92e945912 Refactor GFXTextureArray 2021-01-01 21:06:08 +01:00
Lukas Aldershaab
87dd7ffc4a Implement Singlepass Terrain Render 2021-01-01 21:06:01 +01:00
AzaezelX
e88b7a0783 minor cleanups:
clean up mismatched  PROFILE_START+PROFILE_END() that was in/out of the mip packign for loop on the gl side, leaving just the self-cleaning PROFILE_SCOPE(GFXGLTextureObject_copyToBmp); similar to the dx11 side
   void GuiGameListMenuCtrl::removeRow(const S32& row); (the GuiGameListMenuCtrl:: bit in the class iteslf is redundant and making linux unhappy)
2020-09-26 22:43:26 -05:00
Brian Roberts
d86c6aff35
Merge pull request #238 from Azaezel/alpha40_gl_cubemapWipwork
fix cubemap capture for gl
2020-07-05 20:38:53 -05:00
AzaezelX
c57205b1f4 from @rextimmy: final fixes 2020-07-03 22:56:44 -05:00
chaigler
e2bf5cb8fe Implements missing _captureBackBuffer method for GL gfx layer.
GL layer was missing _captureBackBuffer() implementation which caused screenShot() function to fail. Also caused ScreenShot::capture() to be called every frame afterward which caused significant performance issues.
2020-07-02 16:02:05 -04:00
AzaezelX
ce2b05e0e2 a) grab the source mipmap levels not the dest ones for copy. b) lets rely less on trusting sizeof*4 when we've gor a size per pixel lookup already there 2020-06-29 21:26:08 -05:00
AzaezelX
24e6d8c73c partial followup to #202.
largely cleanups, though does include glCopyImageSubData for gl revs that support it
TODOS:
1) non glCopyImageSubData for `void GFXGLCubemapArray::copyTo(GFXCubemapArray *pDstCubemap)`
2) while we don't get corruption showing in >0 mips for irradiance maps using the newer code, it nevertheless renders wrong.
not 100% sure if renderdoc is showing blank mips because it expects it due to size, or if we are in fact generating em even though we don't use em in the end for irradiance references.
2020-06-25 17:34:48 -05:00
AzaezelX
4223a26f05 no message 2020-06-07 18:00:17 -05:00
AzaezelX
b9c207765e uninitialized variables-gfx 2020-05-11 15:00:25 -05:00
Areloch
c9a63d63cf Updated ToolsGuiTextPadProile to comply to editor theme
Further tweaks/reorg to UI module
Implemented cubemap array scaling on GL so it doesn't crash when texture quality is lowered
2019-09-29 07:51:43 -05:00
AzaezelX
059d531b62 linux followup work by tim 2019-08-21 03:12:54 -05:00
Areloch
600859bd63 Force proper update of box probe when attenuation changes
Fixed multiple case sensitivity issues
Adds GL ARB check for cubemap arrays for certain cases where the driver only supports the extension, not as core
Fixes undeeded namespace declaration in an inline operator function
Cleaned up/reordered some modules default in the data dir
WIP of Das Boot test map
Begun refactoring visualizer tools
Added default cloud and water textures to core/rendering so water and cloud objects work correctly
Added default Fog_Cube mesh so volumetric fog works correctly
2019-08-19 01:14:34 -05:00