Tremulous Forum
Media => Mapping Center => Topic started by: nubcake on November 28, 2008, 04:53:07 pm
-
Hi guys, ive slightly modified the niveus shader file for the lens flare, and added it to my maps shader file. My question is what is the line to put under targetShaderName? Is it scripts/mymap.shader or textures/mymap/flare.TGA or something else? Because ive tried both of those and a few other combinations and none work. When I try the textures path it displays the lens flare texture but not the effect (a square box). When i point it to the actual shader file nothing happens. Any help?
-
You need to use the name of the shader itself, not the .shader file or the .tga file. The flare entity uses the shader which in turn uses the .tga image.
-
So if the shader itself is called flare_red in the shaderfile mymap.shader would i have targetShaderName: flare_red because in another thread someone said use the full path (scripts/mymap/flare_red???)
-
textures/mymap/flare_red
-
Doesnt work :( This is what happens
(http://i530.photobucket.com/albums/dd342/prof_flex/failure.jpg)
Edit: I forgot to show that my targetShaderName was textures/mymap/flare and i also have the correct working script in my shaderlist, and it is also surrounded by a white outline in radiant (mean the shader is applied)
-
Hmm, looks like it could be a shader issue, hath thou tried additive blending?
textures/mymap/flare_01
{
qer_editorimage textures/mymap/flare_01.jpg
surfaceparm nolightmap
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm trans
cull disable
qer_trans 0.6
{
map textures/mymap/flare_01.jpg
blendfunc add
}
}
-
Thats the same shader I use :'( I have no idea why it does it. Its not applying the shader at all.
-
Are you using the texture with an alpha layer?
If you're not, I can't help, sorry. That's one of the few PhotoShop things I don't know how to do.
-
A texture with black as the background color will do fine if the blendFunc is add.
-
Maybe try reworking the texture in PS or something. If you up the contrast, you should be able to make the black parts even more black. That might work.
-
with what i can see (on the screenshot) it doesnt need any altering, double check you are referencing the shader and not the image itself.
-
with what i can see (on the screenshot) it doesnt need any altering, double check you are referencing the shader and not the image itself.
I followed taiyos adive and tried textures/mymap/flare_red as i dont know the path to put in for the shader... I know where it is, and have tried scripts/myshader.shader but it doesnt work
-
I assume you have a file called mymap.shader containing your shader script. Make sure you add mymap to shaderlist.txt.
Choose a name for the shader that differs from the texture name. There are situations were the wrong shader can be used
without you even noticing it.
textures/mymap/flare_01_s
{
qer_editorimage textures/mymap/flare_01.jpg
...
Also, if you happen to have a .pk3 file that contains mymap.shader, move it outside your tremulous directory
when you are compiling and testing your map.