Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

[Solved]How would one render the screen to just a portion of a rendertarget ?

$
0
0

@willmotil wrote:

I want to render the screen to just a portion of a render target.
The idea is to have the camera face one direction render everything scaled down to a portion of the rendertarget say the top left sixth of it.
Turn the camera 90 degrees in another direction with the same render target
Render to the top middle of it.
Repeat.

Id like to do this for all six sides of a cube, as im about to try to make a shadow cube map and im coding the cube atm..
I did the regular shadow map before on a single plane but its not so great i've never tried to make a shadow cube yet.

Or
is that not possible
or a bad idea
ect...

Really i have no idea how to do a shadow cube map skybox's are pretty simple but the shadow cube to me seems fairly confusing especially the part of figuring out were on which texture a pixel equates to when actually drawing the shadows.
I keep imagining about 6 if's in a shader to boot im sort of thinking that isn't the way its done ? Or is it ?

Posts: 6

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles