• Content count

  • Joined

  • Last visited

Community Reputation

759 Good

About sirpalee

  • Rank

Personal Information


  • Twitter
  • Github
  • Steam
  1. Amazon Puts Lumberyard on GitHub

    Haha, it happens to everybody. It's a bit late. A bunch of people already forked the repository, and those are still floating around.
  2. Nobody Wants A Cybergod?

    What is basically based on the first few weeks of a physics major. Simple integration, and Newtonian physics in a simple form. Lots of the games today do significantly more complex things. It's not plagiarizing, it's just implementing a simple principle in a way superior form.
  3. IDEs for python?

  4. Path tracing benchmark

      look at the chart above. it is the total runtime for camera rays + 64 random diffuse rays. more than normally used in realtime pt. video, paper etc. are on the way...      Well, let's do some math. Coherent rays doesn't matter for real-life applications, so I'm skipping the 2.5 billion rays / s benchmark. Tho, 1 rays + 64 secondary rays with 2.5 billion leads to 18 fps @ 1080p with primary and secondary sampling alone. No texture sampling, no shader graph execution.   IMHO, only the san miguel scene matters with incoherent rays, everything else is too simple compared to an average game. That's 100M rays/s tops, at 60 fps@1080p, that's 0.8 rays / pixel. Even with temporal anti-aliasing, that's not enough for anything. Besides this, shader execution not only breaks any of your hope for batching, but also is going to be more costly than raytracing itself. In raytracers, tracing rays is usually the cheaper operation, compared to the execution of a shader graph. So let's say, that' halves your ray budget, going down to 0.4 rays/pixel. You also want to do game logic, rebuild bvh for animation, physics etc... Another halving. So we are down to 0.2 rays/pixel on a 5k GPU.
  5. Linked list adventure

      Before you joined the topic, nobody was talking about procedural vs OOP. Our main focus was, to convince the OP to avoid zero initialization and to chose better data structures for his problems. (mainly talking about how bad are linked lists in many cases) STL classes have none of the indirection your design might have had, every function and algorithm is chosen at compile time. (well, that's the design philosophy of the whole STL / modern c++, don't pay for anything you don't have to)
  6. Linked list adventure

    I checked your code, and compiled it on linux... (using c++11 chrono classes) You are using STL classes incorrectly. For example. This int *arr = (int *)calloc(sizeof(int), ARR_SIZE); for (int i = 0; i < ARR_SIZE; i++) { arr[i] = rand(); } Is not equal to   std::vector<int> list(ARR_SIZE); for (int i = 0; i < ARR_SIZE; i++) { list.push_back(rand()); } You'll get two completely different end results. The first one allocates an array, then overwrites the elements. The second one is allocating an array, then expanding the array with new elements. A better comparison is. std::vector<int> list(ARR_SIZE); for (int i = 0; i < ARR_SIZE; i++) { list[i] = rand(); } Also, were you compiling in release mode? As said earlier, in debug mode the STL contains extra checks, which is missing from your code. This is what I meant earlier by C++ code in comparisons usually doing more than the C code.
  7. +1 Vulkan is a separate product from OpenGL. Totally different philosophy.
  8. Linked list adventure

    That's not true. I saw production code where people happily used STL containers. They might have rolled out their own allocators, but the flexibility of STL allows you to do that. STL containers are fast in most cases if you use them properly. For example, I'm using std::vector often, and it works perfectly. There are slowdowns in debug mode (of course), but that doesn't concern me. Also, there are many cases where STL or C++ templated approach is faster than C. In other cases, it'll be as fast as C as long as you are doing the same thing. Many comparisons are usually incorrect, because the C++ implementation is doing more than the C does. The behaviors of the containers are well documented and are deterministic. There might be small differences between compilers, but nothing you have to worry about too much. Yes, you can have total control by creating your own allocator. STL errors can be hard to read at first glance, but after a while you'll easily understand them. Clang even improves this further on. (MSVC will move to a clang based backend in the future btw) It potentially breaks any non trivial class / struct, not just STL containers. You should never zero initialize anything but the simplest structs.
  9. Linked list adventure

    If you are using VC++, you should take a look at EASTL. They offer high-performance containers, that are also flexible.   The right choice of the container depends on many factors. How often are you inserting elements, if you need sorted lists, how many elements are you going to use, etc... In a pretty general case, vectors behave better than lists, because of the more coherent memory access patterns, even up to relatively high member counts.
  10. Advertising Your Game

  11. OpenGL Vulkan programming guide

    I have it. It's more of a reference, than a well explained tutorial. Also, you need gpu programming experience to fully understand the book. As a reference and a quick jump to vulkan's world for experienced gpu coders, it is an awesome material.
  12. Vulkan vulkan and instanceindex

    1, no, you don't have to remap all the buffer. You can just update the parts that have changed. Also, don't forget, you have to align your data properly. So be careful with single byte reads. 2, what is the question here? 3, use UBOs. Less limitations on size, and less code is spent on unpacking data. But, as always, benchmark it yourself. There might be differences between different architectures, and you might have to maintain both approaches.
  13. Dynamic Uniform Buffers (Solved)

    Would you mind extending your post with the actual solution, or at least a quick explanation about the issue? It's great you solved the problem by yourself, but with a solution the post would more useful for other people, who stumble upon this from a google search.
  14. Compute Threads

      That's only true for one (or a few) specific hardware generation. You have to check the execution units count per compute unit per gpu type. There is a high amount of variance across different generations.   For example, when NVidia rolled out Kepler, they suddenly increased the simd count of the execution unit to 192, increasing the effectiveness of typical game shaders, but severely crippling the generic, compute workloads. That's why you had lots of people sticking to 580s when doing computing, even if the 680 series were out.