Depth texture

Hi.

I want my models be cartoon shaded and I’ve looked in Common/MatDefs/Post/CartoonEdge.j3md code. What is the NormalsTexture and DepthTexture. I’ve already googled on them, but found only normal texture(Photoshop NVIDIA plug-in). So, what is the DepthTexure?

Thank you for reply.

You don’t have to use the material directly, it’s used by a Filter.



For cartoon shader, use the lighting.j3m with correct parameters and add a CartoonEdgeFilter to your viewport.

Look for TestCartoonEdges test case for a working example of this.



For you information the depth texture is the depth buffer of the scene rendered in a texture, and Normal texture is the rendered normals of the scene. They are used to detect objects edges in the shader

For you information the depth texture is the depth buffer of the scene rendered in a texture

Where can I get it?

One more thing:
Could you write a sample code of this settings, please. :roll:

Or at least how to do it? :roll:
tkey said:
Where can I get it?

uh... you can't it's dynamically rendered every frame. You don't need it btw just use the filter as i said.

tkey said:
One more thing:
Could you write a sample code of this settings, please. :roll:

Or at least how to do it? :roll:

Please try to keep one subject for one thread, it's easier for people to search then.

You need to look at the AppSetting class.
Create your own appSettings object set the parameters you want and assign it to the app.

As I can understand

1366 x 768 is appSettings.setWidth(1366) and appSettings.setHeight(768)

32 bpp is appSettings.setBitsPerPixel(32)

Fullscreen appSettings.setFullscreen(true)



What about 60 Hz and 4x?

Or maybe 1366 x 768 is appSettings.setResolution(1366, 768), or they are same?

tkey said:
Or maybe 1366 x 768 is appSettings.setResolution(1366, 768), or they are same?

Yes.
60Hz is for refresh rate, x4 is samples.

Thank you, once again.