-
Notifications
You must be signed in to change notification settings - Fork 183
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
OpenGL version? #31
Comments
Hi @zhaishengfu The main reason I use WebGL 2.0 (which is based on OpenGL ES 3.0) rather than pure OpenGL under Windows is the ease of cross-platform portability. Basically any device that has a capable modern browser (which is pretty much everything these days) can run my code. I develop the demos on my Windows laptop but as soon as I release it, people with Windows desktop, Mac, Linux, tablets, smartphones, etc. can experience the demos as long as they can use a browser, and that browser can be Chrome, Firefox, or Edge at that. Thanks! :-) |
Oh, enjoy your vacation. I got your reason. I have seen some one says using compute shader to inplement ray tracing, do you think it is better? |
Hi again, :) To see how to make a raytracer with compute shaders where you are essentially talking to the individual GPU cores and setting up each individual thread with its own ID, take a look at Sam Lapere's GitHub projects . He shows how to do it with CUDA as well as OpenCL/OpenGL on Windows. I don't know if the tight raytracing loop runs any faster on the compute setup vs. the vertex/fragment shader full screen quad approach, but I will say this - WebGL, since it runs on browsers that may or may not be running on mobile devices, is capped at 60 fps. That is the best you can hope for in collecting many samples per second to get rid of initial noise. But with compute, like NVidia RTX, OpenCL, and CUDA, you don't have that cap, and it is possible to run at 140 fps or 200 fps, thereby collecting many more samples per second. However this assumes a simple geometry scene setup. If you're trying to run a detailed level from a AAA game with millions of triangles, it will probably do no better than 60 fps at this moment in GPU raytracing (summer 2019). As GPUs get more powerful in the future, I can envision doing any geometry no matter how complex at 120 fps - enough to do real-time VR path tracing with minimal noise and enough fps to make it a comfortable experience. |
wonderful work!Why do you use WEBGL not OpenGL? I think OpenGL may be faster.
The text was updated successfully, but these errors were encountered: