G'day!

I'm using the latest private beta 7.84 (Pro) on Windows 7, but I have no reason to believe this wasn't happening in the public beta either -- I've only just started this project today.

This afternoon I adapted the shader workshop's shadowdemo to use CSM, and encountered an issue with bmap_zbuffer or video_switch. Basically, when I change resolution, any view that had a large render target gets its resolution reduced.

I went back to the original shadowdemo.c to reproduce the problem without all the other changes I made:

In order to increase the resolution of the shadows I changed "bmap = "#1024x1024x14;" in the viewDepth definition to "bmap = "#2048x2048x14;".

In between the 2nd and 3rd lines in main() I added:
Code:
bmap_zbuffer(bmap_createblack(2048, 2048, 32));
viewDepth.size_x = 2048;
viewDepth.size_y = 2048;



Now when I run the demo the shadows look a lot more crisp, indicating that it works. Move the camera relatively close to the shadow so that you can see the aliasing of the shadow, and then hit F5 to change the resolution -- the aliasing becomes significantly worse, as if the shadow map is now a much lower resolution.

I added
Code:
DEBUG_VAR(bmap_width(viewDepth.bmap), 100);
DEBUG_VAR(viewDepth.size_x, 130);

to see which one changes when I change the resolution, but neither one does.

I searched the forum, and couldn't find anything about this.

Thanks,

Jibb


Formerly known as JulzMighty.
I made KarBOOM!