Ok. I finally got some time to spend on ATI's NPR-Whiteboard sample
This is what I finally got:
As you can see I used (a slightly modified version of) the Compositor demo. As far as my test are concerned, the NPR_whiteboard provided by cycheng is ok if you change in file NPR_Whiteboard.hlsl
You may also want to change, in ShaderTesting.compositor
Code: Select all
texture rt0 target_width target_height PF_FLOAT16_GR
This further step obviously give you a better result with bigger resolutions.
In fact, this NPR_whiteboard shader is quite interesting: for example, you may change the Sobel filters sampling factor, tweaking some other parameters, and change a bit the edge fragment shader...
Here you are what you can get:
I'm going to do more test on this... it seems to be a good starting point for understand more complex NPR shaders.
P.S. Unfortunately the .cpp code do not work as expected, as it shows the behaviour reported in the previous post (I think that there is an error relateted to the compositor setup, but I did not investigate it).