Jump to content

SpiderPig

Members
  • Posts

    2,346
  • Joined

  • Last visited

Everything posted by SpiderPig

  1. I have packed integers and floats into a texture to use in my shader. Information is packed into the texture by poking a buffer and then assigning that buffer to an RGBA texture. The following code extracts an integer from a texelFetch result in the fragment shader. It seems to work well. int BytesToInteger( in vec4 pixel ) { return ( int( ( pixel.w * 255.0f ) ) << 24 ) | ( int( ( pixel.z * 255.0f ) ) << 16 ) | ( int( ( pixel.y * 255.0f ) ) << 8 ) | int( ( pixel.x * 255.0f ) ); } However the same process does not work for floats and I'm sure there is a reason why but I can't figure it out. Any one know the answer? float BytesToFloat( in vec4 pixel ) { return float( ( int( ( pixel.w * 255.0f ) ) << 24 ) | ( int( ( pixel.z * 255.0f ) ) << 16 ) | ( int( ( pixel.y * 255.0f ) ) << 8 ) | int( ( pixel.x * 255.0f ) ) ); }
  2. I may not be correct but it might be this I need - material->render_material->id;
  3. I wonder if that will solve this issue or of there's something else at play...
  4. In this link the guy reckons it does actually work on 64 bit machines... just not on 32bit. To me that makes sense that a 32bit machine can't load something bigger than 4GB but I'm no expert. I did try loading a 7GB ".7z" file just to be sure but it didn't load. I don't know much about 7z, it uses LZMA or something? Maybe this SDK is what I need to make a 7z plugin. https://www.7-zip.org/sdk.html But I don't know, maybe libzip has a bug with loading over 4GB files...
  5. If this is a limitation if zlib then this might be an opportunity for a 7zip plugin.
  6. I've just confirmed ReadFile() returns nullptr too. The package seems to load okay - well there's no errors and it's not nullptr.
  7. I compressed it with 7zip, it's interesting that last comment saying it's not a zip? Even though it is... and I've compressed large files with window's default zip too and it worked above 4GB. Anyway, I can open the 7GB in windows explorer to search the files and I can extract from it. Don't know any other software besides 7zip to try it with...
  8. So 4GB was a limit in the past? So it should work now...?
  9. I've compressed 5,259 4096x4096 r16 heightmap files into a zip file. It's about 7GB of data. Using LoadDir("") to list the files at the root returns a size of 0 ONLY for this zip file. I used the code below on a zip file of 5,259 1024x1024 r16 heightmaps (1.2GB) and it worked fine. Pretty sure all the files have the exact same names in both zip files. It's just the map resolution that is different. I thought maybe LoadDir() or LoadPackage() doesn't like the large zip file? This is the snippet of code that handles the loading. if (extension == "zip") { auto package = LoadPackage(filepath); if (package != nullptr) { auto dir = package->LoadDir("");
  10. I've probably asked this before but just want to check... should a parent keep its child alive? This is the only way to delete an entity with a parent. entity->SetParent(nullptr); entity = nullptr;
  11. Been working on streaming voxel terrain and I'm pretty happy with the results so far. Nearly completed the streamer class. Each tile below is a 1024x1024 r16 heightmap. The area in view is about 50km2. The red tiles are tiles I've removed from the dataset because each pixel in those maps are zero (below the water surface). The test data set I made is a grid of 120x120 tiles which was 14,400 heightmaps files. However after removing all the tiles that were of zero height it became about 5,600 tiles. About 10GB all up. Should be able to compress that in a zip but will need to do more testing yet... was giving mixed results. Simple to set up. void CreateStreamingVoxelTerrain() { voxel_brush = CreateVoxelBrush(); voxel_brush->SetSurfaceFunction(CalculateTerrainSurface); voxel_world = CreateVoxelWorld(world, 1024, 16.0f, 7); voxel_world->EnableStreaming(true, "Maps\\Data"); voxel_world->SetDimensions(490000.0f, 1617.0f, 490000.0f); voxel_world->FlipY(); voxel_world->AddBrush(voxel_brush); voxel_world->AddObserver(camera); voxel_world->DrawVoxelObjectBounds(); voxel_world->DrawPatchBounds(); voxel_world->DrawBounds(); }
  12. Is it possible to use LoadDir() on a zip file and see what files are inside it? I want too loop through all the file names inside the zip file.
  13. You only see it when you click on the project tab. The title bar seems the best place for it because it's always visible and most other software's have that too.
  14. Working for me okay. I'm on the dev branch. Is that the latest?
  15. When ever I load a map the editors camera position is always back to zero. Shouldn't it be at the last place when the map was saved?
  16. I've noticed this too. It's been like this for a while, especially in DEBUG mode. I think it's because of the separate rendering thread. Pretty sure Josh said a fix is planned.
  17. I see the editor loads the last opened project and it would be nice to see it load the last opened map file associated with that project too.
  18. That's terrific thanks! I'll get into it this week.
  19. In the other 3 viewports did you try switching back and forth between 3D at least twice? That did it for me. Default -> 3D -> Front -> 3D = white.
  20. I just tried this too and get the same bug. I tried the other 3 viewports as well. Switching from their default view to another ortho view doesn't do it. Even switching from ortho to perspective doesn't do it. But if the viewport has been perspective at some point, switching to perspective again at some point makes the viewport white. Actually in my case black but then white when I click inside it. I have GTX 980 TI + Windows 10.
  21. Everything appeared to work when debugging. The treeview populated and I could browse the assets. I don't get the error now and the treeview populates but there are no assets showing and "Unknown exception" is printed in the editors console whenever I click a treeview item. Like before, debugging everything works as it should.
×
×
  • Create New...