提交 708acf59 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #11705 from WestLangley/dev-light_pars

Correct equirectangular UV mapping formula
......@@ -263,7 +263,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
#elif defined( ENVMAP_TYPE_EQUIREC )
vec2 sampleUV;
sampleUV.y = saturate( reflectVec.y * 0.5 + 0.5 );
sampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
sampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;
#ifdef TEXTURE_LOD_EXT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册