Shader files

Where are the default shader files in the Panda file directory?

I’m making a game where I need to use cartoon inking to make objects stand out when in front of a same color background (i.e. snowball and snowy ground…). The ink shader in v1.5.2 did this perfectly. After upgrading to v1.5.4 I found that the new shader inks in a more contrast based way, which makes it ineffective for what I want to use it for. With this in mind I was thinking that the easiest fix for this could be to just swap out the new shader file with the old one…but I can’t find it anywhere (I’m guessing its in the hash.lib based on research). I don’t need to be able to see the shader files (though that would be helpful if this doesn’t work and I have to write my own) so using the likely precompiled file is perfectly okay. If there is an easier/better way of doing this to get the same effect, then I’ll go with that as well.

Thanks
~silver~

There are no default shaders. That’s why it’s called a “Shader Generator” – shaders are generated programatically.
Not much has changed between the versions, except for view glow added.
I’d better double-check that the issue is not something else.

Here’s a diff of direct/src/filter/CommonFilters.py:
panda3d.cvs.sourceforge.net/view … f_format=h

PS. There are, in fact, some cg shader files containing some bloom pass shaders, but those are unchanged since they were added.

That’s interesting that there is no difference in the file. I’m positive that there was a distinct difference in the cartoon inking between the two versions. I’ll reinstall it and post the image differences if that would help pick out the problem. I also know that the per-pixel lighting shader doesn’t work (at least not the same way) as that previous version…but it still manages to ink things (incorrectly). It also throws a bunch of run-time shader errors like: …(how to capture command prompt lines?)…

:gobj(error): created-shader: (36) : error C0000: syntax error, unexpected ')'

I will also note that I didn’t change any code/media between versions so if there is a new way to call in the effect that would be the problem; and I did not write my own shader.

~silver~

Ok, i had to uninstall both versions then install just v1.5.2 to get to see the original image (don’t know why it wouldn’t work with the old version when both were installed?)…and I can’t figure out how to paste the pics so I’ll just say that there is a very definite difference between the 2 versions per-pixel lighting and cartoon ink filters. v1.5.2 does per-pixel with light ramps just fine and will ink outline a white object in front of a white background. v1.5.4 per-pixel lighting doesn’t work (gradient shade) and it ink outlines by color contrast (high contrast = thick line, white object invisible in front of white background, even inks textures!!). I’ll just keep working with the old build until I figure out a way to fix this.

You can upload screenshots to websites like imgbin.org/, then post a link to the image on the forums here.

I think you’re confusing two different systems – the Shader Generator and the Postprocessing Filters system. That gobj error was in the Shader Generator, which is a C++ system. This is what changed in the SG between 1.5.2 and 1.5.4:
panda3d.cvs.sourceforge.net/view … f_format=h