Jump to content

klepto2

Developers
  • Posts

    929
  • Joined

  • Last visited

Everything posted by klepto2

  1. Confirmed unfortunatly the annoying "vcruntime140.dll not implemented" error is still there I tracked it down to the world->Render method. If i run the app without calling the render method the error is not visible. As a hint from stackoverflow the error code has some thing to do with PAGE_GUARDS: https://stackoverflow.com/a/2092136
  2. Hi, i was now able to test the last update after i was on vacation the last 2 weeks, but now i get some errors: First: As soon as I create a 3D Texture i get an assert here: > KernelBase.dll!00007fff6eaad662() Unbekannt Environment_d.exe!UltraEngine::RuntimeError(const UltraEngine::WString & s) Zeile 1715 C++ Environment_d.exe!UltraEngine::Assert(const bool condition) Zeile 1739 C++ Environment_d.exe!UltraRender::RenderTexture::SetPixels(std::shared_ptr<UltraEngine::Buffer> pixels, const int miplevel, const int face) Zeile 631 C++ [Externer Code] Environment_d.exe!UltraCore::ThreadManager::Update(const bool wait) Zeile 199 C++ Environment_d.exe!UltraRender::RenderingThreadManager::Update(const bool wait) Zeile 243 C++ Environment_d.exe!UltraCore::ThreadManager::EntryPoint(std::shared_ptr<UltraEngine::Object> o) Zeile 218 C++ Environment_d.exe!UltraEngine::Thread::thread_function(void * ptr) Zeile 31 C++ [Externer Code] This only seems to occur using 3D Textures when they are created like this: auto texture = CreateTexture(TEXTURE_3D, 256, 256, UltraEngine::TEXTURE_RGBA32, {}, 32, TextureFlags::TEXTURE_CLAMP_UVW | TextureFlags::TEXTURE_STORAGE, TextureFilter::TEXTUREFILTER_LINEAR, 0); Otherwise i always get this when running anything with the latest update (it runs, but extremely slow due to massive output): Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F4E00). Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F5000). Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F5600). Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F5E00). Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6000). Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA17F3C20). Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA17F3E20). Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6600). Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6800). Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6A00). Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6C00). Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA17E7E80). Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA17E7F00). Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA17E7F80). Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6DE4). Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6E64). Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6EE4). Ausnahme ausgelöst bei 0x00007FFF61A71421 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6F64). Ausnahme ausgelöst bei 0x00007FFF61A71421 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6F84). Visual Studio and everything is updated to the latest version.
  3. This is the sunset with a more artistic sun
  4. small progress: i rendered a dynamic cubemap succesfully. The images are taken from the nvidia nsight, as of the CreateTexture / SetEnvironemnt problem i can't display it in UltraEngine.
  5. Another small bug report: int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * displays[0]->scale, 720 * displays[0]->scale, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFOV(70); camera->SetPosition(0, 0, -3); //Create a light auto light = CreateLight(world, LIGHT_DIRECTIONAL); light->SetRotation(35, 45, 0); //Create a box auto box = CreateBox(world); //Entity component system auto actor = CreateActor(box); auto component = actor->AddComponent<Mover>(); component->rotation.y = 45; auto mtl = CreateMaterial(); mtl->SetRoughness(0.25); mtl->SetMetalness(0.5); box->SetMaterial(mtl); auto specmap = LoadTexture("Materials/Environment/Storm/specular.dds"); auto diffmap = LoadTexture("Materials/Environment/Storm/diffuse.dds"); // error INVALID_IMAGE_LAYOUT --> IMAGE_LAYOUT_UNDEFINED // auto envSky = CreateTexture(TEXTURE_CUBE, 256, 256, TEXTURE_RGBA, {}, 6, TEXTURE_DEFAULT , TEXTUREFILTER_LINEAR, 0); // THIS ONE SEEMS TO WORK, AT LEAST NO ERROR auto envSky = CreateTexture(TEXTURE_CUBE, 256, 256, TEXTURE_RGBA, {}, 6, TEXTURE_STORAGE, TEXTUREFILTER_LINEAR, 0); //EVEN WITH SET TO envSKY (created Cubemap) the Background is set to specmap instead. world->SetEnvironmentMap(envSky, ENVIRONMENTMAP_BACKGROUND); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE); bool sky = false; //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_SPACE)) { sky = !sky; world->SetEnvironmentMap(sky ? specmap : envSky, ENVIRONMENTMAP_BACKGROUND); world->SetEnvironmentMap(sky ? specmap : envSky, ENVIRONMENTMAP_SPECULAR); } world->Update(); world->Render(framebuffer); } return 0; }
  6. That looks really nice small question: How to create a cubemap with custom mipmaps? vector<shared_ptr<Pixmap>> mipchain; for (int i = 0; i < 6; i++) { iVec2 size = iVec2(256, 256); auto pixmap = CreatePixmap(size, TEXTURE_RGBA32); //mipchain.push_back(pixmap); while (size.x > 1) { size /= 2; pixmap = CreatePixmap(size, TEXTURE_RGBA32); mipchain.push_back(pixmap); } } auto envSky = CreateTexture(TEXTURE_CUBE, 256, 256, TEXTURE_RGBA32, mipchain , 6, TEXTURE_STORAGE | TEXTURE_MIPMAPS | TEXTURE_GENMIPMAPS , TEXTUREFILTER_LINEAR, 0); envSky->BuildMipmaps(); I always get "mipmap incorrect size" error. I have tried it with just a single mipchain (just for one face), multiple like in this sample and various size limits.
  7. Yes, to get the ComputeShaders (mainly for fft or the atmospheric scattering) was very tricky to implement in leadwerks, some missing things like native 3d textures. UltraEngine already has eveything we need, and the latest additions to hook into it the rendering pipeline and get easy access to some underlying types makes it much easier. On the other hand, you need to think a bit different than as in Leadwrks Engine. eg: Textures etc. are really only initialised once they are rendered. But thats nice, just needs a different thinking and makes it ultra fast.
  8. I know, but for the scattering i might need a bit more According to some papers i will split up the data into PushConstants and uniform buffers, where the push constants will contain the repeatedly changing data and the uniform buffer maybe the more static once. UniformBuffer was just the beginning, i will try to integrate as much buffer types as possible, this will give a lot more freedom.
  9. New Progress on the compute_front thx Jsoh for the fast updates struct ComputeTestData { float size; float padding1; float padding2; float padding3; Vec4 color; }; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetPosition(0, 0.1, -1); auto plg = LoadPlugin("Plugins/KTX2TextureLoader"); auto ball = CreateSphere(world, 0.5, 32); auto specmap = LoadTexture("Materials/Environment/Storm/specular.dds"); auto diffmap = LoadTexture("Materials/Environment/Storm/diffuse.dds"); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_BACKGROUND); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE); camera->Point(ball); //auto environment = initalize_atmosphere(world); auto targetTexture = CreateTexture(TextureType::TEXTURE_2D, 256, 256, TextureFormat::TEXTURE_RGBA32, {},1,TEXTURE_STORAGE); auto cshader = ComputeShader::Create("Shaders\\Environment\\simple_test.comp.spv"); ComputeTestData data; data.size = 50.0; data.color = Vec4(1.0, 1.0, 1.0, 1.0); int targetIndex = cshader->AddTargetImage(targetTexture); int bufferIndex = cshader->AddUniformBuffer(&data, sizeof(data), false); cshader->BeginDispatch(world, 16, 16, 1, true); auto mtl = CreateMaterial(); mtl->SetRoughness(0.25); mtl->SetMetalness(0.5); mtl->SetTexture(targetTexture, 0); ball->SetMaterial(mtl); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_A)) { data.size = 5.0; data.color = Vec4(1.0, 0.0,0.0, 1.0); cshader->Update(bufferIndex); cshader->BeginDispatch(world, 16, 16, 1, true); } if (window->KeyHit(KEY_S)) { data.size = 50.0; data.color = Vec4(0.0, 1.0, 0.0, 1.0); cshader->Update(bufferIndex); cshader->BeginDispatch(world, 16, 16, 1, true); } //camera->UpdateControls(window); world->Update(); world->Render(framebuffer); } return 0; } I can now add ImageTargets, Samplers and UniformBuffers and even update the uniforms on demand. The technique is that ad first just a barebone description of the layout is saved. The Dispatch command adds a Transfer Hook to the rendering pipeline and at the first time the concrete layout and shader descriptors are setup, also the writedescriptros are setup. Then if a buffer needs an update, this buffer is updated in the hook before the dispatch is send to the command buffer.
  10. Yeah, the last thing should work. You need to reset the interator to the next item when using erase in a loop. https://devptr.com/c-remove-elements-from-vector-in-loop-while-iterating/#:~:text=To delete single element from,start%2C end-1).
  11. repeated = true, works, but for one time hooks i get this: > Environment_d.exe!std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct UltraEngine::Object::Hook> > >::_Compat(class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct UltraEngine::Object::Hook> > > const &) Unbekannt File: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\vector Line: 186 Expression: vector iterators incompatible Also is it correct: in HOO_RENDER the cmdbuffer is in recording state, but in RENDER_TRANSFER it is not. So i need to handle that by myself?
  12. Now i have another problem: i have this exception in the rendering loop once i start using hooks: File: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\vector Line: 1587 Expression: vector erase iterator outside range
  13. Will try it. Updating now Update: Works
  14. I get this error in debug mode: Fehler LNK2019 Verweis auf nicht aufgelöstes externes Symbol "__std_find_trivial_4" in Funktion ""int * __cdecl __std_find_trivial<int,int>(int *,int *,int)" (??$__std_find_trivial@HH@@YAPEAHPEAH0H@Z)". Environment C:\Users\Shadow\Documents\Ultra Engine\Environment\UltraEngine_d.lib(Skeleton.obj) 1
  15. Hi Josh, for full access to the texture i need the VkSampler to also textures as input to a shader. Maybe like GetViewHandle you could add GetSamplerHandle?
  16. I use the LoadShaderModule from UltraEngine and the provided info from the Texture (GetViewHandle). Everything else is plain Vulkan, no middle layer involved. It is also currently very limited as i have only implemnted the Image binding, next is buffer binding and a lot of refactoring as vulkan is a pain to keep track of all possibilities.
  17. Again some progress auto targetTexture = CreateTexture(TextureType::TEXTURE_2D, 256, 256, TextureFormat::TEXTURE_RGBA32, {},1,TEXTURE_STORAGE); auto cshader = ComputeShader::Create("Shaders\\Environment\\checkerboard_gen.comp.spv"); cshader->GetPipelineBuilder() ->AddImageBinding(targetTexture); cshader->BeginDispatch(world, 16, 16, 1, true); auto mtl = CreateMaterial(); mtl->SetRoughness(0.25); mtl->SetMetalness(0.5); mtl->SetTexture(targetTexture, 0); this code actually works and results in this: a small generated checkerboard texture generated by a compute shader
  18. I personally like it more if I can handle all these things my self. So a removehook would be best. For everything else I first need to get everything working and let my mind fully transition from OpenGL to vulkan again ( which is hard after working with OpenGL for a long time ). If Someone understand this, it is you
  19. This looks good, what might be a good addition would be the ability to remove hooks. I am currently designing my pipeline to have one shot and recurring pipelines. The atmosphere just needs one shot calculations, when some parameters have changed. Later the more complex fft calculation for oceans needs recurring updates each frame.
  20. Will check it. I haven‘t looked at this for a while, but I think it will be just some adjustments.
  21. Thank you, this is the atmosphere renderin in Leadwerks: And I think with the terrain benefits of ultraengine ( real spherical ) this is awesome.
  22. Complete vulkan programing on my own, well besides some researches done previous. I am trying to implement https://github.com/ebruneton/precomputed_atmospheric_scattering Currently which was successfully in Leadwerks engine. This implementation can provide real-time luminance and reflection textures for pbr pipelines.
  23. Small Update on compute shaders: I have now a small partly working Implementation which looks like this: auto environment = initalize_atmosphere(world); auto cshader = ComputeShader::Create("Shaders\\Environment\\transmittance_gen.comp.spv"); cshader->AddImageBinding(texture1, 0, WRITE); cshader->AddImageBinding(texture2, 1, READ); cshader->AddBufferBinding(environment, 2,1 READ); cshader->BeginDispatch(world,16,16,1,true); The most magic is done in the BeginDispatch, this creates the proper LayoutInfo and Descriptorsets when not done yet, and registers a renderhook which then adds the proper commands to the cmdbuffer. I still need to figure some things out, but at least the compute shader is succesfully bound and can be seen in nsight :). I will later add a DirectDispatch method which can be executed withot the rendering buffer, but therefore I need create a new separate Queue, etc.. But first i will have a first running version with the BeginDispatch approach.
  24. Ok, i have now a setup where i can begin to start integrating the compute shaders (Textures are successfully created) and accessible. If i want to include my own ComputePipeline i need access to some more specific vulkan handles, eg: the vkDevice, maybe vkInstance etc. Maybe you can provide a struct containing all these in the Hook instead of just the Commandbuffer? Or is there another way to Dispatch a loaded ShaderModule in UltraEngine? I have searched the UltraRender namespace as well, but i can't access the infos needed to manually create the Pipeline. Any infos or ideas?
×
×
  • Create New...