Jump to content

klepto2

Developers
  • Posts

    855
  • Joined

  • Last visited

Everything posted by klepto2

  1. It is saving the dds file with the wrong mipmap count, but it will not load in ultraEngine, while other tools load it, but display a black screen.
  2. Ok, found the error. I generated to many mipmaps. BCH6 has a blocksize of 4 which i missed, which means the lowest mipmap size is also 4 and not 1. Thanks for the point in the right direction.
  3. The saved cubemap is black, the pixmaps in the mipchain passed to the save texture function are valid. They are saved correctly, when the pixmap save method is used. Just the provided way in the blog sample and the sample itself is not working. If you still need some data i will provide it later. The cubemap data is calculated in a computeshader and the result is mapped back to the host. For the later atmosphere shader I just need the calculations, but for the engine I thought I could provide a small tool which also saves the generated cubemaps. I know iblsampler, and I use some shader code from it.
  4. The reason why cubemaps are not shown in the asset browser is, that the pbr shaders don't support cubemaps as diffuse texture. You can try it yourself and create a material and try to assign a cubemap to the diffuse slot. In this case SaveTexture just saves black color instead of the actual pixel values. I know that it worked some time ago as i have tried the code mentioned in the blog before. Maybe Josh just hasn't applied some internal changes which were made lately. Btw: yes i tried them in the Editor as well
  5. the noise texture was ok, the other noise texture i use is closer to the original. The artifacts came from this line: p.x *= gl_FragCoord.x/buffersize.y; this: should have been: p.x *= buffersize.x/buffersize.y; this line calculates the aspect ratio and if you use gl_FragCoord.x it is dependend on the pixel position which leads to the artifacts you have seen.
  6. I am working on a small tool to generate the specular and diffuse maps based on an input cubemap: While the generation itself works flawlessly, I can't get the SaveTexture feature to work with cubemaps. I download the image data from the gpu and if i save the pixmaps (each face and mipmap) seperately this works. But with a mipchain i only get a black cube texture. (Tried it with various viewers, renderdoc, nvidia texture tools). Then i tried the sample you provided here: and followed the same workflow as you. The result is the same, the code in this blog also results in a black texture
  7. Try this: i have added the diffuse layer, so the background is visible. 1. I changed the noise texture to the one used by shadertoy (using other textures might lead to artifacts) 2. I corrected the aspect ratio calculation you had p.x*= gl_FragCoord.x / buffersize.y; where is should be p.x*= buffersize.x / buffersize.y; Effect.zip
  8. You can upload the pfx and textures here, and i can look at it if you want.
  9. yeah, that is what most users do with shadertoy shaders. But gpu noise is far too expansive to be used in realtime scenarios (espacially when it is a game or so) It is always better to use a noise texture than to calculate the noise with the various available noise methods for glsl. 1. Performance: noise calculation on the gpu is much (and i mean very much) slower than a simple texture lookup. 2. low end hardware: most noise mehtods have something like this: float hash( vec2 p ) { float h = dot(p,vec2(127.1,311.7)); return fract(sin(h)*43758.5453123); } but this will result in unexpected results on low end hardware (espacially integrated gfx)
  10. But i agree, with the proper background the rain would be visible without the need of muliplication.
  11. While this is true, it isn't needed in this case. The shader on shadertoy also just uses a black background, which might be what he currently wants. The blending with the actual background is not yet the problem. The problem is, that the calculated value for 'f' is just to low to be recognized in the output. a multiplication by 2.0 or 4.0 will move the rain into a more visible spectrum. Another problem might be the pfx lua script. This would be nice to see as well to figure out if the noise texture is correctly bound.
  12. Read the comment on shadertoy: change this line fragData0=vec4(col, 1.0 ); to fragData0=vec4(col * 4.0, 1.0 ); and you should be able to see the effect.
  13. One way is to use a post effect, I can't fully reply currently, but this is a starting point: DayNightEffect.zip You attach the pfx to your scene, and if you have a driectional light in the scene it will automatically find it and use the correct light vector.
  14. Maybe just simple: provide all 3 and just make a default setting in the editor. This way the user can choose which he prefers.
  15. Another option (which would be IMHO more convenient) would be to add Import and Eport menues. This way you can later support multiple map formats without breaking the original save and save as workflow. Load/Save/Save as -> only for UltraEngine files Import/Export -> reserved for plugins or fixed imports/exports in the engine.
  16. Also some of the objects are not exported correctly, some are scaled or positioned wrong.
  17. If you load a leadwerks map with a terrain (lets say the-zone.map) , resave it as a .ultra map and reload the saved ultra scene, then the terrain layers are there, but all shown as empty. I assume that might be as the materials for these layers are generated on the fly by the leadwerks map loader (you can see that, if you try to edit a layer material in the imported leadwerks map) and the new scene can't find the materials.
  18. If i load the 'The-Zone"-map the performance for navigating in the Perspective viewport is fast. But when i select the terrain and try to navigate, the controls begin to feel laggy. If i select any other element in the scene, the camera-navigation is smooth again.
  19. Currently if you add a component you have to right click on the group to remove the component. A better option might be to add a button on the right (with a big X ) to remove them. If you don't know that there is a context menu on the group to delete something the user might search a long time (which might be frustating).
  20. If a file is already attached to a dropdown and you try to change it via the Browse-menu, the OpenFile dialog opens at least 3 times. Even closing the dialog with cancel reopens it. After the 3rd time the selected file is loaded correctly.
  21. When i load a leadwerks map file, modify it (maybe also without modifiing it) and save it under the same name, it can't be reloaded.
  22. A small addition to the idea: the new Environment-Object should have an option to mark it as the default for the editor. So you can see the settings in the editor viewrange in the Perspective viewport should be dependent on the camera settings (maybe add an option to specify a camera to the rendering viewport)
  23. Just an idea: rename the Environment group in the root node to World-Settings and remove all settings which are actually belonging to the camera add a new Environment Object (which may be added initially by default, but where you can have multiple Environments in one scene) then there might be 2 options add the possibility to link one scene object to a previous defined object (like the add link to file in Visual studio or add the possibility to specify an existing Environment for each camera.
  24. Hi, i get this with the latest update as soon as i add any PostEffect or activate SSR on a camera: > ucrtbased.dll!00007ffece0e2fb5() Unbekannt ucrtbased.dll!00007ffece0e3153() Unbekannt ucrtbased.dll!00007ffece0fae2d() Unbekannt ucrtbased.dll!00007ffece0f9db0() Unbekannt ucrtbased.dll!00007ffece1deee9() Unbekannt ntdll.dll!00007fff9df1221f() Unbekannt ntdll.dll!00007fff9dec14b4() Unbekannt ntdll.dll!00007fff9df10d2e() Unbekannt KernelBase.dll!00007fff9bb6cf19() Unbekannt vcruntime140d.dll!00007fff4aa8b760() Unbekannt PfxTest_d.exe!UltraEngine::RuntimeError(class UltraEngine::WString const &) Unbekannt PfxTest_d.exe!UltraEngine::Assert(bool) Unbekannt PfxTest_d.exe!UltraEngine::Render::RenderTexture::Initialize(enum UltraEngine::TextureType,int,int,int,int,int,bool,int,enum UltraEngine::TextureFlags,int,int) Unbekannt PfxTest_d.exe!UltraEngine::Render::RenderBuffer::Initialize(int,int,int,int,int,bool,int,bool,int,int,bool) Unbekannt PfxTest_d.exe!UltraEngine::Render::RenderCamera::PrepareBuffers(class std::shared_ptr<class UltraEngine::Render::RenderContext>,class std::shared_ptr<class UltraEngine::Culling::CameraVisibilityList>) Unbekannt PfxTest_d.exe!UltraEngine::Render::RenderingThreadManager::Update(bool) Unbekannt PfxTest_d.exe!UltraEngine::Core::ThreadManager::EntryPoint(class std::shared_ptr<class UltraEngine::Object>) Unbekannt PfxTest_d.exe!UltraEngine::Thread::thread_function(void *) Unbekannt ucrtbased.dll!00007ffece103010() Unbekannt kernel32.dll!00007fff9dd87344() Unbekannt ntdll.dll!00007fff9dec26b1() Unbekannt Code: #include "UltraEngine.h" #include "Components/Motion/Mover.hpp" #include "Components/Player/CameraControls.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { RegisterComponent<Mover>(); RegisterComponent<CameraControls>(); //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->SetFov(70); camera->SetPosition(0, 0, -3); camera->SetSSR(true); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); //Create a box auto box = CreateBox(world); box->SetColor(0,0,1); //Entity component system auto component = box->AddComponent<Mover>(); component->rotationspeed.y = 45; //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; }
×
×
  • Create New...