How to use the FresnelShader function from three

Find comprehensive JavaScript three.FresnelShader code examples handpicked from public code repositorys.

75
76
77
78
79
80
81
82
83
84

refractSphereCamera = new THREE.CubeCamera( 0.1, 5000, 512 )
    // refractSphereCamera.renderTarget.mapping = new THREE.CubeRefractionMapping()
scene.add( refractSphereCamera )
    
var shader = THREE.FresnelShader
var uniforms = THREE.UniformsUtils.clone( shader.uniforms )
uniforms.tCube.value = refractSphereCamera.renderTarget.texture

var material = new THREE.ShaderMaterial( {
fork icon0
star icon0
watch icon1

144
145
146
147
148
149
150
151
152
153
 * 创建菲涅尔衍射球,即肥皂泡泡球
 * @param  {[type]} cubeCamera [description]
 * @return {[type]}            [description]
 */
export const createFresnelSphere = (cubeCamera) => {
        let shader = THREE.FresnelShader;
        let uniforms = THREE.UniformsUtils.clone( shader.uniforms );
        uniforms[ "tCube" ].value = cubeCamera.renderTarget.texture;
        let material = new THREE.ShaderMaterial( {
                uniforms: uniforms,
fork icon0
star icon0
watch icon1

44
45
46
47
48
49
50
51
52
53
// scene.add(lightHelper)
const cubeCamera = new THREE.CubeCamera(.5, 5, 2 ** 10)
//cubeCamera.renderTarget.texture.minFilter = THREE.LinearMipMapLinearFilter
// cubeCamera.renderTarget.texture.flipY = false

const shader = THREE.FresnelShader
const uniforms = THREE.UniformsUtils.clone(shader.uniforms)
uniforms['tCube'].value = cubeCamera.renderTarget.texture

// modified fragment_shader here, removing x flipping effect (-vReflect.x => vReflect.x)
fork icon0
star icon0
watch icon4

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)