diff options
author | Hamed Zaghaghi <hamed.zaghaghi@gmail.com> | 2008-06-28 07:18:11 +0400 |
---|---|---|
committer | Hamed Zaghaghi <hamed.zaghaghi@gmail.com> | 2008-06-28 07:18:11 +0400 |
commit | 1231a2171adf1f5ce596eb12a018978bb6a39695 (patch) | |
tree | 6684f90584bb147b13264bf523ae9cebff974bb8 /source/blender | |
parent | f9ae102afd4a6dd03a028127c2e2b4f99ae8cf57 (diff) |
BGE 2d-filter, custom shaders now can have depth texture and luminance texture
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesdna/DNA_actuator_types.h | 8 | ||||
-rw-r--r-- | source/blender/src/buttons_logic.c | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 20316f26804..51f03a676e4 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -192,11 +192,13 @@ typedef struct bVisibilityActuator { } bVisibilityActuator; typedef struct bTwoDFilterActuator{ - char pad[4]; - /* Tells what type of 2D Filter*/ + char pad[2]; + /* bitwise flag for enabling or disabling depth(bit 0) and luminance(bit 1) */ + short texture_flag; + /* Tells what type of 2D Filter */ short type; /* (flag == 0) means 2D filter is activate and - (flag != 0) means 2D filter is inactive*/ + (flag != 0) means 2D filter is inactive */ short flag; int int_arg; /* a float argument */ diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 297cde844d3..bfe2c92fde5 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -2382,7 +2382,11 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh break; case ACT_2DFILTER_CUSTOMFILTER: uiDefButI(block, NUM, B_REDR, "Pass Number:", xco+30,yco-44,width-60,19,&tdfa->int_arg,0.0,MAX_RENDER_PASS-1,0.0,0.0,"Set motion blur value"); - uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "Script: ", xco+30,yco-64,width-60, 19, &tdfa->text, ""); + uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "Script: ", xco+30,yco-64,width/2-32, 19, &tdfa->text, ""); + uiDefButS(block, TOG|BIT|0, B_REDR, "Depth", xco+width/2+2 , yco - 64, width/4-16 , 19, + &tdfa->texture_flag, 0.0, 0.0, 0, 0, "Includes Depth Texture (bgl_DepthTexture)"); + uiDefButS(block, TOG|BIT|1, B_REDR, "Luminance", xco+3*width/4-14 , yco - 64, width/4-16 , 19, + &tdfa->texture_flag, 0.0, 0.0, 0, 0, "Includes Luminance Texture (bgl_LuminanceTexture)"); break; } |