Jump to content
  • entries
    942
  • comments
    5,896
  • views
    872,925

About this blog

Learn about game development technology

Entries in this blog

Bindless Textures

The clustered forward renderer in Leadwerks 5 / Turbo Game Engine required me to implement a texture array to store all shadow maps in. Since all shadow maps are packed into a single 3D texture, the shader can access all required textures outside of the number of available texture units, which only gives 16 guaranteed slots. I realized I could use this same technique to pack all scene textures into a few arrays and completely eliminate the overhead of binding different textures. In order to

Josh

Josh

Multiple shaders in Vulkan

I have it worked out now where the new engine will handle multiple shaders. The renderer groups meshes (renamed from "surfaces" in Leadwerks) by shader. A single draw call renders many batches of instances, with different materials applied. It's a very advanced and complex system, so something that was simple before, changing the shader, now requires a lot of code to make work! You can see here the barbed wire is using an alpha-discard shader that removes pixels while the rest of the scene uses

Josh

Josh

Ultra Engine (Leadwerks 5) beta updated with strip lights and texture scrolling

A new update is available for beta subscribers. What's new Added support for strip lights. To create these just call CreateLight(world, LIGHT_STRIP). The entity scale on the Z axis will determine the length of the line, and the outer range will determine the radius in which light shows. Added new properties to the JSON material scheme. "textureScroll" is a float value that can animate a texture to make it smoothly move. "textureScrollRotation" is an angle to control which dir

Josh

Josh

Vulkan renderer updated with shadow maps

Shadow maps are now supported in the new Vulkan renderer, for point, spot, and box lights! Our new forward renderer eliminates all the problems that deferred renderers have with transparency, so shadows and lighting works great with transparent surfaces. Transparent objects even receive lighting from their back face automatically! There is some shadow acne, which I am not going to leave alone right now because I want to try some ideas to eliminate it completely, so you neve

Josh

Josh

Shader Families

I started to implement quads for tessellation, and at that point the shader system reached the point of being unmanageable. Rendering an object to a shadow map and to a color buffer are two different processes that require two different shaders. Turbo introduces an early Z-pass which can use another shader, and if variance shadow maps are not in use this can be a different shader from the shadow shader. Rendering with tessellation requires another set of shaders, with one different set for each

Josh

Josh

Multi-monitor Support

New commands in Turbo Engine will add better support for multiple monitors. The new Display class lets you iterate through all your monitors: for (int n = 0; n < CountDisplays(); ++n) { auto display = GetDisplay(n); Print(display->GetPosition()); //monitor XY coordinates Print(display->GetSize()); //monitor size Print(display->GetScale()); //DPI scaling } The CreateWindow() function now takes a parameter for the monitor to create the window on / relative to. auto displ

Josh

Josh

GLTF Loading Speed

There are two aspects of GLTF files that have non-optimal loading speed. First, the vertex data is not stored in the same exact layout and format as our vertex structure. I found the difference in performance for this was pretty small, even for large models, so I was willing to let it go. Tangents can take a bit longer to build, but those are usually included in the model if they are needed. The second issue is the triangle tree structure which is used for raycasting (the pick commands). I

Josh

Josh

GUI Resolution Independence 2

Here are some screenshots showing more complex interface items scaled at different resolutions. First, here is the interface at 100% scaling: And here is the same interface at the same screen resolution, with the DPI scaling turned up to 150%: The code to control this is sort of complex, and I don't care. GUI resolution independence is a complicated thing, so the goal should be to create a system that does what it is supposed to do reliably, not to make complicated things s

Josh

Josh

Leadwerks 5 beta update

An update is available for Leadwerks Game Engine 5 beta. The GUI system is now working with support for the following items: Panel Button Tabber Label Hyperlink Text field (editable, single line) Text area (multiline, read-only, allows text selection) The GUI scripts use a system of "blocks". You can add a solid rectangle, a wire rectangle, (both support rounded corners) or a text block. The drawing hierarchy is not yet respected, so

Josh

Josh

2D Drawing to Texture

I have been working on 2D rendering off and on since October. Why am I putting so much effort into something that was fairly simple in Leadwerks 4? I have been designing a system in anticipation of some features I want to see in the GUI, namely VR support and in-game 3D user interfaces. These are both accomplished with 2D drawing performed on a texture. Our system of sprite layers, cameras, and sprites was necessary in order to provide enough control to accomplish this. I now have 2D drawin

Josh

Josh

Particle Physics

I made some changes to the design of the particle system. I am less concerned with the exact behavior of particles as they move around and move interested right now in building a system with good performance and deep physics interactions. Although I want particle behavior to be customizable, I don't think scripts are the right tool for the job. C++ plugins are better suited for this for two reasons. C++ is much faster, and particles are a system that will make heavy use of that. L

Josh

Josh

Basis Universal Texture Support

Last year Google and Binomial LLC partnered to release the Basic Universal library as open-source. This library is the successor to Crunch. Both these libraries are like OGG compression for textures. They compress data very well into small file sizes, but once loaded the data takes the same space in memory as it normally does. The benefit is that it can reduce the size of your game files. Crunch only supports DXT compression, but the newer Basis library supports modern compression formats like B

Josh

Josh

Ultra App Kit beta updated with DPI scaling support

An update for Ultra App Kit beta on Steam is now available. This finishes the user interface scaling to support HD, 4K, 8K, and other resolutions. My original plan was to force an application restart if the scale setting was changed, but I found a way to dynamically resize the interface in a manner that gives natural results, so it now supports dynamic rescaling. That is, if the user changes the Windows DPI setting, or if a window is dragged to a monitor with a different DPI setting, the applica

Josh

Josh in Articles

Finished Direct Lighting Step

While seeking a way to increase performance of octree ray traversal, I came across a lot of references to this paper: http://wscg.zcu.cz/wscg2000/Papers_2000/X31.pdf Funnily enough, the first page of the paper perfectly describes my first two attempted algorithms. I started with a nearest neighbor approach and then implemented a top-down recursive design: GLSL doesn't support recursive function calls, so I had to create a function that walks up and down the octree hierarchy with

Josh

Josh in Articles

Sparse Voxel Octree Downsampling

I've moved on to one of the final steps for voxel cone step tracing, which is downsampling the lit voxels in a way that approximates a large area of rays being cast. You can read more about the details of this technique here. This artifact looks like a mirror that is sunken below the surface of some kind of frame. It was appearing because the mesh surface was inside the voxel, and neighboring voxels were being intersected. The solution was to move the ray starting point out of the voxel the

Josh

Josh in Articles

Finalizing Direct Lighting

I have not used the engine outside the editor in a while, but I needed to for performance testing, so now I am back to real-time rendering. During the development of the GI system I broke most of the light types, so I had to spend a couple of days getting those to work again. While doing this, I decided to resolve some longstanding issues I have put off. First, the PBR lighting will use a default gradient in place of the skybox, if no reflection map is set for the world. This is based off t

Josh

Josh in Articles

XBox

Last week I was researching the XBox and PS3 platforms. An XBox version of Leadwerks is technically feasible, and though the cost is considerable, it's not a barrier we can't cross. However, obtaining the development license from Microsoft will be much harder. Basically, they are unlikely to sell a development license until this engine has gained more users and had a couple of commercial games released. So we'll just keep improving and building momentum, with the eventual goal of expanding to th

Josh

Josh

Steam Hardware Survey Results

New Steam hardware survey results are available: http://store.steampowered.com/hwsurvey   As of October 2009, 80.79% machines surveyed can run Leadwerks Engine.

Josh

Josh

12-18-2009

This is a good idea to keep in mind, especially with something like software development:   "Don't judge each day by the harvest you reap but by the seeds that you plant." -Robert Louis Stevenson

Josh

Josh

Blog Bug Fixed

This should be working now. Looks like Y2K struck ten years late.

Josh

Josh

GEForce 470 and 480 specs released

480 stream processors on a single card. http://blogs.zdnet.com/gadgetreviews/?p=13422 http://www.hexus.net/content/item.php?item=23088   Thanks to CarlB of FoxConn for tipping me off on this.

Josh

Josh

GDC Prepping

We're very busy this week, doing a lot of things that are out of the ordinary for us.   Leadwerks Software will be at booth #938 at GDC 2013 in San Francisco March 27-29. Come by our booth if you're in the neighborhood, play with the full software, watch our demo reel, and get a look at the world's first...well, you'll have to come see it for yourself.   If we get a chance, we'll stream some video from the event.   Here's our staging area.   Following the GDC, Chris will be focusing o

Josh

Josh

Friday

My little precompiler is going well. It creates makefiles and can split a build up across multiple files. I am working out the interface with external libraries. Here's an example program: Print "Hello World!" And here's the code it outputs and compiles: #include "Hello World.h" using namespace codewerks; //============================================= // Main Loop //============================================= int main(int argc, char* argv[]) { Print(std::string("Hello World!"));

Josh

Josh

Something Old, Something New

The new CSG editor is coming along nicely. Yesterday I implemented CSG rotation and skewing, and today I got object center and edge selection working. 3D World Studio uses GL_SELECT mode to handle picking in orthographic viewports, but this stopped being supported in ATI drivers a few years ago! I implemented a CPU math routine for picking brush edges. In orthographics viewports, brushes can be selected by clicking their center or any edge, while models only use the center for selection. (T

Josh

Josh

×
×
  • Create New...