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

Lighting an irregular object?

$
0
0

@MuntyScruntFundle wrote:

Here's one I can't think of an easy way around.

Imagine a top down solar system. I have some rotating planets, over which I draw a kind of highlight mask, so I can produce the effect of the sun lighting the side of the planets facing the sun. It looks pretty good, even if I do say so myself!

But I'd like to do the same with some irregular shaped objects, for the sake of argument imagine a cone shape which is rotating, or tumbling. How would apply a a brightness mask without the mask lighting an object drawn underneath it? It's impossible to make a mask for every possible position/rotation of the object.

The only way I can think of doing this is to render the object and highlight to a Render Target then draw the result, but then I get into the performance problems discussed in another post.

Can anyone suggest another way to achieve what I'm thinking of?

I hope I've explained this well enough.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles