Jump to content

[shader] pass samplerCube's uniform to shader


MinZe
 Share

Recommended Posts

But this is the case here, you are rendering to a cubeMap in realtime (the RenderTargetTexture is a cube now because of the last constructor's parameter)

Link to comment
Share on other sites

1 hour ago, Nabroski said:

@MinZe

what do you mean with it is not a cubeMap, sure it is! What you are looking for ? 2d into 3d reproject ? http://www.babylonjs-playground.com/#UU7RQ#139

I'm looking for a cubeMap render of the whole scene, not just what I can see on the camera, rendered at least once, and thanks for the example, but I think I have the same problem.

52 minutes ago, Deltakosh said:

It is a real cubemap with 6 different rendering on each faces. I encourage you to use http://spector.babylonjs.com/ to see what is inside each face :)

Thanks, I just did and I think that it's the same render on each face, here are the screenshots (for the sake of the screenshots, I deleted more elements in order to have only those necessary)

image.thumb.png.793aa0950a3a26719697c428439c5ada.png

And this for all the faces.
Am  I doing anything wrong?

Link to comment
Share on other sites

On 8/1/2018 at 11:15 AM, Nabroski said:

ok. i get it, i think or we getting closer :)
http://www.babylonjs-playground.com/#UU7RQ#140

What you just did reminded me of the reflection probes and it turns out it seems to work:

http://www.babylonjs-playground.com/#UU7RQ#141

But If I apply it to the shader like on #136 it does't work correctly

http://www.babylonjs-playground.com/#UU7RQ#142

And the sphere seems a little bit bigger(it's not a real problem)

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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...