Original Post
🔒 Locked
cg program
Advertisement
Cg doesnt work like that.
Cg operates on vertices and fragments, its final output is not to a variable but to a fragment which then ends up on the screen.
Now, you can do what you want todo but its a little more involved than what you were trying todo. You would have to write the shaders such that you processed the value you wanted and outputted it to a context and then either glCopyPixels() to retrive the value from the framebuffer or if you used a texture as a render target you could glGetTexImage() todo the same thing.
Cg operates on vertices and fragments, its final output is not to a variable but to a fragment which then ends up on the screen.
Now, you can do what you want todo but its a little more involved than what you were trying todo. You would have to write the shaders such that you processed the value you wanted and outputted it to a context and then either glCopyPixels() to retrive the value from the framebuffer or if you used a texture as a render target you could glGetTexImage() todo the same thing.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement