Commit graph

547 commits

Author SHA1 Message Date
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
Brian Roberts 1be326e0d0
Merge pull request #1297 from marauder2k9-torque/matrix-templated
Template Matrix class
2024-11-07 16:17:38 -06:00
AzaezelX afeb957601 fix malformed GBitmap::getColor 2024-09-16 12:40:18 -05:00
marauder2k7 888332a85c rest of the implementation
apparently templated classes need all functions to be inline, otherwise unresolved symbols
macro for switching between matrixf and templated
few functions that were missed
2024-07-28 14:35:34 +01:00
AzaezelX a58f98167f handle missing virtual destructors
clang translation: destructinplace needs to know what to erase.
2024-06-10 13:20:09 -05:00
Sven ada83d9a6a
Remove redundant cstdint include 2024-04-25 18:10:26 +00:00
Sven ac56258c9f
Revert "Remove redundant include" 2024-04-25 18:09:54 +00:00
Sven 51be14645d
Remove redundant include 2024-04-25 19:58:50 +02:00
Sven ba5351180b
Add cstdint to ies_loader 2024-04-25 11:27:09 +00: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
marauder2k7 33094397c2 Update bitmapSTB.cpp
stb loader was spamming NO SOI with the function of stbi_info_from_memory because it checks for a jpeg first. This will always return an error if you are sending any other format. Remove this check and just load the memory stream. if it fails to return pixeldata then we have an error.
2024-03-27 07:32:59 +00:00
marauder2k7 0342eb6f31 replace other classes
now all sfxFileStreams create a libsndfile stream class.

At the moment we only read as short
2024-03-24 12:06:03 +00:00
Brian Roberts 05a083ca6f
Merge pull request #1234 from marauder2k9-torque/virtuals-override
Virtuals override
2024-03-21 10:43:26 -05:00
AzaezelX c337d5a9d2 clang tidy misc fixes
adress mixed || plus && concerns raised
2024-03-18 20:11:44 -05:00
marauder2k7 8dc3163fae Update gfxNullDevice.cpp 2024-03-18 20:24:03 +00:00
marauder2k7 7c7e3c8bf8 Update gfxNullDevice.cpp 2024-03-18 19:58:02 +00:00
marauder2k7 155696ba76 Update gfxNullDevice.cpp
ubuntu gcc crash on this function
2024-03-18 18:55:59 +00: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
marauder2k7 11d8604d8e ogl device buffer creation
now ogl mirrors dx side with ubo creation and clearing pushed up to the device level.
2024-03-14 14:23:08 +00:00
marauder2k7 1e8841e6b5 pushed buffer creation up to the device level
now shaders ask the device to create a buffer, if a buffer of the same name and size already exist then a pointer to that buffer is returned instead. Going to see if something similar can be added to the opengl end.
2024-03-14 13:32:21 +00:00
marauder2k7 e6c653c441 warnings cleanup
cleanup and some warning fixes
2024-03-14 08:28:11 +00:00
marauder2k7 9dc5ae833b opengl ubo setup
opengl can now compile with ubo buffer objects similar to cbuffers on dx side.

cleaned double up of data from both sides, gfxhandles only need to use the desc info instead of holding onto its own.
2024-03-13 22:23:01 +00:00
marauder2k7 fbed04050a gui shaders for opengl
First opengl geometry shader along with the other shaders for gui rendering opengl side.
2024-03-09 18:34:43 +00:00
marauder2k7 d9c4269d8b bug fix
deleteSelection when an output node had multiple connections only the first one was deleted, needed a new function to return a vector of connections that are now looped and deleted at the end of delete selection.

few other minor additions and fixes.
2024-03-07 17:22:48 +00:00
marauder2k7 0d448ad761 smoothing out results from gui shaders
roundedRectangle and circle drawing now smooth out their results
2024-03-07 09:47:18 +00:00
marauder2k7 c9d70de609 extra draw gui
add the extra functions for drawing gui elements
RoundedRectangle:

All draw rect functions now pass through roundedRectangle which uses a shader and can draw borders, and rounds the corners

Draw thick line:
draws a line thicker than 1 pixel, uses a geometry shader to do this

Draw Circle:
Draws a circle with a border parameter.
2024-03-06 17:27:18 +00:00
marauder2k7 39c2cc09fc Update gfxGLShader.h
forgot to save the file...
2024-03-06 14:02:30 +00:00
marauder2k7 4a6fbd5811 DX and GL Geometry shaders added
Added the dx and gl geometry shader compile codes.
2024-03-06 13:51:50 +00:00
marauder2k7 808e2f4200 Groundwork for other shaders
Adds the ground work for geometry shaders
Expands shaderData and gfxShader to allow for more shader types

note: when building a GFXShader in source you have to call setShaderStageFile with the shaderStage and the filepath for that stage.

Once we add compute shaders this will become more apparent as compute shaders are a stage of their own and do not require vertex and pixel files whereas other shaders sometimes do.
2024-03-06 13:26:39 +00:00
marauder2k7 d8636f754b Merge remote-tracking branch 'upstream/development' into ShaderConstBuffer-CleanupRefactor 2024-03-01 17:52:37 +00:00
marauder2k7 6355da5df6 various fixes
STB probably shouldn't fail on failed info, just continue.
Assimp only add sequences if there are any.
Update kork chan asset.
2024-03-01 15:01:47 +00:00
marauder2k7 017246cfa3 Update gfxD3D11Shader.cpp 2024-03-01 14:30:31 +00:00
marauder2k7 cd6656be35 Fix archive
Incorrect cmake directory was messing up reading from zips
STB was failing to read from zips, it was failing to get the file info, something we were using as an early out, now if that files on the filepath, we use the memory read instead since stream needs to be a success to get to that point.
2024-03-01 10:06:18 +00:00
marauder2k7 a7021c0ed3 cleanup
Reverted back to a 2d array since when the const buffer changes are made to the shaders they will be completely swapped out for a 1d array with a max size of 16 for the program, id3d11buffers will be shared across shaders apart from object buffers. We still need to decide on a structure to get everything setup so to keep functionality a max of 2 buffers per stage with 1 buffer as a padding so we can start coding constant buffers right away
2024-02-29 14:34:22 +00:00
marauder2k7 cd8914b9ad reverse bitshift
need to reverse the bitshift on shaderstages so we get values between 0-5, need to also revert the mBoundConstVec back to a 2dimensional array so that the binding point can be dynamic as well.
2024-02-27 20:59:10 +00:00
marauder2k7 040bbdd6d6 Update gfxD3D11Shader.cpp
turns out we dont need to do this if both exist the bind point gets changed anyway
2024-02-27 14:51:59 +00:00
marauder2k7 e9a38539a3 multiple desc per handle
Added multiple descriptions to handles.

While maps are very efficient and match data very quickly due to hashing and what not, they are tricky memory wise, we cant clear them if they are only made up of structs and enums. Need to explore other methods for doing this. Original system had a sub buffer system with a check based on whether the handle was marked vertex/pixel. With 6 stages possible now we need to think of a more effective method. Since shaderstage is now a bit flag maybe some sort of streaming setup could be used to write without a loop.
2024-02-27 09:15:19 +00:00
marauder2k7 78df01af55 Update gfxD3D11Shader.cpp
plugging leaks
2024-02-26 22:44:32 +00:00
marauder2k7 37636bcd26 switch to vectors
uses vectors for buffers instead of 2d array
2024-02-26 22:25:11 +00:00
marauder2k7 c876e86957 Update gfxD3D11Shader.cpp
cleanups
2024-02-26 16:38:56 +00:00
marauder2k7 b979f4befc everything works
... apart from the sun =/
2024-02-26 09:22:19 +00:00
marauder2k7 e24971517e commit before pr 2024-02-25 23:10:23 +00:00
marauder2k7 25bc9cf354 stumped
buffers seem to be being added correctly, but for whatever reason render is not correct =/
2024-02-25 22:51:37 +00:00
marauder2k7 af29a2af0a Remove code duplication
Removed code duplication, all types can be routed through the same function apart from matrices.
2024-02-25 15:26:48 +00:00
marauder2k7 8c01a1a85b Working
This commit has everything rendering kind of correctly, but the colours seem off from lighting.
2024-02-25 13:39:22 +00:00
marauder2k7 6355e122d2 compare before change
check to see if data is different in internal sets before changing values
2024-02-24 19:52:35 +00:00
marauder2k7 3f3ef12c3b handle the global buffer
global buffer needs a special case
2024-02-24 17:33:28 +00:00
marauder2k7 e8d8138c74 working
last commit before global conform
2024-02-24 16:26:09 +00:00
marauder2k7 8887e21f4b working
working example, renders all gui controls.

We still cant render a scene, something to do with the constant buffer at slot 0 of the vertex shader being too small..... gotta figure this one out..................
2024-02-24 14:42:30 +00:00