Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works on iOS? #8

Open
fabiodr opened this issue Nov 15, 2017 · 6 comments
Open

Works on iOS? #8

fabiodr opened this issue Nov 15, 2017 · 6 comments

Comments

@fabiodr
Copy link

fabiodr commented Nov 15, 2017

Tried on iOS 11, iPad 2017, but it’s all black, maybe some minor issue in shaders?

https://erichlof.github.io/THREE.js-PathTracing-Renderer/Geometry_Showcase.html

77f42d77-e5e1-4f3a-992c-a0250e3141cb

@erichlof
Copy link
Owner

@fabiodr
Hi, I'm afraid for mobile devices, it only works on Google Chrome browser for Android at the moment. Also I only own a Samsung phone so that's what I've been able to test it on for my projects. I know some people who have iPhones but I would need to have one on hand to debug an application. Yes, like you mentioned, it probably is an issue with the shaders. Some of the shader source (1000 lines) for the demos are at the limits of compiling successfully on older machines. I would have to start from scratch, make an all red screen (most simple Hello World shader) and slowly build up line by line to see where a compilation problem occurred on iOS. Unfortunately GPU shader programming does not have a lot of debugging tools like one has in other environments.

Sorry it's not working for you. Thank you for the message and heads up.
-Erich

@fabiodr
Copy link
Author

fabiodr commented Nov 21, 2017

Indeed, GLSL can become tricky for many browser/gpu configurations, maybe a service for JS error tracking (Sentry, Rollbar...) can help to understand where it’s running or not, they have a free tier.

Thanks for the attention :)

Obs: just saw a very interesting technique for realtime illumination, it’s in Processing (Java) but the creator said it’s based on OpenGL ES 3.0, so it may be possible with acceptable performance in WebGL 2.0
http://thomasdiewald.com/blog/?p=2949
http://thomasdiewald.com/blog/?p=3159

@erichlof
Copy link
Owner

erichlof commented Nov 22, 2017

@fabiodr
Thanks for the Sentry and Rollbar error tracking tip, I will check those out. Also I think Firefox had some sort of GLSL inspector that shows all of the execution steps on the GPU so you can kind of see what's being called. I think originally it was intended to profile for optimizations because there could be too many draw calls at times when you weren't expecting them. But maybe that can help. I think Chrome has a browser extension also nowadays.

Wow that 2d radiosity Java app is beautiful! I must admit I don't know quite how he is doing that via the rasterizer as he mentioned in his blog post. I would guess he does some kind of shadowmap depth projection, then saving the ray cast bounce info in a huge light map texture, then sampling from that on a pixel by pixel basis. I'll try to check out his source, although I don't think he has that particular project public on his github repos: Recent Source request It seems like magic though - it has given me some ideas for future scenes in my project!

Thanks again,
-Erich

@RenderTool
Copy link

RenderTool commented Feb 3, 2020

@fabiodr iPhone only supports HalfFloatType(even iPhone11pro) .
You can try to replace THREE.FloatType in pathTracingRenderTarget(commandFunctions.js) and screenTextureRenderTargett(commandFunctions.js) with THREE.HalfFloatType.
@fabiodr 因为目前市面上的苹果手机只支持半浮点运算。(甚至是苹果11pro),你可以试着把全浮点改成半浮点。希望对你有用。

@erichlof
Copy link
Owner

erichlof commented Feb 3, 2020

@q750831855
Thank you for the tip! Some of my family members have iPhones, so I will give this a try on their devices. Thanks again!
-Erich

@vinkovsky
Copy link

I also think the problem is safari doesn't support webgl2 by default. It must be enabled in preferences, at least on Mac it works like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants