Jump to content

Exposing of Framework buffers to the lua interface


klepto2
 Share

Recommended Posts

Hi,

 

how about exposing the various buffers from the Framework to lua? I was thinking about this feature last evening while porting my scattering code (bmx) to lua and checking out shadmars ocean shader (which is really awesome).

 

What would be the benefit of this feature:

- scripts and shader built outside of the framework may access these buffers

- different shaders can work together (eg: currently shadmar uses a cubemap to simulate the reflection, this breaks a working combination of mine (scattering shader) and the ocean shader.

 

What may solve this:

- Expose the different buffers to lua

- Expose functions which can produce reflections independent from the framework water

 

I don't know if this feature is realistc, but i think it might be essential for combined user defined environment scripts.

 

thx in advance

 

klepto2

  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

I haven't tried this in lua shadmar, but in C++ we can get the world and camera from each framework layer. Also, you should be able to just look at the lua code for the default waterplane to see how he does it.

Link to comment
Share on other sites

Unfortunatly the waterplane is handled internally and the script only uses the framework commands for the water.

But as we can access the world and cameras of the specific layers it might be possible to port the DrawReflection code to lua. One problem might be the background rendering, as the skybox is handled also internally we need to render everything like the normal render which may lead to performance issues.

  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

http://www.leadwerks...ailable-in-lua/

 

its been posted as a bug and was reported that it was fixed - but I cannot find any sign that it has been done.

Edit- the gbuffer has been exposed, but i do not know if the other buffers have been or not...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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.

 Share

×
×
  • Create New...