Files
filament/samples/web/suzanne.html
Philip Rideout 37a42ee854 Enable ETC for Suzanne normal map.
Due to an assertion in etc2comp, this unfortunately uses RGB8 instead of
RG11 but it still helps quite a bit (3.3 MB savings in the unzipped KTX
size).
2018-10-03 12:35:34 -07:00

44 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Suzanne</title>
<link href="favicon.png" rel="icon" type="image/x-icon"/>
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1">
<style>
body {
margin: 0;
overflow: hidden;
}
#filament-canvas {
touch-action: none;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<canvas id="filament-canvas"></canvas>
<script src="suzanne.js"></script>
<script src="filaweb.js"></script>
<script>
function load_etcfile(basename) {
return use_etc ? load_rawfile(basename + "_etc.ktx") : load_rawfile(basename + ".ktx");
}
load({
'albedo': (use_s3tc ? load_rawfile('monkey/albedo_s3tc.ktx') :
(use_astc ? load_rawfile('monkey/albedo_astc.ktx') :
load_rawfile('monkey/albedo.ktx'))),
'metallic': load_etcfile('monkey/metallic'),
'roughness': load_etcfile('monkey/roughness'),
'normal': load_etcfile('monkey/normal'),
'ao': load_etcfile('monkey/ao'),
'mesh': load_rawfile('monkey/mesh.filamesh'),
'syferfontein_18d_clear_2k': load_cubemap('syferfontein_18d_clear_2k', '.ktx')
});
</script>
</body>
</html>