-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KTX2Loader: Add support for u8, f16, and f32 array and cube textures …
…(WIP) Add DataCubeTexure
- Loading branch information
1 parent
99fd53f
commit e550512
Showing
25 changed files
with
129 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Texture } from './Texture.js'; | ||
import { CubeReflectionMapping } from '../constants.js'; | ||
|
||
class DataCubeTexture extends Texture { | ||
|
||
constructor( data, width, height ) { | ||
|
||
super( data, CubeReflectionMapping ); | ||
|
||
this.isDataCubeTexture = true; | ||
this.isCubeTexture = true; | ||
|
||
this.image = { data: data, width: width, height: height }; | ||
|
||
this.generateMipmaps = false; | ||
this.flipY = false; | ||
this.unpackAlignment = 1; | ||
|
||
} | ||
|
||
get images() { | ||
|
||
return this.image; | ||
|
||
} | ||
|
||
set images( value ) { | ||
|
||
this.image = value; | ||
|
||
} | ||
|
||
} | ||
|
||
export { DataCubeTexture }; |