shadmar Posted January 28, 2015 Share Posted January 28, 2015 How can I tell them apart in my post effect stack? Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Rick Posted January 28, 2015 Share Posted January 28, 2015 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. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 29, 2015 Share Posted January 29, 2015 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. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted January 29, 2015 Share Posted January 29, 2015 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. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 29, 2015 Share Posted January 29, 2015 Look for one with a negative scale on the Y axis. That's the reflection camera. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
shadmar Posted January 30, 2015 Author Share Posted January 30, 2015 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. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Josh Posted January 31, 2015 Share Posted January 31, 2015 You are correct. Fixing that now. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
shadmar Posted January 31, 2015 Author Share Posted January 31, 2015 Yes, I tested against cameramatrix[1][1] to figure out if it was the reflectioncam. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
shadmar Posted January 31, 2015 Author Share Posted January 31, 2015 For clipping geometry shader for correct reflections, you can use: if (cameramatrix[1][1] >= 0.0 || geometryposition.y > waterlevel ) { .. render stuff made by geometry .. } Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Recommended Posts
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.