Hi,
i have a problem! I have also intrigrate the PP Effect in my main data and it runs! But when i switch in PP Mode, it change from 1280 x 1024 into a lower Resolution!

What is wrong? There are the 3 .wdls:

PP_Main:

Code:
include <PP_DoF1.wdl>;
include <PP_Effects.wdl>;

view PP_Cam{}

entity PP_Quad
{
type = <PPE_Quad.tga>;
layer = 1;
view = camera;

x = 878;
y = 0;
z = 0;

scale_x = 1;
scale_y = 1;
}

function PP_Init_startup()
{
PP_Cam.bmap = bmap_for_entity(PP_Quad,0);
}


function PP_Init_SEPIA()
{
PP_Quad.material = Sepia_mat;
Sepia_set_Value(0.5, 1);
}

function PP_Init_RAINDROPS()
{
PP_Quad.material = Raindrops_mat;
Raindrops_set_Value(0, -0.003);
}

function PP_Init_PULSATING()
{
PP_Quad.material = Pulsing_mat;
Pulsing_set_Value(0.25, 0.01);
}

function PP_Init_DOF()
{
PP_Quad.material = DoF_type_1_mat;
DoF_type_1_set_Value(5);
}

function PP_Init_FROST()
{
PP_Quad.material = Frost_mat;
Frost_set_Value(0.005, 0.005, 0.5);
}

function PP_Init_BLOOM()
{
PP_Quad.material = Bloom_mat;
Bloom_set_Value(2, 0.2);
}

function PP_Init_EDGE()
{
PP_Quad.material = SobelEdge_mat;
SobelEdge_set_Value(1, 0.05);
}

function PP_Init_SCREENSHAKING()
{
PP_Quad.material = ScreenShaking_mat;
ScreenShaking_set_Value(0.1, 0.01);
}

function PP_Init_SCREENWAVES()
{
PP_Quad.material = ScreenWaves_mat;
ScreenWaves_set_Value(3, 0.003);
}

function PP_Init_GAMMA()
{
PP_Quad.material = ScreenBrightness_mat;
ScreenBrightness_set_Value(4);
}

function PP_Init_SHARPEN()
{
PP_Quad.material = Sharpen_mat;
Sharpen_set_Value(40);
}

function PP_Init_EMBOSS()
{
PP_Quad.material = Emboss_mat;
}

function PP_Init_DREAM()
{
PP_Quad.material = Dream_mat;
Dream_set_Value(1, 10); // set the blur factor and the sharpness
}

function PP_Init_SIMPLEBLUR()
{
PP_Quad.material = SimpleBlur_mat;
SimpleBlur_set_Value(1.5); // set the value for the blur
}

function PP_Init_COMPLEXBLUR()
{
PP_Quad.material = ComplexBlur_mat;
ComplexBlur_set_Value(0.004); // set the value for the blur
}

function PP_Init_COLORINTENSITY()
{
PP_Quad.material = Colorintensity_mat;//Change this to the material you wish<---------------------------
Colorintensity_set_Value(0.2, 0.3, 0.7, 1); // set the rgba values here
}

function PP_Init_NEGATIVE()
{
PP_Quad.material = Negative_mat;//Change this to the material you wish<---------------------------
}

function PP_Init_MONO()
{
PP_Quad.material = Monochrome_mat;//Change this to the material you wish<---------------------------
}

function PP_Init_BW()
{
PP_Quad.material = BlackAndWhite_mat;//Change this to the material you wish<---------------------------
}

function PP_Init_SCRATCHED()
{
PP_Quad.material = ScrachedFilm_mat;//Change this to the material you wish<---------------------------
ScrachedFilm_set_Value(4); //Call here the function to set the materials values<-------------

if(PP_Quad.material == DoF_type_1_mat)
{
DoF1_Enable();
DoF_type_1_mat.skin1 = DoF1_bmap;
}
}

function PP_Toggle_OnOff()
{
if(PP_Quad.visible == on)
{
PP_Cam.visible = off;
PP_Quad.visible = off;
}else
{
PP_Cam.visible = on;
PP_Quad.visible = on;

while(PP_Quad.visible == on)
{
vec_set(PP_Cam.x,camera.x);
vec_set(PP_Cam.pan,camera.pan);
wait(1);
}
}
}

on_t = PP_Toggle_OnOff;



PP-Effects:

Code:
// Black and White
material BlackAndWhite_mat
{
effect = "blackandwhite.fx";
}


// Monochrome
material Monochrome_mat
{
effect = "monochrome.fx";
}


// Negative
material Negative_mat
{
effect = "negative.fx";
}


// Colorintensity
material Colorintensity_mat
{
effect = "colorintensity.fx";
}

function Colorintensity_set_Value(r,g,b,a)
{
Colorintensity_mat.skill1 = floatv(r);
Colorintensity_mat.skill2 = floatv(g);
Colorintensity_mat.skill3 = floatv(b);
Colorintensity_mat.skill4 = floatv(a);
}


// Blur in all directions (Highquality)
material ComplexBlur_mat
{
effect = "complex_blur.fx";
}

function ComplexBlur_set_Value(Blur)
{
ComplexBlur_mat.skill1 = floatv(Blur); // should be very small between 0.001 and 0.05
}


// Blur in all directions (Lowquality)
material SimpleBlur_mat
{
effect = "simpleBlur.fx";
}

function SimpleBlur_set_Value(Blur)
{
SimpleBlur_mat.skill1 = floatv(Blur); // should be higher than 1
}


// Dream like effect
material Dream_mat
{
effect = "dream.fx";
}

function Dream_set_Value(Blur,Sharpness)
{
Dream_mat.skill1 = floatv(Blur); // 2 looks good
Dream_mat.skill2 = floatv(Sharpness); // 7 looks good
}


// Emboss
material Emboss_mat
{
effect = "emboss.fx";
}


//Sharpen
material Sharpen_mat
{
effect = "sharpen.fx";
}

function Sharpen_set_Value(strength)
{
Sharpen_mat.skill1 = floatv(strength); // should be higher than one. Looks good between 10 and 50
}


// ScreenBrightness
material ScreenBrightness_mat
{
effect = "screenbrightness.fx";
}

function ScreenBrightness_set_Value(Brightness)
{
ScreenBrightness_mat.skill1 = floatv(Brightness); // Brightness > 1 = brighten, Brightness < 1 > 0 = darken
}


//Wavedisortion of the Screen
material ScreenWaves_mat
{
effect = "screenwaves.fx";
}

function ScreenWaves_set_Value(Speed,Amplitude)
{
ScreenWaves_mat.skill1 = floatv(Speed); // can be around 20
ScreenWaves_mat.skill2 = floatv(Amplitude); // should be around 0.01
}


//Shaking of the Screen
material ScreenShaking_mat
{
effect = "shake.fx";
}

function ScreenShaking_set_Value(Speed,Amplitude)
{
ScreenShaking_mat.skill1 = floatv(Speed); // should be around 1
ScreenShaking_mat.skill2 = floatv(Amplitude); // this shouldn´t be higher than 0.1
}


//SobelEdge Filter
material SobelEdge_mat
{
effect = "SobelEdge.fx";
}

function SobelEdge_set_Value(Brightness,Strength)
{
SobelEdge_mat.skill1 = floatv(Brightness); //around 1
SobelEdge_mat.skill2 = floatv(Strength); //around 0.05
}


//Bloom
material Bloom_mat
{
effect = "Bloom.fx";
}

function Bloom_set_Value(Strength,Brightness)
{
Bloom_mat.skill1 = floatv(Strength); //should be at around 1 or 2 or even higher
Bloom_mat.skill2 = floatv(Brightness); //use a small value here (between 0 and 0.5)
}


//Frost
bmap Noise1_bmap = "noise1.dds";
material Frost_mat
{
skin1 = Noise1_bmap;
effect = "frost_fast.fx";
}

function Frost_set_Value(xOffset,yOffset,Frequenz)
{
Frost_mat.skill1 = floatv(xOffset); //has to be very small at about 0.005
Frost_mat.skill2 = floatv(yOffset); //you should usually use the same value here
Frost_mat.skill3 = floatv(Frequenz); //try something between 0.1 and 1 here
}


//Depth of Field Type 1
//(Doesn´t support the 3DGS Skyobject at the moment and works with models/terrains only)
material DoF_type_1_mat
{
effect = "DoF1.fx";
}

function DoF_type_1_set_Value(Blur)
{
DoF_type_1_mat.skill1 = floatv(Blur);
}


//Pulsing
material Pulsing_mat
{
effect = "pulsing.fx";
}

function Pulsing_set_Value(Speed,Range) //The following values could be used for breathing
{
Pulsing_mat.skill1 = floatv(Speed); //0.25
Pulsing_mat.skill2 = floatv(Range); //0.01
}


//Raindrops
bmap Raindrops_bmap = <Raindrops.jpg>;
material Raindrops_mat
{
skin1 = Raindrops_bmap;
effect = "rain_drops.fx";
}

function Raindrops_set_Value(xMovemen,yMovement)
{
Raindrops_mat.skill1 = floatv(xMovemen); //usually 0
Raindrops_mat.skill2 = floatv(yMovement); //very small around 0.01
}


//Sepia
material Sepia_mat
{
effect = "sepia.fx";
}

function Sepia_set_Value(Desaturation,Toning)
{
Sepia_mat.skill1 = floatv(Desaturation); //between 0 and 1
Sepia_mat.skill2 = floatv(Toning); //usually at 1
}


//Scrached Film
bmap Noise2_bmap = "noise1.dds";
material ScrachedFilm_mat
{
skin1 = Noise2_bmap;
effect = "ScrachedFilm.fx";
}

function ScrachedFilm_set_Value(SideScrollSpeed)
{
ScrachedFilm_mat.skill1 = floatv(SideScrollSpeed); //usually a small value like 0.01
}



PP_DoF1:

Code:
view* DoF1_view;
bmap* DoF1_bmap;


//Standart Terrain
function mat_terrain_event();
material mat_terrain_depth
{
flags = enable_tree;
event = mat_terrain_event;
effect = "renderdepthmap.fx";
}

function mat_terrain_event()
{
if(render_view == DoF1_view)
{
my.material = mat_terrain_depth;
}else
{
my.material = mat_terrain;
}
}

//Standart Modell
function mat_model_event();
material mat_model_depth
{
flags = enable_tree;
event = mat_model_event;
effect = "renderdepthmap.fx";
}

function mat_model_event()
{
if(render_view == DoF1_view)
{
my.material = mat_model_depth;
}else
{
my.material = mat_model;
}
}

//Standart Sprite
function mat_sprite_event();
material mat_sprite_depth
{
flags = enable_tree;
event = mat_sprite_event;
effect = "renderdepthmap.fx";
}

function mat_sprite_event()
{
if(render_view == DoF1_view)
{
my.material = mat_sprite_depth;
}else
{
my.material = mat_sprite;
}
}

//MetalFlag
function mat_metal_event();
material mat_metal_depth
{
flags = enable_tree;
event = mat_metal_event;
effect = "renderdepthmap.fx";
}

function mat_metal_event()
{
if(render_view == DoF1_view)
{
my.material = mat_metal_depth;
}else
{
my.material = mat_metal;
}
}

//UnlitFlag
function mat_unlit_event();
material mat_unlit_depth
{
flags = enable_tree;
event = mat_unlit_event;
effect = "renderdepthmap.fx";
}

function mat_unlit_event()
{
if(render_view == DoF1_view)
{
my.material = mat_unlit_depth;
}else
{
my.material = mat_unlit;
}
}

function DoF1_Init()
{
DoF1_view = view_create(-1);
DoF1_view.size_x = 1280; //128
DoF1_view.size_y = 1024; //96
DoF1_view.noshadow = on;
DoF1_view.noparticle = on;

DoF1_bmap = bmap_createblack(DoF1_view.size_x,DoF1_view.size_y,24);

DoF1_view.bmap = DoF1_bmap;

mat_terrain.enable_tree = on;
mat_model.enable_tree = on;
mat_sprite.enable_tree = on;
mat_metal.enable_tree = on;
mat_unlit.enable_tree = on;

mat_terrain.event = mat_terrain_event;
mat_model.event = mat_model_event;
mat_sprite.event = mat_sprite_event;
mat_metal.event = mat_metal_event;
mat_unlit.event = mat_unlit_event;
}


function DoF1_Enable()
{
if(!DoF1_view)
{
DoF1_Init();
}

DoF1_view.visible = on;

while(DoF1_view.visible == on)
{
vec_set(DoF1_view.x,camera.x);
vec_set(DoF1_view.pan,camera.pan);

wait(1);
}
}

function DoF1_Disable()
{
DoF1_view.visible = off;
}



and this is the Beginning of the Main wdl from my game and the line with the pp effect:

Code:
include <PP_Main.wdl>;




var video_depth = 32;
var video_mode = 9;
var video_screen = 1;

/////////////////////////////////////////////////////////////////
// Desc: The main() function is started at game start
function main()
{
// set some common flags and variables
// freeze all entity functions
freeze_mode = 1;
// no level has been loaded yet...
gid01_level_state = gid01_level_not_loaded;

// entry: Warning Level (0,1, or 2)
// entry_help: Sets sensitivity to warnings (0 = none, 1 = some, 2 = all).
warn_level = 2; // announce bad texture sizes and bad wdl code


// entry: Starting Mouse Mode (0, 1, or 2)
mouse_mode = 0;

// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// now load the level
level_load(level_str);

wait(2); // let level load
// level should be loaded at this point...
gid01_level_state = gid01_level_loaded;

PP_Init_BLOOM();
PP_Toggle_OnOff();



Can somebody help me? I want the 1280 x 1024 with the PP Mode!

Thanks!


Deadly Awaking in the Outback Please Visit! Upcoming 08, a Flight in the death...