Refraction with custom geometry
See original GitHub issueDescription of the problem
Hello,
I noticed an issue with the Refraction example :
https://threejs.org/examples/?q=refr#webgl_refraction
If I change the plane by a box and rotate it, some times the shader show weird things :
Modifications of the example :
Line 81 :
var refractorGeometry = new THREE.BoxBufferGeometry( 4, 4, 4 );
function render() {
refractor.material.uniforms.time.value += clock.getDelta();
refractor.rotation.y += 0.02;
renderer.render( scene, camera );
}
Three.js version
- r94
Browser
- All of them
OS
- All of them
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Shiny Refraction - Three.js Tutorials
This example demonstrates,. Using the EffectComposer to add a Depth of Field (DOF) effect. Dynamically changing the DOF depending on camera and ball ......
Read more >Using Refraction | Unreal Engine Documentation
Refraction is the term used to describe the change in direction of a light wave due to a change in its transmission medium....
Read more >Chapter 19. Generic Refraction Simulation - NVIDIA Developer
The first step of the basic refraction technique is to render the scene geometry into a texture, skipping all refractive meshes. This texture...
Read more >Refraction Rendering
Refraction. Screenshot: RefractionSample. Material. The Dude models in the RefractionSample are rendered using a custom effect. Here is one of the materials ...
Read more >Simulating refraction in SceneKit - ios - Stack Overflow
To make it clear, what I'm trying to achieve here is having a 3d lens in a scene which you can look through...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The algorithm of
Reflector
andRefractor
assumes there is a single reflection/refraction plane. I think you need a different approach if you want to support an arbitrary amount of planes defined by a group of planar polygon faces.Hehe, ops! I tried to make it more clear. I should have said
PlaneGeometry
,CircleGeometry
,ShapeGeometry
, …