Jump to content
  • Advertisement
Sign in to follow this  
coffeecup

OpenGL applying a radial gradient to voxels

This topic is 2224 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'm using opengl es 2.0 and would like to apply radial gradients to my voxels, something like this : http://i.imgur.com/FsQGF.jpg, where would i have to start?

do i need a vertex shader or just a fragment shader, do i need both?

can anyone point me to a good tutorial or recommand a realy good book which is worth buying to get into shader programming?

Share this post


Link to post
Share on other sites
Advertisement
It depends a lot about if you're going for 2D or 3D. With 3D, you'd like to do marching cubes or surface networks with a distance field summed from your voxel grid - pretty simple to do, even though it sounds complicated. And if you're going for 2D, you'll probably want to precalculate all your possible neighbor configurations.

And in general, you want to always write all shaders yourself; it's usually faster and you can easily manipulate things if you need to.

Share this post


Link to post
Share on other sites
If you are doing shaders, you always need both the vertex shader and the fragment shader.

If you use color techniques for your voxels, then you are not using bitmap textures, are you? It may be easier to get good looking voxels by using textures.

I think you may need to study more about 3D graphics. For example, have a look at Learning Modern 3D Graphics Programming.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!