Jump to content

Recommended Posts

Posted

I haven't played with water yet but I assume if another camera is there then there is some kind of script making that that we can ourselves modify (and Josh could also to make it more official so not sure if you are indirectly asking him to do so in your above statement) where another key is added to that camera that you check for. Give it a type key and after you find name = camera or object = camera check the type key for more specifics on what camera it is.

Posted

A second camera for reflections is automatically created. The reflection camera does not apply any post-effects. Post-effects are applied to the scene after water is rendered, so the water blends in seamlessly with the scene.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

I think he's saying that he has a process that loops over all entities in a scene looking for the camera to apply something to it. Now when he does that he's seeing multiple cameras. He needs to know which camera is which.

Posted

Look for one with a negative scale on the Y axis. That's the reflection camera.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

Ok, but

 

uniform vec3 cameraposition;

seems to return reflection camera position.

 

and if you test for camara position in lua-posteffect file's Render() function it also returns refelectioncam pos.

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

Posted

For clipping geometry shader for correct reflections, you can use:

if (cameramatrix[1][1] >= 0.0 || geometryposition.y > waterlevel ) { .. render stuff made by geometry .. } 

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

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