Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -70702,7 +70702,7 @@ function WebGLUtils( gl, extensions ) {

if ( extension !== null ) {

if ( p === RGBA_BPTC_Format ) return extension.COMPRESSED_RED_RGTC1_EXT;
if ( p === RED_RGTC1_Format ) return extension.COMPRESSED_RED_RGTC1_EXT;
if ( p === SIGNED_RED_RGTC1_Format ) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;
if ( p === RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;
if ( p === SIGNED_RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
Expand Down
2 changes: 1 addition & 1 deletion build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -12723,7 +12723,7 @@ function WebGLUtils( gl, extensions ) {

if ( extension !== null ) {

if ( p === RGBA_BPTC_Format ) return extension.COMPRESSED_RED_RGTC1_EXT;
if ( p === RED_RGTC1_Format ) return extension.COMPRESSED_RED_RGTC1_EXT;
if ( p === SIGNED_RED_RGTC1_Format ) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;
if ( p === RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;
if ( p === SIGNED_RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
Expand Down
2 changes: 1 addition & 1 deletion build/three.module.min.js

Large diffs are not rendered by default.

38 changes: 33 additions & 5 deletions build/three.webgpu.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/three.webgpu.min.js

Large diffs are not rendered by default.

38 changes: 33 additions & 5 deletions build/three.webgpu.nodes.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/three.webgpu.nodes.min.js

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions docs/api/ar/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,32 @@ <h2>تنسيق القوام المضغوط ASTC</h2>
[link:https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_astc/ WEBGL_compressed_texture_astc]. <br /> <br />
</p>

<h2>تنسيق القوام المضغوط BPTC</h2>
<h2>تنسيقات القوام المضغوط BPTC</h2>
<code>
THREE.RGBA_BPTC_Format
THREE.RGB_BPTC_SIGNED_Format
THREE.RGB_BPTC_UNSIGNED_Format
</code>
<p>
للاستخدام مع خاصية [page:Texture.format format] لـ [page:CompressedTexture CompressedTexture] ،
هذه تتطلب دعمًا للتمديد
[link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/ EXT_texture_compression_bptc]. <br /> <br />
[link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/ EXT_texture_compression_bptc]. <br />
RGBA_BPTC_Format يوفر ضغط RGBA عالي الجودة، بينما RGB_BPTC_SIGNED_Format و RGB_BPTC_UNSIGNED_Format
يُستخدمان لقوام HDR مع قيم float موقعة وغير موقعة على التوالي.<br /> <br />
</p>

<h2>تنسيقات القوام المضغوط RGTC</h2>
<code>
THREE.RED_RGTC1_Format
THREE.SIGNED_RED_RGTC1_Format
THREE.RED_GREEN_RGTC2_Format
THREE.SIGNED_RED_GREEN_RGTC2_Format
</code>
<p>
للاستخدام مع خاصية [page:Texture.format format] لـ [page:CompressedTexture CompressedTexture] ،
هذه تتطلب دعمًا للتمديد
[link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_rgtc/ EXT_texture_compression_rgtc]. <br />
تنسيقات RGTC توفر ضغطًا فعالًا لقوام القناة الواحدة (أحمر) والقناة المزدوجة (أحمر-أخضر).<br /> <br />
</p>

<h2>وظائف مقارنة القوام (Texture Comparison functions)</h2>
Expand Down
22 changes: 20 additions & 2 deletions docs/api/en/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,32 @@ <h2>ASTC Compressed Texture Format</h2>
[link:https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_astc/ WEBGL_compressed_texture_astc] extension. <br /><br />
</p>

<h2>BPTC Compressed Texture Format</h2>
<h2>BPTC Compressed Texture Formats</h2>
<code>
THREE.RGBA_BPTC_Format
THREE.RGB_BPTC_SIGNED_Format
THREE.RGB_BPTC_UNSIGNED_Format
</code>
<p>
For use with a [page:CompressedTexture CompressedTexture]'s
[page:Texture.format format] property, these require support for the
[link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/ EXT_texture_compression_bptc] extension. <br /><br />
[link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/ EXT_texture_compression_bptc] extension. <br />
RGBA_BPTC_Format provides high-quality RGBA compression, while RGB_BPTC_SIGNED_Format and RGB_BPTC_UNSIGNED_Format
are used for HDR textures with signed and unsigned float values respectively.<br /><br />
</p>

<h2>RGTC Compressed Texture Formats</h2>
<code>
THREE.RED_RGTC1_Format
THREE.SIGNED_RED_RGTC1_Format
THREE.RED_GREEN_RGTC2_Format
THREE.SIGNED_RED_GREEN_RGTC2_Format
</code>
<p>
For use with a [page:CompressedTexture CompressedTexture]'s
[page:Texture.format format] property, these require support for the
[link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_rgtc/ EXT_texture_compression_rgtc] extension. <br />
RGTC formats provide efficient compression for single-channel (red) and dual-channel (red-green) textures.<br /><br />
</p>

<h2>Texture Comparison functions</h2>
Expand Down
19 changes: 18 additions & 1 deletion docs/api/fr/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,27 @@ <h2>Formats de Textures Compressées ASTC</h2>
<h2>Formats de Textures Compressées BPTC</h2>
<code>
THREE.RGBA_BPTC_Format
THREE.RGB_BPTC_SIGNED_Format
THREE.RGB_BPTC_UNSIGNED_Format
</code>
<p>
À utiliser avec la propriété [page:Texture.format format] d'une [page:CompressedTexture CompressedTexture],
ceux-ci doivent supporter les extensions [link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/ EXT_texture_compression_bptc]. <br /><br />
ceux-ci doivent supporter l'extension [link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/ EXT_texture_compression_bptc]. <br />
RGBA_BPTC_Format fournit une compression RGBA de haute qualité, tandis que RGB_BPTC_SIGNED_Format et RGB_BPTC_UNSIGNED_Format
sont utilisés pour les textures HDR avec des valeurs float signées et non signées respectivement.<br /><br />
</p>

<h2>Formats de Textures Compressées RGTC</h2>
<code>
THREE.RED_RGTC1_Format
THREE.SIGNED_RED_RGTC1_Format
THREE.RED_GREEN_RGTC2_Format
THREE.SIGNED_RED_GREEN_RGTC2_Format
</code>
<p>
À utiliser avec la propriété [page:Texture.format format] d'une [page:CompressedTexture CompressedTexture],
ceux-ci doivent supporter l'extension [link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_rgtc/ EXT_texture_compression_rgtc]. <br />
Les formats RGTC fournissent une compression efficace pour les textures à canal unique (rouge) et double canal (rouge-vert).<br /><br />
</p>

<h2>Formats Internes</h2>
Expand Down
24 changes: 21 additions & 3 deletions docs/api/it/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,32 @@ <h2>Formati Texture Compressi ASTC</h2>
[link:https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_astc/ WEBGL_compressed_texture_astc].<br />
</p>

<h2>Formato Texture Compresso BPTCt</h2>
<h2>Formati Texture Compressi BPTC</h2>
<code>
THREE.RGBA_BPTC_Format
THREE.RGB_BPTC_SIGNED_Format
THREE.RGB_BPTC_UNSIGNED_Format
</code>
<p>
Da usare con la prorietà del [page:Texture.format formato] della [page:CompressedTexture CompressedTexture],
questi richiedono il supporto per l'estensione
[link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/ EXT_texture_compression_bptc].<br />
questi richiedono il supporto per l'estensione
[link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/ EXT_texture_compression_bptc]. <br />
RGBA_BPTC_Format fornisce compressione RGBA di alta qualità, mentre RGB_BPTC_SIGNED_Format e RGB_BPTC_UNSIGNED_Format
sono utilizzati per texture HDR con valori float con segno e senza segno rispettivamente.<br />
</p>

<h2>Formati Texture Compressi RGTC</h2>
<code>
THREE.RED_RGTC1_Format
THREE.SIGNED_RED_RGTC1_Format
THREE.RED_GREEN_RGTC2_Format
THREE.SIGNED_RED_GREEN_RGTC2_Format
</code>
<p>
Da usare con la prorietà del [page:Texture.format formato] della [page:CompressedTexture CompressedTexture],
questi richiedono il supporto per l'estensione
[link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_rgtc/ EXT_texture_compression_rgtc]. <br />
I formati RGTC forniscono compressione efficiente per texture a canale singolo (rosso) e doppio canale (rosso-verde).<br />
</p>

<h2>Formati Interni</h2>
Expand Down
21 changes: 19 additions & 2 deletions docs/api/pt-br/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,30 @@ <h2>Formato de Textura Compactado ASTC</h2>
requerem suporte para a extensão [link:https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_astc/ WEBGL_compressed_texture_astc]. <br /><br />
</p>

<h2>BPTC Compressed Texture Format</h2>
<h2>Formatos de Textura Compactados BPTC</h2>
<code>
THREE.RGBA_BPTC_Format
THREE.RGB_BPTC_SIGNED_Format
THREE.RGB_BPTC_UNSIGNED_Format
</code>
<p>
Para uso com a propriedade [page:Texture.format format] de uma [page:CompressedTexture CompressedTexture],
requerem suporte para a extensão [link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/ EXT_texture_compression_bptc]. <br /><br />
requerem suporte para a extensão [link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/ EXT_texture_compression_bptc]. <br />
RGBA_BPTC_Format fornece compressão RGBA de alta qualidade, enquanto RGB_BPTC_SIGNED_Format e RGB_BPTC_UNSIGNED_Format
são usados para texturas HDR com valores float assinados e não assinados respectivamente.<br /><br />
</p>

<h2>Formatos de Textura Compactados RGTC</h2>
<code>
THREE.RED_RGTC1_Format
THREE.SIGNED_RED_RGTC1_Format
THREE.RED_GREEN_RGTC2_Format
THREE.SIGNED_RED_GREEN_RGTC2_Format
</code>
<p>
Para uso com a propriedade [page:Texture.format format] de uma [page:CompressedTexture CompressedTexture],
requerem suporte para a extensão [link:https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_rgtc/ EXT_texture_compression_rgtc]. <br />
Os formatos RGTC fornecem compressão eficiente para texturas de canal único (vermelho) e canal duplo (vermelho-verde).<br /><br />
</p>

<h2>Formatos Internos</h2>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/renderers/webgl/WebGLUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function WebGLUtils( gl, extensions ) {

if ( extension !== null ) {

if ( p === RGBA_BPTC_Format ) return extension.COMPRESSED_RED_RGTC1_EXT;
if ( p === RED_RGTC1_Format ) return extension.COMPRESSED_RED_RGTC1_EXT;
if ( p === SIGNED_RED_RGTC1_Format ) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;
if ( p === RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;
if ( p === SIGNED_RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
Expand Down
5 changes: 3 additions & 2 deletions src/renderers/webgpu/utils/WebGPUConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ export const GPUTextureFormat = {
BGRA8UnormSRGB: 'bgra8unorm-srgb',
// Packed 32-bit formats
RGB9E5UFloat: 'rgb9e5ufloat',
RGB10A2Uint: 'rgb10a2uint',
RGB10A2Unorm: 'rgb10a2unorm',
RG11B10UFloat: 'rgb10a2unorm',
RG11B10UFloat: 'rg11b10ufloat',

// 64-bit formats

Expand Down Expand Up @@ -158,7 +159,7 @@ export const GPUTextureFormat = {
BC6HRGBUFloat: 'bc6h-rgb-ufloat',
BC6HRGBFloat: 'bc6h-rgb-float',
BC7RGBAUnorm: 'bc7-rgba-unorm',
BC7RGBAUnormSRGB: 'bc7-rgba-srgb',
BC7RGBAUnormSRGB: 'bc7-rgba-unorm-srgb',

// ETC2 compressed formats usable if 'texture-compression-etc2' is both
// supported by the device/user agent and enabled in requestDevice.
Expand Down
32 changes: 31 additions & 1 deletion src/renderers/webgpu/utils/WebGPUTextureUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import {
RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_ASTC_10x5_Format,
RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_10x10_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, UnsignedIntType, UnsignedShortType, UnsignedInt248Type, UnsignedInt5999Type,
NeverCompare, AlwaysCompare, LessCompare, LessEqualCompare, EqualCompare, GreaterEqualCompare, GreaterCompare, NotEqualCompare, IntType, RedIntegerFormat, RGIntegerFormat, RGBAIntegerFormat,
CubeReflectionMapping, CubeRefractionMapping, EquirectangularReflectionMapping, EquirectangularRefractionMapping
CubeReflectionMapping, CubeRefractionMapping, EquirectangularReflectionMapping, EquirectangularRefractionMapping,
RGBA_BPTC_Format, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format,
RED_RGTC1_Format, SIGNED_RED_RGTC1_Format, RED_GREEN_RGTC2_Format, SIGNED_RED_GREEN_RGTC2_Format
} from '../../../constants.js';
import { CubeTexture } from '../../../textures/CubeTexture.js';
import { DepthTexture } from '../../../textures/DepthTexture.js';
Expand Down Expand Up @@ -1202,6 +1204,34 @@ export function getFormat( texture, device = null ) {
formatGPU = ( colorSpace === SRGBColorSpace ) ? GPUTextureFormat.ASTC12x12UnormSRGB : GPUTextureFormat.ASTC12x12Unorm;
break;

case RGBA_BPTC_Format:
formatGPU = ( colorSpace === SRGBColorSpace ) ? GPUTextureFormat.BC7RGBAUnormSRGB : GPUTextureFormat.BC7RGBAUnorm;
break;

case RGB_BPTC_SIGNED_Format:
formatGPU = GPUTextureFormat.BC6HRGBFloat;
break;

case RGB_BPTC_UNSIGNED_Format:
formatGPU = GPUTextureFormat.BC6HRGBUFloat;
break;

case RED_RGTC1_Format:
formatGPU = GPUTextureFormat.BC4RUnorm;
break;

case SIGNED_RED_RGTC1_Format:
formatGPU = GPUTextureFormat.BC4RSnorm;
break;

case RED_GREEN_RGTC2_Format:
formatGPU = GPUTextureFormat.BC5RGUnorm;
break;

case SIGNED_RED_GREEN_RGTC2_Format:
formatGPU = GPUTextureFormat.BC5RGSnorm;
break;

case RGBAFormat:
formatGPU = ( colorSpace === SRGBColorSpace ) ? GPUTextureFormat.RGBA8UnormSRGB : GPUTextureFormat.RGBA8Unorm;
break;
Expand Down
Loading