Go to file
Benoit Bolsee 4213eca5fc BGE VideoTexture: add depth buffer access to ImageViewport and ImageRender.
2 new attributes to ImageViewport and ImageRender object:
depth: set to True to retrieve the depth buffer as an array of float
       (not suitable for texture source).
zbuff: set to True to retrieve the depth buffer as a grey scale pixel array
       (suitable for texture source).

A new mode 'F' is added to VideoTexture.imageToArray() to allow returning the image
buffer as a one dimensional array of float. This mode should only be used to retrieve
the depth buffer of ImageViewport and ImageRender objects.

Example:

viewport = VideoTexture.ImageViewport()
viewport.depth = True
depth = VideoTexture.imageToArray(viewport,'F')
# show depth of bottom left pixel
# 1.0 = infinite, 0.0 = on near clip plane.
print(depth[0])
2012-10-20 22:28:44 +00:00
build_files style cleanup: make OSL follow our C style convention. http://wiki.blender.org/index.php/Dev:Doc/CodeStyle 2012-10-17 01:47:37 +00:00
doc BGE VideoTexture: add depth buffer access to ImageViewport and ImageRender. 2012-10-20 22:28:44 +00:00
extern style cleanup 2012-10-20 18:46:57 +00:00
intern code cleanup: spelling 2012-10-20 20:36:51 +00:00
release style cleanup 2012-10-20 18:46:57 +00:00
source BGE VideoTexture: add depth buffer access to ImageViewport and ImageRender. 2012-10-20 22:28:44 +00:00
CMakeLists.txt Fix for r51447 (my CMake 2.8.9 did not like it, looks like with quotes it suites it...). 2012-10-20 19:36:08 +00:00
COPYING == docs == 2010-10-13 14:44:22 +00:00
GNUmakefile code cleanup: add check spelling osl 2012-10-17 01:53:29 +00:00
SConstruct add option to build without blenders default avi codec. 2012-10-08 02:51:42 +00:00