Version: 5.3
WebGL 빌드 디버깅 및 문제 해결(Debugging and trouble shooting WebGL builds)
WebGL 네트워킹

WebGL 그래픽스

WebGL is an API for rendering graphics in web browsers, which is based on the functionality of the OpenGL ES 2.0 graphics library.

전역 조명

Unity WebGL은 베이크된 GI만 지원합니다. 실시간 GI는 WebGL에서 현재 지원되지 않습니다. 또한 비방향 라이트맵만 지원합니다.

절차적 머티리얼

Unity WebGL은 런타임 시점에 절차적 머티리얼을 지원하지 않습니다. 지원되지 않는 타 플랫폼과 마찬가지로, 절차적 머티리얼은 빌드 중에 일반적인 머티리얼로 베이크됩니다.

리니어 렌더링

WebGL은 리니어 색 공간 렌더링을 지원하지 않습니다.

MovieTextures

WebGL은 MovieTexture 클래스를 사용한 비디오 재생을 지원하지 않습니다. 하지만 HTML5 비디오 요소를 사용하여 WebGL 콘텐츠의 비디오를 효율적으로 재생할 수 있습니다. 이렇게 하는 방법의 예를 보려면 이 에셋 스토어 패키지를 다운로드하십시오.

WebGL 셰이더 코드 제한

WebGL 1.0 사양은 여러 OpenGL ES 2.0 구현 방식보다 더 엄격한 제약을 GLSLS 셰이더 코드에 가합니다. 대부분 원하는 셰이더를 직접 작성하는 경우에 제약이 중요하게 작용합니다.

구체적으로 설명하면 WebGL에서는 인덱스 배열 또는 행렬에 사용할 수 있는 값이 제한됩니다. WebGL에서는 상수식, 루프 인덱스, 또는 조합을 사용한 동적 인덱싱만 허용됩니다. 아무 식이나 사용해서 인덱스할 수 있는 버텍스 셰이더의 통합 액세스만 예외입니다.

또한 제어 구조에도 제한이 적용됩니다. 허용되는 유일한 루프 타입은 이니셜라이저가 변수를 상수로 초기화하고, 업데이트에서 상수를 변수에 더하거나 변수에서 빼고, 연속성 테스트에서 변수를 상수에 비교하는 for 카운트 루프입니다. 이런 기준을 충족하지 않는 for 루프와 while 루프는 허용되지 않습니다.

폰트 렌더링

Unity WebGL은 모든 Unity 플랫폼처럼 동적 폰트 렌더링을 지원합니다. 하지만 사용자 기기에 설치된 폰트에 액세스할 수 없으므로 사용되는 폰트(국제 문자의 폴백 폰트나 폰트의 볼드/이탤릭 버전 등)를 프로젝트 폴더에 포함시키고 폴백 폰트 이름으로 설정해야 합니다.

안티앨리어싱

WebGL supports anti-aliasing on most (but not on all) combinations of browsers and GPUs. To use it, anti-aliasing must be enabled in the default Quality Setting for the WebGL platform. Switching quality settings at runtime will not enabled or disable anti-aliasing - it has to be set up in the default Quality Setting loaded at player start up. Note that the diffent multi sampling levels have no effect in WebGL.

WebGL 2.0 support (Experimental)

Unity includes support for the WebGL 2.0 API, which brings OpenGL ES 3.0-level rendering capabilities to the web. This is currently experimental and disabled by default, as no shipping browser currently supports WebGL 2.0. However, current builds of Firefox allow you to test the feature, if you enable webgl.enable-prototype-webgl2 in about:config.

To enable WebGL 2.0, uncheck Automatic Graphics API in the Other Settings section of the WebGL Player Settings. Then you can add WebGL 2.0 to the enabled graphics APIs for your build.

When WebGL 2.0 is supported in browsers, content can benefit from a better quality in the Standard Shader, directional lightmap support, no restrictions on indexing and loops in shader code, and better performance.

WebGL 빌드 디버깅 및 문제 해결(Debugging and trouble shooting WebGL builds)
WebGL 네트워킹