How to make shaders?

Over here:
https://docs.panda3d.org/1.10/python/programming/shaders/shader-generator

They are saying that there are shader generators at some specific parts of the manual. So can I have links to all of them?

Based on a quick look, that page, at least, seems to have mention of only one shader generator–the standard one. (Which is activated simply by calling “setShaderAuto()” on the relevant node, I believe.)

The plural is used at the end, but referencing the potential for others to make generators of their own.

No, read this text:
Individually, these features are not documented in this chapter of the manual. Instead, they’re documented in the portion of the manual where they make the most sense. For example, normal mapping, gloss mapping, and glow mapping are all documented in the section on Texturing. HDR and cartoon shading are documented under Render Attributes in the subsection on Light Ramps.

I can’t find anything on the given links,and also there may be many more.

Ah, I see. Those aren’t separate shader-generators, but standard features that the shader generator implements, I believe.

For example, consider “gloss mapping”. If you follow the link to the “Texturing” page and search for “gloss”, you should find it mentioned in the “contents” section. Following that link should take you to a section that describes gloss-mapping.

1 Like

Oh, I thought shader generation was a different thing. Then how do I make the .frag, .vert and .geom files? Is there a generator like the particle panel?

If you’re using the shader generator, then, at its simplest, you don’t: you just activate the shader generator and it does its thing in the background.

If you’re using custom shaders, then that’s a different matter–but not directly related to the use of the shader generator.

To explain a bit more: The “shader generator” is a system that automatically sets up shading based on the properties of a given node, I believe. It has limits, and it’s not as flexible as making your own shaders, but it can be quite useful for many purposes, I think.

For creating custom shaders, take a look at this manual page.

2 Likes