blender/doc/python_api
Benoit Bolsee c0bf881ebf BL_Shader.setUniformEyef(name)
defines a uniform that reflects the eye being rendered in stereo mode:
    0.0 for the left eye, 0.5 for the right eye.
    In non stereo mode, the value of the uniform is fixed to 0.0.
    The typical use of this uniform is in stereo mode to sample stereo textures
    containing the left and right eye images in a top-bottom order.

    python:
      shader = obj.meshes[0].materials[mat].getShader()
      shader.setUniformEyef("eye")

    shader:
      uniform float eye;
      uniform sampler2D tex;
      void main(void)
      {
         vec4 color;
         float ty, tx;
         tx = gl_TexCoord[0].x;
         ty = eye+gl_TexCoord[0].y*0.5;
         // ty will be between 0 and 0.5 for the left eye render
         // and 0.5 and 1.0 for the right eye render.
         color = texture(tex, vec2(tx, ty));
         ...
      }
2016-06-11 22:24:18 +02:00
..
blender-org fix [#28151] export OBJ don't save the extension 2011-08-03 05:32:07 +00:00
epy hide overly picky warnings from 'pylint' for pep8 script, indentation edits. 2011-11-19 16:17:35 +00:00
examples Fix T48212: Typos in bpy enum props examples. 2016-04-21 12:16:32 +02:00
rst BL_Shader.setUniformEyef(name) 2016-06-11 22:24:18 +02:00
rst_from_bmesh_opdefines.py Cleanup: pep8 2016-02-01 00:47:10 +11:00
sphinx_changelog_gen.py cleanup: pep8 2015-01-29 15:35:06 +11:00
sphinx_doc_gen.py Docs: include mathutils.interpolate 2016-03-04 08:40:22 +11:00
sphinx_doc_gen.sh Correct exit-code check 2016-06-07 14:02:32 +10:00
sphinx_doc_gen_monkeypatch.py Cleanup: pep8 2014-09-17 18:36:17 +10:00