diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2017-03-21 02:26:52 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2017-03-21 02:26:52 +0300 |
commit | e4ea5e5810928ed3da2119a9a4a646bb6991436d (patch) | |
tree | c20f4980b6d5e75e904c962b2edfdb9bebac7b21 /source/gameengine/GameLogic/SCA_2DFilterActuator.h | |
parent | 13d8661503f07a16da15f75d9fc9597e43d78283 (diff) |
BGE: 2D filter additions.
gpu_draw: skip color management for textures declared as 'non-color'.
New reserved names in 2D filters: bgl_ObjectTextureX (X=0 to 4) to
access texture channels 0 to 4 of the object on which the 2D filter
is defined.
Force U.use_16bit_textures to 1 in the blender player to give access to
floating point textures in the 2D fitlers shaders.
bge.logic.setOffScreen(True) to define and use a floating point offscreen
render buffer of the same size than the framebuffer in the main BGE loop.
Useful to get floating point results from 2D filters. The offscreen render
buffer will automatically be used by bge.texture.ImageViewport if it's enabled.
It is legal to call bge.logic.setOffScreen(True/False) to disable and reenable
the framebuffer on a frame by frame basis.
New refresh mode for bge.texture.ImageViewport and bge.texture.ImageRender
objects:
iv.refresh(buffer, mode)
mode = "DEPTH" to retrieve floating point depth buffer
= "RG32F" to retrieve red and green channels as floating point.
= "RGB32F" to retrieve red, green and blue channels as floating point
= "RGBA32F" to retrieve red, green, blue and alpha channels as floating point.
For ImageViewport and ImageRender, refresh() bypasses all filters and object
options and retrieve directly from the frame buffer or render buffer.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_2DFilterActuator.h')
-rw-r--r-- | source/gameengine/GameLogic/SCA_2DFilterActuator.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.h b/source/gameengine/GameLogic/SCA_2DFilterActuator.h index 4635a8ad9f8..eb9f3a79842 100644 --- a/source/gameengine/GameLogic/SCA_2DFilterActuator.h +++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.h @@ -35,6 +35,8 @@ #include "SCA_IActuator.h" #include "SCA_IScene.h" +class BL_Material; + class SCA_2DFilterActuator : public SCA_IActuator { Py_Header @@ -48,11 +50,13 @@ private: STR_String m_shaderText; RAS_IRasterizer* m_rasterizer; SCA_IScene* m_scene; + BL_Material* m_mat; public: SCA_2DFilterActuator( class SCA_IObject* gameobj, + BL_Material *mat, RAS_2DFilterManager::RAS_2DFILTER_MODE type, short flag, float float_arg, |