I'm not a shader specialist, but I'd like to pass the color value to the shader that could maybe blended with the env map color.
var shader = THREE.FresnelShader;
// Thank you WestLangley for that trick
var uniforms = THREE.UniformsUtils.merge( [
THREE.UniformsLib[ "lights" ],
shader.uniforms
] );
uniforms[ "tCube" ].value = textureCube;
var parameters = { fragmentShader: shader.fragmentShader, vertexShader: shader.vertexShader, uniforms: uniforms, lights : true };
shaderMaterial = new THREE.ShaderMaterial( parameters );
shaderMaterial.envMap = textureCube;
I'm clueless. Thanks for any suggestions.
For the futures ones ;) You need to modify the FresnelShader firstly by passing the color to the shader. Afterwords in the fragmentShader add a line:
and by modifing this line:
You can addjust the refracted color.