Dark Shader's Bloom effect won't work anymore.
The code I use work before but won't work.
Rem Project: OverHead Shooter
Rem Created: 7/23/2008 11:27:36 PM
Rem ***** Main Source File *****
`setup game
sync on:sync rate 0
screen(16.0/8.0):set display mode 1280,800,32
autocam off
#include "GUI Studio Functions.dba"
`load dlls
LM start:AI start
AI set radius 5
`*** setup bloom effect ***
make camera 1
load camera effect "Shaders/Bloom.fx",1,0
set camera effect 1,1,4
make object plain 13,2,2
load effect "Shaders/Quad.fx",1,0
set object effect 13,1
Null=make vector4(1)
set vector4 1,1280,800,0,0
set camera effect constant float 1,"BloomScale",2.0
set camera effect constant float 1,"BloomPower",1.35
set effect constant vector 1,"ViewSize",1
Null=delete vector4(2)
texture object 13,0,4
xrotate camera 1,70
`load GUI
GUI_initialise("Overhead Game GUI.gse")
color backdrop RGB(0,0,0)
`make player
load object "Models/farmer.x",1
position object 1,223,0,-1020
load image "Models/farmer D.dds",1
texture object 1,0,1
AI add player 1
`make level
load object "Levels/Floors.dbo",2
load object "Levels/Walls1.dbo",3
load object "Levels/Walls2.dbo",4
load object "Levels/Walls3.dbo",5
load object "Levels/Walls4.dbo",6
load object "Levels/Walls5.dbo",7
Load object "Levels/Walls6.dbo",8
load image "Textures/Walls.dds",2
load image "Textures/Floors.dds",3
for X= 2 TO 8
position object X,0,0,0
AI add static obstacle X
LM add collision object X
LM add light map object X
next X
for V=3 TO 8
texture object V,2
next V
texture object 2,3
`make friendly
make object sphere 9,30,100,20
position object 9,427,0,-955
AI add friendly 9
AI set entity speed 9,300
AI entity follow player 9,250
AI set entity view range 9,600
AI set entity aggressive 9
AI set entity avoid distance 9,300
AI set entity attack distance 9,600
`make enemy
make object sphere 10,65
AI add enemy 10
AI set entity speed 10,300
AI set entity aggressive 10
AI set entity view range 10,600
AI set entity avoid distance 10,300
AI set entity attack distance 10,600
`load sounds
load music "Sounds/main.wav",1
loop music 1
`make obstacles
AI complete obstacles
`make paths
AI make path 1
make object sphere 11,25
make object sphere 12,25
position object 11,120,0,-157
position object 12,460,0,-122
color object 11,RGB(0,0,255)
color object 12,RGB(0,0,255)
AI path add point 1,120,-157
AI path add point 1,460,-122
AI entity assign patrol path 10,1
`AI debug
AI debug show waypoints 0,100
AI debug show obstacle bounds 0,100
AI debug show paths 100
`make lights
LM build collision data
LM add point light 223,400,-1020,6000,1,0.5,0
`setup ambient light effects
`build light maps
`setup camera(1)
xrotate camera 70
`static varibles
Health=100
Shield=100
`start loop
do
`constant varibles
crouch=0
`display framerate
FPS=screen fps()
text 0,0,"framerate="+STR$(FPS)
`get player position
px=object position x(1)
py=object position y(1)
pz=object position z(1)
`display position
text 0,10,"Player X="+STR$(px)
text 0,20,"Player Y="+STR$(py)
text 0,30,"Player Z="+STR$(pz)
`setup camera(2)
position camera px,py+450,pz-100
position camera 1,px,py+450,pz-100
position object 13,px,py+450,pz-100
`player controls
`movement standing
if upkey()=1
set object speed 1,25
loop object 1,300,318
move object 1,-3
AI create sound px,pz,1,75
endif
if downkey()=1
set object speed 1,-25
loop object 1,300,318
move object 1,2
AI create sound px,pz,1,75
endif
if leftkey()=1
turn object left 1,3
endif
if rightkey()=1
turn object right 1,3
endif
if upkey()=0 and downkey()=0 and leftkey()=0 and rightkey()=0
loop object 1,210,234
endif
`crouch
if controlkey()=1
crouch=1
loop object 1,356,380
endif
`health
GUI_sethealthbarvalue(1,"Health",Health)
`shield
GUI_sethealthbarvalue(1,"Shield",Shield)
`sync bloom
show object 13
for B=1 TO 12
hide object B
next B
sync camera 1
hide object 13
for B=1 TO 12
show object B
next B
sync mask %01
`sync and end loop
AI update
sync:loop
`functions
function screen(aspect as float)
local extra as dword
if aspect <= 0 then exitfunction
set camera aspect aspect
if aspect > (screen width() / screen height() * 1.0)
extra = (screen height() - (screen width() * (1/aspect))) / 2
set camera view 0, extra, screen width(), screen height()-extra
else
extra = (screen width() - (screen height() * aspect)) / 2
set camera view extra, 0, screen width()-extra, screen height()
endif
endfunction