Jump to content

klepto2

Developers
  • Posts

    929
  • Joined

  • Last visited

Everything posted by klepto2

  1. Urldownloadfile indeed Caches the downloaded files. To receive the latest version you need to call this: https://docs.microsoft.com/en-us/windows/win32/api/wininet/nf-wininet-deleteurlcacheentry prior to call download file.
  2. Hi, your blogs are very interesting to read, and I am looking forward to see the results I have 2 ideas regarding this post: 1. Maybe you could stabilize the movement if you make the cascades slightly bigger and move them in tiles instead on a per-pixel basis. It is not the same, but i have done this with my water mesh tiles and that has eliminated most artifacts like swimming etc. 2. with the voxel data it should be much easier to create something like a global distancefield , this would make it possible to calculate a lot of effects in shaders with nearly no additional cost. (e.g.: vector fields, water flow, directional waves, boids etc.) Looking forward for the progress.
  3. I don’t know if you already use it. But take a look at Nvidia nsight. https://developer.nvidia.com/nsight-visual-studio-edition you can fully debug OpenGL Vulkan or directx calls and even modify the shader code on the fly and check the registers and texture states. It was very useful for me to fix some issues with my atmospheric scattering shaders.
  4. The reason why most if not all 3d game engines do only support the basic texture maps is that the use of more texture maps indeed has a high impact on the overall performance, all the textures have to be sent to the GPU and depending on the GPU (which has a limited VRAM) it might need to do a lot of swapping between VRAM and ram. Also combing these textures and calculate the result on the fly needs a lot of GPU shader instructions which may lead into GPU bottlenecks as well. Why this might no issue for 'design' engines because you can use all the power to render the scene it is an issue for game engines as most users would expect a minimum of 30 if not 60 fps while running the game including GFX, AI and other stuff. Normally the texture maps you mentioned are baked into the diffuse, normal, roughness etc. maps before using them in the engine to lower the bandwidth cost for the GPU. but i agree, that from a design point of view these maps could be very handy. Maybe it would be a better idea, to add a workflow to the materials where you can add all of the desired maps slot, and the engine can bake the resulting textures itself in a preprocessing step. this way you could keep the 'low' cost renderpipeline but also get the flexibility of the different slots. This would come handy with some procedural texture generators.
  5. klepto2

    VXRT WIP

    You might consider to port this to the GPU using Computeshaders, i would assume, that you can reach a higher resolution with lower impact than calculating it on the cpu. Keep in mind that Computeshaders can execute parallel so you just need to wait for the last shader. https://github.com/bridgekat/vxrt
  6. I would extend the CreateSceneObject function with some kind of key or type element. And also methods to get,filter,iterate and modify all Scene objects of a certain type. This would make something like this possible: box = CreateBox(editor.world) box.name = "box"..(GetSceneCountForType("BoxCreator") + 1) o = CreateSceneObject(box,"BoxCreator") --make editor recognize the entity and add it to the scene browser with a specified key or type o:SetSelected(true)
  7. klepto2

    volclouds-first_take

    A first take on volumetrix clouds
  8. View this video Description A test which shows what can be achieved with computeshader in Leadwerks. This uses dynamic precomputed 3D Texture lookups based on https://github.com/ebruneton/precomputed_atmospheric_scattering using compute shaders converted to Leadwerks..
  9. klepto2

    OceanProgress

    No, this is Leadwerks engine. But it is more or less a preparation for ultraengine.
  10. klepto2

    OceanProgress

    A picture showing some progress: - Realtime shoreline detection with flow direction - from air to water effect based on camera level - underwater
  11. View this video Description A WIP Ocean system for Leadwerks 4 and later for UltraEngine. Features: FFT - Waves (calculated with compute shaders), Reflection, Refraction, Compatibility with the whole lighting system of Leadwerks. You can see that the ocean is affected by multiple light sources. [Edit:] Posted a video about the air to water transition, in the upper left you can also see a current prototype of a realtime shore direction shader, which creates a flowmap for the shore foams and later waves.
  12. klepto2

    stormy ocean

    Ocean-Rendering with stormy conditions using: Compute-Shaders, FFT and a custom LOD system (also having a projected grid version working)
  13. yes, and without shift it just moves the caret to first or last position
  14. Works! even with integrated gfx
  15. In the documentation, the Window::SetPointer method is not documented. Also, some available pointer values are not working under windows. window->SetPointer(MousePointer::POINTER_SIZENESW);
  16. You can also look into this: https://github.com/ButchDean/game-ai-by-example this repo contains the source of the book Game AI by Example by Mat Buckland and gives a lot of ideas and starting points for effective AI programming.
  17. Hi, I finally managed to build a first release candidate for a SyntaxEditor-Widget. The Widget is using the famous Scintilla TextEditor-Component under the hood and wraps the control into a UAK-Widget. At this point i only provide binaries (includes and libraries) but i am currently preparing to release the source as well. The source itself is semi-autogenerated with a manual created body and a tool which generates the main part of the Scintilla-Component based of so called iFace files maintained by the Scintilla author (these files contains the definitions of each enum or function you can use with Scintilla). Downloads: Demo (Small sample): Demo.zip Libraries and Headers:SyntaxEditor_libinc.zip To use the new widget you need to copy the content of the zip into your project and add the "include" directory to "Additional Include Directories" and add the the path to the Library to "Additional Library Directories" (for Release and Debug configurations). Finally you need to add the needed lib files to "Additional Dependecies": Imm32.lib SyntaxWidget.lib Lexilla.lib Scintilla.lib here is screenshot of the small demo app: and the code: #include "UltraEngine.h" #include "SyntaxWidget.h" #include "ScintillaLexer.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { #ifdef _WIN64 auto plugin = LoadPlugin("Plugins/FITextureLoader.*"); #else auto plugin = LoadPlugin("Plugins (x86)/FITextureLoader.*"); #endif if (plugin == NULL) { Print("Failed to load FreeImage plugin."); return 1; } //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 800, 600, displays[0], WINDOW_TITLEBAR | WINDOW_RESIZABLE | WINDOW_CENTER); //Create User Interface auto ui = CreateInterface(window); //Create widget auto sz = ui->root->GetSize(); auto toggleVisibility = CreateButton("Visible", 10, 10, 80, 20, ui->root, ButtonStyle::BUTTON_TOGGLE); toggleVisibility->SetState(WidgetState::WIDGETSTATE_SELECTED); auto container = CreatePanel(5, 40, sz.x - 10, sz.y - 45, ui->root, PanelStyle::PANEL_BORDER); sz = container->ClientSize(); container->SetLayout(1, 1, 1, 1); auto syntaxEditor = CreateSyntaxEditor(5, 5, sz.x - 10, sz.y - 10, container); syntaxEditor->SetLayout(1, 1, 1, 1); syntaxEditor->SetFoldFlags(FoldFlag::LineAfterContracted | FoldFlag::LineBeforeContracted); // 16 Draw line below if not expanded //auto lualexer = CreateLexer("lua"); // syntaxEditor->SetILexer(lualexer); auto lexer = CreateLuaLexer(syntaxEditor); syntaxEditor->SetKeyWords(0, "and break do else elseif end for function if in local nil not or repeat return then until while"); syntaxEditor->SetKeyWords(1, "print require"); syntaxEditor->SetProperty("fold", "1"); syntaxEditor->SetProperty("fold.compact", "0"); syntaxEditor->SetAutomaticFold(AutomaticFold::Change | AutomaticFold::Click | AutomaticFold::Show); syntaxEditor->SetMarginSensitiveN(2, 1); auto luasource = R"V0G0N(require("INC_Class.lua") --========================== = cAnimal = setclass("Animal") function cAnimal.methods:init(action, cutename) self.superaction = action self.supercutename = cutename end --========================== cTiger = setclass("Tiger", cAnimal) function cTiger.methods:init(cutename) self : init_super("HUNT (Tiger)", "Zoo Animal (Tiger)") self.action = "ROAR FOR ME!!" self.cutename = cutename function test() end end --========================== Tiger1 = cAnimal:new("HUNT", "Zoo Animal") Tiger2 = cTiger : new("Mr Grumpy") Tiger3 = cTiger : new("Mr Hungry") print("CLASSNAME FOR TIGER1 = ", Tiger1:classname()) print("CLASSNAME FOR TIGER2 = ", Tiger2:classname()) print("CLASSNAME FOR TIGER3 = ", Tiger3:classname()) print("===============") print("SUPER ACTION", Tiger1.superaction) print("SUPER CUTENAME", Tiger1.supercutename) print("ACTION ", Tiger1.action) print("CUTENAME", Tiger1.cutename) print("===============") print("SUPER ACTION", Tiger2.superaction) print("SUPER CUTENAME", Tiger2.supercutename) print("ACTION ", Tiger2.action) print("CUTENAME", Tiger2.cutename) print("===============") print("SUPER ACTION", Tiger3.superaction) print("SUPER CUTENAME", Tiger3.supercutename) print("ACTION ", Tiger3.action) print("CUTENAME", Tiger3.cutename))V0G0N"; String s = luasource; syntaxEditor->SetText(s.c_str()); syntaxEditor->StyleSetBack(STYLE_DEFAULT, RGB(syntaxEditor->color[WIDGETCOLOR_BACKGROUND].r * 255, syntaxEditor->color[WIDGETCOLOR_BACKGROUND].g * 255, syntaxEditor->color[WIDGETCOLOR_BACKGROUND].b * 255)); syntaxEditor->StyleSetFore(STYLE_DEFAULT, RGB(syntaxEditor->color[WIDGETCOLOR_FOREGROUND].r * 255, syntaxEditor->color[WIDGETCOLOR_FOREGROUND].g * 255, syntaxEditor->color[WIDGETCOLOR_FOREGROUND].b * 255)); syntaxEditor->StyleSetFont(STYLE_DEFAULT, "Consolas"); syntaxEditor->StyleSetSize(STYLE_DEFAULT, 11); syntaxEditor->StyleClearAll(); syntaxEditor->SetCaretFore(RGB(syntaxEditor->color[WIDGETCOLOR_FOREGROUND].r * 255, syntaxEditor->color[WIDGETCOLOR_FOREGROUND].g * 255, syntaxEditor->color[WIDGETCOLOR_FOREGROUND].b * 255)); syntaxEditor->SetFoldMarginHiColour(true, RGB(syntaxEditor->color[WIDGETCOLOR_HIGHLIGHT].r * 255, syntaxEditor->color[WIDGETCOLOR_HIGHLIGHT].g * 255, syntaxEditor->color[WIDGETCOLOR_HIGHLIGHT].b * 255)); syntaxEditor->SetFoldMarginColour(true, RGB(syntaxEditor->color[WIDGETCOLOR_HIGHLIGHT].r * 255, syntaxEditor->color[WIDGETCOLOR_HIGHLIGHT].g * 255, syntaxEditor->color[WIDGETCOLOR_HIGHLIGHT].b * 255)); auto textWidth = syntaxEditor->TextWidth(STYLE_LINENUMBER, "_99999"); syntaxEditor->SetMargins(5); syntaxEditor->SetMarginTypeN(0, MarginType::Number); syntaxEditor->SetMarginWidthN(0, textWidth); syntaxEditor->SetMarginTypeN(2, MarginType::Symbol); syntaxEditor->SetMarginMaskN(2, SC_MASK_FOLDERS); syntaxEditor->SetMarginWidthN(2, 16); syntaxEditor->SetMarginLeft(2); syntaxEditor->SetMarginRight(2); syntaxEditor->MarkerDefine(SC_MARKNUM_FOLDER, MarkerSymbol::BoxPlus); syntaxEditor->MarkerDefine(SC_MARKNUM_FOLDEROPEN, MarkerSymbol::BoxMinus); syntaxEditor->MarkerDefine(SC_MARKNUM_FOLDEREND, MarkerSymbol::BoxPlus); syntaxEditor->MarkerDefine(SC_MARKNUM_FOLDERMIDTAIL, MarkerSymbol::TCorner); syntaxEditor->MarkerDefine(SC_MARKNUM_FOLDEROPENMID, MarkerSymbol::BoxMinusConnected); syntaxEditor->MarkerDefine(SC_MARKNUM_FOLDERSUB, MarkerSymbol::VLine); syntaxEditor->MarkerDefine(SC_MARKNUM_FOLDERTAIL, MarkerSymbol::LCornerCurve); for (int i = 25; i <= 31; i++) { syntaxEditor->MarkerSetFore(i, RGB(syntaxEditor->color[WIDGETCOLOR_BACKGROUND].r * 255, syntaxEditor->color[WIDGETCOLOR_BACKGROUND].g * 255, syntaxEditor->color[WIDGETCOLOR_BACKGROUND].b * 255)); syntaxEditor->MarkerSetBack(i, RGB(215, 221, 232)); } syntaxEditor->StyleSetFore(LuaLexer::WORD, RGB(150, 190, 177)); syntaxEditor->StyleSetFore(LuaLexer::WORD2, RGB(220, 220, 170)); syntaxEditor->StyleSetFore(LuaLexer::COMMENT, RGB(87, 160, 61)); syntaxEditor->StyleSetFore(LuaLexer::COMMENTLINE, RGB(87, 160, 61)); syntaxEditor->StyleSetFore(LuaLexer::COMMENTDOC, RGB(87, 160, 61)); syntaxEditor->StyleSetFore(LuaLexer::CHARACTER, RGB(87, 160, 61)); syntaxEditor->StyleSetFore(LuaLexer::STRING, RGB(214, 151, 108)); syntaxEditor->StyleSetBack(STYLE_LINENUMBER, RGB(syntaxEditor->color[WIDGETCOLOR_BACKGROUND].r * 255, syntaxEditor->color[WIDGETCOLOR_BACKGROUND].g * 255, syntaxEditor->color[WIDGETCOLOR_BACKGROUND].b * 255)); syntaxEditor->StyleSetFore(STYLE_LINENUMBER, RGB(43, 145, 175)); syntaxEditor->SetElementColour(Element::ListBack, RGB(syntaxEditor->color[WIDGETCOLOR_BACKGROUND].r * 255, syntaxEditor->color[WIDGETCOLOR_BACKGROUND].g * 255, syntaxEditor->color[WIDGETCOLOR_BACKGROUND].b * 255)); syntaxEditor->SetElementColour(Element::List, RGB(syntaxEditor->color[WIDGETCOLOR_FOREGROUND].r * 255, syntaxEditor->color[WIDGETCOLOR_FOREGROUND].g * 255, syntaxEditor->color[WIDGETCOLOR_FOREGROUND].b * 255)); syntaxEditor->SetElementColour(Element::ListSelected, RGB(syntaxEditor->color[WIDGETCOLOR_SELECTEDTEXT].r * 255, syntaxEditor->color[WIDGETCOLOR_SELECTEDTEXT].g * 255, syntaxEditor->color[WIDGETCOLOR_SELECTEDTEXT].b * 255)); syntaxEditor->SetElementColour(Element::ListSelectedBack, RGB(syntaxEditor->color[WIDGETCOLOR_SELECTION].r * 255, syntaxEditor->color[WIDGETCOLOR_SELECTION].g * 255, syntaxEditor->color[WIDGETCOLOR_SELECTION].b * 255)); auto pixmap = LoadPixmap("Resources/class.png")->Resize(16, 16); syntaxEditor->RGBAImageSetWidth(pixmap->size.x); syntaxEditor->RGBAImageSetHeight(pixmap->size.y); syntaxEditor->RegisterRGBAImage(1, pixmap->pixels->Data()); while (true) { const Event ev = WaitEvent(); if (ev.id == SyntaxEditor::EVENT_CHARADDED) { auto notification = static_cast<TextEditorNotification*>(ev.extra.get()); if (notification->ch == '.' && !syntaxEditor->AutoCActive()) { syntaxEditor->AutoCShow(0, "Entity?1 Window?1 Hello World"); } } switch (ev.id) { case EVENT_WIDGETACTION: if (ev.source == toggleVisibility) { if (toggleVisibility->GetState() == WidgetState::WIDGETSTATE_SELECTED) { toggleVisibility->SetText("Visible"); syntaxEditor->Show(); } else { toggleVisibility->SetText("Hidden"); syntaxEditor->Hide(); } } break; case EVENT_WIDGETSELECT: break; case EVENT_QUIT: case EVENT_WINDOWCLOSE: return 0; break; default: break; } } return 0; } ToDo: Publish the source add helper to apply UAK based theming move some Scintilla-Types to UAK-Types (e.g.: Colour to iVec4) I hope you enjoy the release and i look forward for any suggestions and feedback is very welcome.
  18. Ah, ok. Missed that you can parent a window to another window. Thanks.
  19. Don't know if this is needed for other os than windows but if you create a child window it might be useful to not show it in the taskbar like for tooltips or like UAK does it with the combobox. A hack to achieve this is doing the following: _window = CreateWindow("", 0, 0, 0, 0, displays[0], WindowStyles::WINDOW_HIDDEN | WindowStyles::WINDOW_CHILD); SetWindowLongA(_window->GetHandle(), GWL_EXSTYLE, (GetWindowLong(_window->GetHandle(), GWL_EXSTYLE) | WS_EX_TOOLWINDOW) & ~WS_EX_APPWINDOW);
×
×
  • Create New...