Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Leadwerks 5 Beta Update Available


Josh

323 views

An update is available that adds the new refraction effect. It's very easy to create a refractive transparent material:

auto mtl = CreateMaterial();
mtl->SetTransparent(true);
mtl->SetRefraction(0.02);

The default FPS example shows some nice refraction, with two overlapping layers of glass, with lighting on all layers. It looks great with some of @TWahl's PBR materials.

Image1.thumb.jpg.a795d933ac1ae71a7d74577596f37552.jpg

If you want to control the strength of the refraction effect on a per-pixel basis add an alpha channel to your normal map.

I've configured the launch.json for Visual Studio Code so that the current selected file is passed to the program in the command line. By default, game executable will run the "Scripts/Main.lua" file. If however, the current selected Lua file in the VSCode IDE is a file located in "Scripts/Examples" the executable will launch that one instead. This design allows you to quickly run a different script without overwriting Main.lua, but won't accidentally run a different script if you are working on something else.

examples.thumb.png.7d2d3762649019f17ca6e88013d4a85c.png

The whole integration with Visual Studio Code has gotten really nice.

Image3.thumb.jpg.37ddb78c2df7031f03e7d07eb5464db2.jpg

A new option "frameBufferColorFormat" is added to the Config/settings.json file to control the default color format for texture buffers .I have it set to 37 (VK_FORMAT_R8G8B8A8_UNORM) but you can set it to 91 (VK_R16G16B16A16_UNORM) for high-def color, but you probably won't see anything without an additional tone mapping post-processing effect.

Slow performance in the example game has been fixed. There are a few things going on here. Physics weren't actually the problem, it was the Lua debugger. The biggest problem was an empty Update() function that all the barrels had in their script. Now, this should not really be a problem, but I suspect the routine in vscode-debugger.lua that finds the matching chunk name is slow and can be optimized quite a lot. I did not want to make any additional changes to it right now, but in the future I think this can be further improved. But anyways, the FPS example will be nice and snappy now and runs normally.

Application shut down will be much faster now, as I did some work to clean up the way the engine cleans itself up upon termination.

  • Like 4

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Facebook Twitter Youtube Github Steam
×
×
  • Create New...