fix: 修复部分机型 GPU 计算精度问题导致的polygonLayer渲染花纹出错问题 (#1466)

Co-authored-by: Dreammy23 <echo.cmy@antgroup.com>
This commit is contained in:
Dreammy23 2022-11-10 10:15:48 +08:00 committed by GitHub
parent 17fc9d4042
commit d54b5d0875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,8 @@ void main() {
float sidey = styleMappingMat[3][0]; float sidey = styleMappingMat[3][0];
float lightWeight = styleMappingMat[3][1]; float lightWeight = styleMappingMat[3][1];
if(isSide < 1.0) { // Tip: 部分机型 GPU 计算精度兼容
if(isSide < 0.999) {
// side face // side face
if(u_sidesurface < 1.0) { if(u_sidesurface < 1.0) {
discard; discard;

View File

@ -16,7 +16,8 @@ void main() {
float sidey = styleMappingMat[3][0]; float sidey = styleMappingMat[3][0];
float lightWeight = styleMappingMat[3][1]; float lightWeight = styleMappingMat[3][1];
if(isSide < 1.0) { // Tip: 部分机型 GPU 计算精度兼容
if(isSide < 0.999) {
// side face // side face
if(u_sidesurface < 1.0) { if(u_sidesurface < 1.0) {
discard; discard;

View File

@ -19,7 +19,8 @@ void main() {
float topV = styleMappingMat[2][3]; float topV = styleMappingMat[2][3];
float sidey = styleMappingMat[3][0]; float sidey = styleMappingMat[3][0];
if(isSide < 1.0) { // Tip: 部分机型 GPU 计算精度兼容
if(isSide < 0.999) {
// side face // side face
if(u_sidesurface < 1.0) { if(u_sidesurface < 1.0) {
discard; discard;