Quote: "IDirect3DDevice9::GetDepthStencilSurface can supposedly be used"
Can you access to depth stencil shadow vertices?
Also is this help?
sync on
sync rate 0
` Allocate the memblock once
lock backbuffer
Size = get backbuffer pitch() * get backbuffer height()
make memblock 1, Size
unlock backbuffer
make object cube 1, 1.0
do
` Retrieve the backbuffer into the memblock
lock backbuffer
copy memory get memblock ptr(1), get backbuffer ptr(), Size
` Modify the image data
Pos = get memblock ptr(1)
for i = 0 to Size-1 step 4
` Get the colour (using a pointer)
colour = *Pos
blue = colour && 0xff
green = (colour && 0xff00) >> 8
red = (colour && 0xff0000) >> 16
` Adjust the colour
inc blue, blue >> 1 ` 50% brighter
inc green, green >> 1
inc red, red >> 1
` Clamp the colour
` If your colours cannot go negative then remove the '<' comparisons
if blue < 0 then blue = 0
if blue > 255 then blue = 255
if green < 0 then green = 0
if green > 255 then green = 255
if red < 0 then red = 0
if red > 255 then red = 255
` Write the colour
colour = (colour && 0xff000000) || (red << 16) || (green << 8) || blue
` Move the pointer on to the next colour
*Pos = colour
inc Pos, 4
next
` Copy the data back to the display
copy memory get backbuffer ptr(), get memblock ptr(1), Size
unlock backbuffer
set cursor 0, 0
print screen fps()
sync
loop
