mirror of
https://github.com/pissang/claygl.git
synced 2025-12-08 21:26:11 +00:00
27 lines
916 B
HTML
27 lines
916 B
HTML
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script src="../dist/claygl.js"></script>
|
|
</head>
|
|
<body>
|
|
<canvas width="1200" height="640" id="Main"></canvas>
|
|
<script>
|
|
clay.core.request.get({
|
|
url: 'assets/textures/hdr/pisa.hdr',
|
|
responseType: 'arraybuffer',
|
|
onload: function(data) {
|
|
var texture = clay.util.hdr.parseRGBE(data);
|
|
|
|
var renderer = new clay.Renderer({
|
|
canvas: document.getElementById('Main')
|
|
});
|
|
var pass = new clay.compositor.Pass({
|
|
fragment: clay.Shader.source('clay.compositor.output')
|
|
});
|
|
pass.setUniform('texture', texture);
|
|
pass.render(renderer);
|
|
}
|
|
})
|
|
</script>
|
|
</body>
|
|
</html> |