Debugging Shaders?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Debugging Shaders?

Post by AEon »

I seem to have done something really bad because my 72KB shader for textures_ae no longer is properly loaded by GTKradiant 1.2.13.

What happened:
  • Kept copy/pasting shader versions, carefully I would have thought.
  • Suddenly the latest shader I had added does not show up in the textures window of the GTKradiant.
  • Further inspection shows that *none* of the shaders had been loaded, i.e. all the transparent textures no longer were transparent.
  • Double-checked shaderlist.txt, the proper entry for the shader is still there.
At first I thought that was a size issues, e.g. a .shader file larger than 64KB will not work. But is seems to be some error.

Alas via GTKradiant console (o-key), you don't get much info (the shader is called aegrid.shader):
  • Parsing shaderfile scripts/aegrid.shader
    Error parsing shader /
    Parsing shaderfile scripts/solarae.shade
And the old version of q3ase (v1.5.3) does not load the shader from my pk3 file at all. The tool does not seem to have a console to check what is causing the problem.

Any suggestions on how to find out what the problem is?

Thanks.

Update: In-game the shaders seems to work and Q3A does not warn about shader issues.
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Debugging Shaders?

Post by AEon »

I must have changed the .shader's file format in some strange way (some weird Unicode or so), so that GTKradiant could no longer load the file, and would stop at the first character in the file, completely ignoring it.

Fix: I duplicated an original id shader, and copy/pasted the code of my shader into that file. Now things work.

*sigh*
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Debugging Shaders?

Post by obsidian »

What program are you using to edit your shader files?
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Debugging Shaders?

Post by AEon »

Forgot to mention this... it is UltraEdit v14.20...

After "fixing" the file, I noted the size went down from 72KB to about 24KB... so there definitely was some Unicode going on there. Probably hit the wrong shortcut accidentally converting the shader file into a non-ASCII format.
Post Reply