Jump to content

Green screen shader


Recommended Posts

15 hours ago, Dzsozi (h03) said:

And how do I do that? I don't know.

Just use the code above to render your object with any contrast color. Then write simple post-processing shader, that finds the contrast color, converts it to black-n-white and delimits your object from a background. In case of the depth buffer, you might use the example from wiki . It probably also will require hiding of all world objects. For this is possible to use vertex shader that moves all vertices far away.

By the way, a sample of the second approach you can watch here

Edited by TEDERIs
Additional info
Link to comment
17 hours ago, TEDERIs said:

Just use the code above to render your object with any contrast color. Then write simple post-processing shader, that finds the contrast color, converts it to black-n-white and delimits your object from a background. In case of the depth buffer, you might use the example from wiki . It probably also will require hiding of all world objects. For this is possible to use vertex shader that moves all vertices far away.

By the way, a sample of the second approach you can watch here

I do not know how to write shader files.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...