Skip to content

Commit

Permalink
Update error message of not supporting float color renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
ricktu288 committed Dec 27, 2024
1 parent 79d6d3b commit 94a8846
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion locales/en/simulator.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@
},
"floatColorRenderer": {
"title": "Float Color Renderer",
"description": "This is an experimental feature that renders the rays with the WebGL floating-point color buffer. On most platforms, this solves the issues of inaccurate colors and brightnesses in this simulator, especially in the \"Simulate Colors\" mode (where the performance issue is also solved). However, in some situations, it may create other types of rendering artifacts, making the visual appearance worse than the default renderer. Note that ray tracing is still done on the CPU."
"description": "This is an experimental feature that renders the rays with the WebGL floating-point color buffer. On most platforms, this solves the issues of inaccurate colors and brightnesses in this simulator, especially in the \"Simulate Colors\" mode (where the performance issue is also solved). However, in some situations, it may create other types of rendering artifacts, making the visual appearance worse than the default renderer. Note that ray tracing is still done on the CPU.",
"error": "Your browser does not support the WebGL floating-point color buffer. Falling back to the default renderer."
},
"gridSize": {
"title": "Grid Size"
Expand Down
3 changes: 2 additions & 1 deletion locales/zh-CN/simulator.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@
},
"floatColorRenderer": {
"title": "浮点数色彩渲染器",
"description": "此为实验性功能,使用 WebGL 浮点数色彩缓冲区来渲染光线。在大多数平台上,这可以解决本模拟器中颜色与亮度不准确的问题,尤其是使用「模拟色彩」模式时(也解决该模式的效能问题)。然而,在某些情况下,它可能会产生其他类型的渲染瑕疵,使得视觉效果变得比预设渲染器差。注意光线追踪仍然是在 CPU 上进行。"
"description": "此为实验性功能,使用 WebGL 浮点数色彩缓冲区来渲染光线。在大多数平台上,这可以解决本模拟器中颜色与亮度不准确的问题,尤其是使用「模拟色彩」模式时(也解决该模式的效能问题)。然而,在某些情况下,它可能会产生其他类型的渲染瑕疵,使得视觉效果变得比预设渲染器差。注意光线追踪仍然是在 CPU 上进行。",
"error": "您的浏览器不支持 WebGL 浮点数色彩缓冲区。将回退到默认渲染器。"
}
},
"statusBox": {
Expand Down
3 changes: 2 additions & 1 deletion locales/zh-TW/simulator.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@
},
"floatColorRenderer": {
"title": "浮點數色彩渲染器",
"description": "此為實驗性功能,使用 WebGL 浮點數色彩緩衝區來渲染光線。在大多數平台上,這可以解決本模擬器中顏色與亮度不準確的問題,尤其是使用「模擬色彩」模式時(也解決該模式的效能問題)。然而,在某些情況下,它可能會產生其他類型的渲染瑕疵,使得視覺效果變得比預設渲染器差。注意光線追蹤仍然是在 CPU 上進行。"
"description": "此為實驗性功能,使用 WebGL 浮點數色彩緩衝區來渲染光線。在大多數平台上,這可以解決本模擬器中顏色與亮度不準確的問題,尤其是使用「模擬色彩」模式時(也解決該模式的效能問題)。然而,在某些情況下,它可能會產生其他類型的渲染瑕疵,使得視覺效果變得比預設渲染器差。注意光線追蹤仍然是在 CPU 上進行。",
"error": "您的瀏覽器不支援 WebGL 浮點數色彩緩衝區。將回退到預設渲染器。"
}
},
"statusBox": {
Expand Down
3 changes: 2 additions & 1 deletion src/simulator/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ async function startApp() {
scene.colorMode = 'linear';
} catch (e) {
localStorage.rayOpticsUseFloatColorRenderer = "off";
alert(e.toString() + ' Falling back to default renderer.' + '\n' + i18next.t('simulator:common.reloadToTakeEffect'));
console.log(e.toString() + ' Falling back to default renderer.');
alert(i18next.t('simulator:settings.floatColorRenderer.error') + '\n' + i18next.t('simulator:common.reloadToTakeEffect'));
return;
}
}
Expand Down

0 comments on commit 94a8846

Please sign in to comment.