Jump to content

DepthRenderer not working on Apple devices


PeapBoy
 Share

Recommended Posts

Hi guys !

I just spotted what I think is a bug (or rather a compatibility issue).
Here is a *very* simple PG : http://www.babylonjs-playground.com/#27DV4V#6
It only prints the depth map on a plane.

Here is a screenshot of the PG with Chrome 52 on Windows 7 :

depth_issue_windows.png

 

 

 

 

 

 

 

 



Here is a screenshot of the PG with Safari on an Ipad (iOS 9.2.1) :

depth_issue_apple.png

 

 

 

 

 

 

 

 



As you can see, no depth map with Apple, the plane is totally black (or gray with the light here). Maybe are you aware of this issue ? (do I hope too much ? ^_^)
Is there a WebGL restriction I don't know with Apple ?

I had the chance to run the PG on different Macs and iPhones (different versions also), and the issue appears on every Apple device. I don't own any Apple devices but I can make tests at work if you need them.


I would be glad to help if I can. :)


PS: I make some tests and it looks like a simple render target texture with a shader material which computes the depth could work. And it seems like the RTT of the depthRenderer has a lot of different properties than the basic RTT I made.

Link to comment
Share on other sites

Hi Kesshi !

It seems so obvious when you answer so quickly... Thank you. ^_^

I have absolutely no experience with Apple, so I'm just discovering the existence of differences like this one. Sorry if it's annoying.

I'll play with texture type tomorrow and see what happens. :)

[EDIT] You were totally right. Replacing float type by unsigned integer type resolved the issue.

Thank you a lot. :D

Link to comment
Share on other sites

Hi Deltakosh,

In fact, I never contributed to any project on github so I don't really know how to do it. But there is a first time for everything.
But you're right, an optional "type" parameter could be added there, and we could then check in DepthRenderer constructor if it's undefined or not with TEXTURETYPE_FLOAT set by default.

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