Comments (4)
Is there a way to adjust the polygon offset factor of the material
I can't think of a way. Three's polygonOffset
uses glPolygonOffset which transposes depth values of the rasterized image. RayTracingRenderer doesn't use a depth buffer at all, since ray tracing traverses a BVH instead. Do you have some ideas how we could prevent z-fighting in other ways?
from ray-tracing-renderer.
Sorting of objects from back to front is already done with threejs by default.
But the the nvidia guy gave multiple options:
https://devtalk.nvidia.com/default/topic/913414/optix/how-can-optix-solve-the-problem-of-z-fighting-/
- Increase BVH precision,
- Offset the ray origin a little from the primitive surface (not good for transparent objects)
- Unique primitive IDS, but a lot complicated when using instancing, which has now started heavily being used in webgl rendering .
What do you think ?
from ray-tracing-renderer.
Wonderful resource, thanks for finding this. Correct me if I'm mistaken, but this forum post addresses how to avoid self-intersection with the same triangle? What you're describing involves z-fighting between two triangles that are close together? I can see how 1. would fix that, but what about 2. and 3.?
- The BVH precision is using the max built-in texture storage of 32-bit float. I'm not sure how easy it would be to increase this.
- I think we're doing this already! We offset the ray origin, from the surface, by a fixed small amount of 0.0005. It avoids the self-intersection problem described in the post.
https://github.com/hoverinc/ray-tracing-renderer/blob/master/src/renderer/glsl/chunks/sampleShadowCatcher.glsl#L117 - This solution is interesting and sounds like something we could explore. We'd need to allocate extra memory in the BVH for primitive IDs, but that's doable. But would it offer an advantage over ray origin offsetting?
from ray-tracing-renderer.
- Yes you cannot go beyond 32 bit float precision in WebGL2 :(
- Oh that's great, but we are having self intersection problems with thin planes, currently managing with tricks.
- Yes when geometry is quite thin and almost overlapping, this should be really useful :)
from ray-tracing-renderer.
Related Issues (20)
- Issue with Material Transparency HOT 9
- Using threejs renderer and raytracing renderer in the same canvas HOT 5
- Color depending on the depth of the glass. HOT 1
- Unable to run demo: Failed to execute 'getActiveUniforms' on 'WebGL2RenderingContext' HOT 4
- Hi, everyone. I'd like to ask when the ray tracing renderers can add light sources and spotlights HOT 6
- Handle vertexColors: true in meshStandardMaterial HOT 2
- Dead white pixels even after convergence HOT 7
- Hello, I'd like to ask about the render support three.js Is the bump in the map HOT 2
- Block shadows in GLTF model HOT 1
- Not working with the latest version of three.js. Any advice on how to fix this?
- Envrionment map is displayed rotated when Object3D .DefaultUp is Z Axis.
- I can't run the demos
- Why there is no output in display?
- about shadowCatcher
- Some Glb file will not load
- Bright Pixels show on screen when transparent material is used HOT 3
- ES6 in the browser? HOT 1
- muti material not supported
- Broken demo HOT 4
- How to detect hardware/software compatibility? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ray-tracing-renderer.