Sign in to follow this  

Per-pixel gradient image

This topic is 3599 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've posted a few questions here before and the community has been amazing with some great responses! Thank you all very much! Here is another simple question you all might be able to help me with. :) I'm working on a simple 3D puzzle game. So far, it is going great, but my background is too boring. I'd like to create a gradient background (That changes colors with time) instead of the classic gray that I clear the buffer with. I can think of two approaches: 1) Create a black and white gradient image in photoshop and simply have it render in the background on each scene with a specific color... But I am afraid it will pixelate on high-end screens due to resizing. 2) Write, per-pixel, onto a texture and blit it to the background, but again my issue here is I don't know any gradient algorithm and am afraid it will be too slow. Any suggestions? As usual, any help is always greatly appreciated.

Share this post


Link to post
Share on other sites
I don't know what sort of gradient effect you're looking for, but you can always draw a fullscreen quad in the background, enable Gouraud shading, and then change the vertex colors. The colors will be smoothly interpolated across the face of the quad.

Share this post


Link to post
Share on other sites

This topic is 3599 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this