Jump to content

Josh

Staff
  • Posts

    24,996
  • Joined

  • Last visited

Everything posted by Josh

  1. Default orthographic viewport zoom now takes DPI scale into account.
  2. Updated editor to solve viewport rendering issues reported here: https://www.ultraengine.com/community/topic/61866-windows-11-editor-issues/ V-sync is always disabled in-editor now because changing the vsync mode forces a swapchain recreation. May cause some timing issues while navigating viewports.
  3. After a swap chain is created, if post-processing effects are enabled, it will take three calls to World::Render before anything except a black screen will appear. Related thread: #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { EngineSettings settings; settings.asyncrender = false; Initialize(settings); //Get the displays auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_RESIZABLE | WINDOW_CENTER | WINDOW_TITLEBAR); //Create world auto world = CreateWorld(); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera->SetClearColor(0,0,1,1); camera->SetDepthPrepass(false); auto fx = LoadPostEffect("Shaders/FXAA.fx"); camera->AddPostEffect(fx); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { auto e = WaitEvent(); if (e.id == EVENT_KEYDOWN and e.data == KEY_SPACE) { camera->SetClearColor(Random(), Random(), Random()); world->Update(); world->Render(framebuffer); } } return 0; }
  4. I found I can avoid this bug by drawing the viewport three times when a change of size is detected. The bug still exists in the engine, and should be fixed in the future, but it only happens in a non-realtime app and is a very specific problem. For now I am just going to avoid triggering it in the editor and that should be sufficient for our current needs. Continued here:
  5. This simple example shows the problem. I have to hit the space key three times after each window resize before the screen renders again. Without the post effect it works fine: #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { EngineSettings settings; settings.asyncrender = false; Initialize(settings); //Get the displays auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_RESIZABLE | WINDOW_CENTER | WINDOW_TITLEBAR); //Create world auto world = CreateWorld(); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera->SetClearColor(0,0,1,1); camera->SetDepthPrepass(false); auto fx = LoadPostEffect("Shaders/FXAA.fx"); camera->AddPostEffect(fx); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { auto e = WaitEvent(); if (e.id == EVENT_KEYDOWN and e.data == KEY_SPACE) { world->Update(); world->Render(framebuffer); } } return 0; }
  6. This is a useful tool to make sure your computer is ready for Ultra: https://www.ozone3d.net/gpu_caps_viewer/ In the Vulkan section, the API version should be at least 1.3.
  7. My R9 280 is no longer receiving driver updates and the last driver only supports Vulkan 1.2...
  8. I have temporarily disabled post-processing effects in the editor. Please confirm that this solves all your rendering problems.
  9. The black screen is being caused by one of the post-processing effects, so probably some syncing thing when a new texture buffer is created. It's definitely a Vulkan problem.
  10. Ultra supports this in the enterprise build. One thing I found is that supporting double floats by itself is not that useful. The next thing people want is some streaming terrain and planet system to populate the world with. But that itself isn't that useful, because no one actually has any data for such a system, so the next thing they need is some kind of geospatial mapping system that fetches real world terrain data. So I consider all of those things to go together and be required before this will see release.
  11. Based on your video, I think the problem is that you are expecting it to pick the closest object. There is an optional value you should set to get this behavior. Otherwise, it just acts as a line-of-sight test and returns if any object is hit. Picking does not work on animated models because the vertices only move around on the GPU. In my AI scripts I handled this by using the box pick mode on all children of the model, then disabling picking on the model itself: self.entity:SetPickMode(Entity.BoxPick,true) self.entity:SetPickMode(0,false) This provides a close but efficient way to intersect an animated model with bullets and things.
  12. I think the overdraw problem was caused by my use of WS_EX_TRANSPARENT in every created window. I still have a problem with the 3D viewport rendering black, but I think this fixes the background overdraw problem.
  13. It seems the problem is that WS_CLIPCHILDREN is being ignored.
  14. ExcludeClipRect is what is needed I think...
  15. I think the issue is that my own window paint code is not considering the complex region I assume the event somehow provides, but is only considering the rectangle of the paint event. There must be a structure I need to pass that includes the excluded child window areas.
  16. There are two problems. The gray overdraws are caused because when the WS_CHILD window style is used, any paint events on the parent window overdraw the child window. I was using a bordered panel underneath the viewport window, and changing the panel border color triggers a paint event that covers the whole area of the viewport. This is why switching the active viewport would paint the previous viewport gray. I solved this by using four 1-pixel thick panels to make the border around viewports. These can have their color changed and it does not cause a paint event that covers the viewport window. The second issue is it seems 3D perspective viewports occasionally render a black screen. I am still investigating this. A fix is uploaded now for the first part.
  17. Fixed GUI scaling problems in checkbox buttons, sliders, and property grid group headers. Fixed scaling bug in face and terrain panels Fixed scale factor being ignored in split panel orientation switching Eliminated a lot of extra paint events, might feel snappier now
  18. It looks like some weird paint event is invalidating the Vulkan window...
  19. Finalizing the location of program icon files. Disappearing viewport issue might be slightly better than the latest aggregation.
  20. It appears that my GUI system is painting on top of the viewport window when it draws to the underlying window. Not sure how that is possible, but it should be solvable.
  21. Yep, it will be documented here: https://www.ultraengine.com/learn/EditorScripting?lang=lua
  22. Posting this mostly for myself later... OBJS = Source/UltraEngineHub.o Source/Libraries/PluginSDK/GMFSDK.o Source/Libraries/PluginSDK/MemReader.o Source/Libraries/PluginSDK/MemWriter.o Source/Libraries/PluginSDK/TextureInfo.o Source/Libraries/PluginSDK/Utilities.o Source/Libraries/PluginSDK/half/half.o Source/Libraries/s3tc-dxt-decompressionr/s3tc.o Source/Libraries/stb_dxt/stb_dxt.o Source/Classes/Object.o Source/Classes/Math/Math_.o Source/Classes/Math/Vec2.o Source/Classes/Math/Vec3.o Source/Classes/Math/Vec4.o Source/Classes/Math/iVec2.o Source/Classes/Math/iVec3.o Source/Classes/Math/iVec4.o Source/Classes/String.o Source/Classes/WString.o Source/Classes/Display.o Source/Classes/IDSystem.o Source/Classes/JSON.o Source/Functions.o Source/Classes/GUI/Event.o Source/Classes/GUI/EventQueue.o Source/Classes/Language.o Source/Classes/FileSystem/Stream.o Source/Classes/FileSystem/BufferStream.o Source/Classes/FileSystem/FileSystemWatcher.o Source/Classes/GameEngine.o Source/Classes/Clock.o Source/Classes/Buffer.o Source/Classes/GUI/Interface.o Source/Classes/GUI/Widget.o Source/Classes/GUI/Panel.o Source/Classes/GUI/Slider.o Source/Classes/GUI/Label.o Source/Classes/GUI/Button.o Source/Classes/GUI/TextField.o Source/Classes/GUI/TreeView.o Source/Classes/GUI/TextArea.o Source/Classes/GUI/Tabber.o Source/Classes/GUI/ListBox.o Source/Classes/GUI/ProgressBar.o Source/Classes/GUI/ComboBox.o Source/Classes/GUI/Menu.o Source/Classes/Window/XWindow.o Source/Classes/Timer.o Source/Classes/Process.o Source/Classes/FileSystem/StreamBuffer.o Source/Classes/Multithreading/Condition.o Source/Classes/Multithreading/Thread.o Source/Classes/Multithreading/Mutex.o Source/Classes/Loaders/Loader.o Source/Classes/Loaders/DDSTextureLoader.o Source/Classes/Assets/Asset.o Source/Classes/Plugin.o Source/Classes/Assets/Font.o Source/Classes/FileSystem/Package.o Source/Classes/Graphics/Pixmap.o Source/Classes/Graphics/Icon.o Source/InvisionPower.o LIBOBJS = Source/Libraries/PluginSDK/GMFSDK.o Source/Libraries/PluginSDK/MemReader.o Source/Libraries/PluginSDK/MemWriter.o Source/Libraries/PluginSDK/TextureInfo.o Source/Libraries/PluginSDK/Utilities.o Source/Libraries/PluginSDK/half/half.o Source/Libraries/s3tc-dxt-decompressionr/s3tc.o Source/Libraries/stb_dxt/stb_dxt.o Source/Classes/Object.o Source/Classes/Math/Math_.o Source/Classes/Math/Vec2.o Source/Classes/Math/Vec3.o Source/Classes/Math/Vec4.o Source/Classes/Math/iVec2.o Source/Classes/Math/iVec3.o Source/Classes/Math/iVec4.o Source/Classes/String.o Source/Classes/WString.o Source/Classes/Display.o Source/Classes/IDSystem.o Source/Classes/JSON.o Source/Functions.o Source/Classes/GUI/Event.o Source/Classes/GUI/EventQueue.o Source/Classes/Language.o Source/Classes/FileSystem/Stream.o Source/Classes/FileSystem/BufferStream.o Source/Classes/FileSystem/FileSystemWatcher.o Source/Classes/GameEngine.o Source/Classes/Clock.o Source/Classes/Buffer.o Source/Classes/GUI/Interface.o Source/Classes/GUI/Widget.o Source/Classes/GUI/Panel.o Source/Classes/GUI/Slider.o Source/Classes/GUI/Label.o Source/Classes/GUI/Button.o Source/Classes/GUI/TextField.o Source/Classes/GUI/TreeView.o Source/Classes/GUI/TextArea.o Source/Classes/GUI/Tabber.o Source/Classes/GUI/ListBox.o Source/Classes/GUI/ProgressBar.o Source/Classes/GUI/ComboBox.o Source/Classes/GUI/Menu.o Source/Classes/Window/XWindow.o Source/Classes/Timer.o Source/Classes/Process.o Source/Classes/FileSystem/StreamBuffer.o Source/Classes/Multithreading/Thread.o Source/Classes/Multithreading/Mutex.o Source/Classes/Multithreading/Condition.o Source/Classes/Loaders/Loader.o Source/Classes/Loaders/DDSTextureLoader.o Source/Classes/Assets/Asset.o Source/Classes/Plugin.o Source/Classes/Assets/Font.o Source/Classes/FileSystem/Package.o Source/Classes/Graphics/Pixmap.o Source/Classes/Graphics/Icon.o OBJS2DKIT = $(OBJS) Source/Classes/Graphics/Framebuffer.o CC = g++ FLAGS = -w -c -Wall -I/usr/include/freetype2 -I/usr/include/fontconfig -ISource/ -D_ULTRA_APPKIT # Build executable LFLAGS = -no-pie -lX11 -lpthread -lXft -lXext -lXrender -lXcursor -ldl -lsteam_api -lcurl OUT = AppKit # Build library #LIBFLAGS = -w -Wall -lX11 -lpthread -lXft -lXext -lXrender -lXcursor -ldl -Wall -I/usr/include/freetype2 -I/usr/include/fontconfig -ISource/ -D_ULTRA_APPKIT LIBFLAGS = -w -Wall -I/usr/include/freetype2 -I/usr/include/fontconfig -ISource/ -D_ULTRA_APPKIT LIBOUT = AppKit.o AppKitLib: $(LIBOBJS) ld -relocatable $(LIBOBJS) -o Library/Linux/$(CONFIGNAME)/AppKit.o %.o: %.cpp $(CC) -c $(LIBFLAGS) $(CONFIGFLAGS) $< -o $@ AppKit: $(OBJS) $(CC) $(CONFIGFLAGS) $(OBJS) -o $(OUT) $(LFLAGS) %.o: %.cpp $(CC) $(FLAGS) $(CONFIGFLAGS) $< -o $@ 2DKit: $(OBJS) $(CC) $(CONFIGFLAGS) $(OBJS) $(OBJS2DKIT) -o $(OUT) $(LFLAGS) -D_ULTRA_2DKIT %.o: %.cpp $(CC) $(FLAGS) $(CONFIGFLAGS) $< -o $@ 2DKitLib: $(LIBOBJS) ld -relocatable $(LIBOBJS) $(OBJS2DKIT) -o Library/Linux/$(CONFIGNAME)/AppKit.o -D_ULTRA_2DKIT %.o: %.cpp $(CC) -c $(LIBFLAGS) $(CONFIGFLAGS) $< -o $@ clean: rm -f $(OBJS) $(OUT) Library/Linux/$(CONFIGNAME)/AppKit.o
×
×
  • Create New...