Jump to content

Recommended Posts

Posted

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

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Posted

If we could fetch the reflectioncam within the editor it would be great :)

How is this done for the default waterplane?, I suspect there is some code behind the scenes we can't get to?

  • Upvote 1

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Posted

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.

Posted

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.

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI

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.

×
×
  • Create New...