Commit Graph
7 Commits
Author SHA1 Message Date
alteredq 6cc1016477 Testing rendering to full-screen texture.
Requires to turn off mipmapping to be able to use non-power of two texture.

Effect of texture size on performance is noticeable, also there is no antialiasing (default in Chrome is I think 4x multisampling).

So I guess full-screen postprocessing will be quite costly :(. That's the price of WebGL always running at full-blown high resolution.

This could be somehow mitigated by faking lower resolutions via smaller texture, though I guess it still wouldn't be the same as having lower resolution set by GPU driver (this is a major help with performance in games - I never run full 1680 x 1050).
2011-01-14 15:16:14 +01:00
alteredq 7c9fe8ff82 Another update of render-to-texture example and related bugfix.
Rendering proper 3d object into the texture uncovered another issue - framebuffer had to be cleared after switching.

Texture is still flipped :( (original scene has small red torus on the top)

This is proving to be rather tricky. Yet again I tried to handle image coordinate mess in a proper way (UNPACK_FLIP_Y_WEBGL as texture parameter and non-inverted UVs), fixing hacks across the codebase.

This did indeed help with render-to-texture flipping, but instead it created really ugly problems with both normal map and minecraft AO demos. So back to square one :(
2011-01-14 12:39:57 +01:00
alteredq 707dc9d0a0 Refactored render-to-texture example.
Still flipped, though at least now it's consistent.
2011-01-14 02:05:16 +01:00
alteredq 916401fd96 Updated render-to-texture example so that it's easier to check texture orientation. 2011-01-14 00:51:26 +01:00
alteredq 9bc383e1ed Fixed discrepancy between ANGLE and OpenGL when rendering to texture.
Had to set viewport to make it work in OpenGL.

Also made it easier to see texture orientation in the example.

Now it's visible that there is indeed flipping. At least now it's consistent ;).
2011-01-13 22:10:38 +01:00
alteredq cee7205670 Added simple render-to-texture example.
Something is broken as OpenGL shows different result than ANGLE :(

Though this time it's ANGLE which seems correct.
2011-01-13 17:04:36 +01:00
Szymon Nowak 868cab1e98 Very basic example for RTT feature. 2011-01-09 20:53:56 +01:00