Due to the volume of spam comments I've had to remove lately, I've set commenting to require an account for the time being. It doesn't have to be a Google account, any OpenID account will work (so you can even log in through Steam).
I hope one day soon I can have more content to add to this blog, but I at least want to prevent it from being overrun by spammers. I'm always reading the comments.
Monday, November 27, 2017
Friday, June 16, 2017
OpenTK Example - FBO / Render Target TV
Available on Github
This is a small example of how to use a framebuffer object (sometimes the output is called a render target, although that's more of a DirectX term) in OpenTK. There's a second camera in the scene with its position indicated by the arrow. What that camera sees is put into a texture and then displayed on a model of a TV.
Controls:
This is a small example of how to use a framebuffer object (sometimes the output is called a render target, although that's more of a DirectX term) in OpenTK. There's a second camera in the scene with its position indicated by the arrow. What that camera sees is put into a texture and then displayed on a model of a TV.
This is also significant because it allows us to get the depth information of the scene. This allows us to create shadows later by easily determining if there is an object closer to the light (which would have a camera "seeing" from its direction above or in the scene), and darkening parts where that is true.
Controls:
- WASDQE - Move main camera
- UHJK - Move texture camera
- C - Switch between color view and depth view
- V - Toggle TV static shader on/off
Subscribe to:
Posts (Atom)