Shader -1 reply

Please wait...

jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#1 11 years ago

[COLOR=Navy]Hi, I have made a shader, that works perfectly in the ShaderED (no errors), (and in the Radiant), but in-game it's only a white brush....please help me to fix it (the all textures are in base):

Spoiler: Show
textures/empire/place { polygonOffset q3map_nolightmap { map textures/colors/black } { map textures/byss/static_field2 alphaFunc GE128 rgbGen wave random 0 1 1 1 tcMod scroll 0 1 } { map textures/byss/static_field alphaFunc GE128 blendFunc GL_ONE GL_ONE rgbGen wave noise 0 1 1 1 tcMod scroll 0 1 } { map textures/byss/static_field3 blendFunc GL_ONE_MINUS_DST_COLOR GL_ONE tcMod scroll 0 10 } { map textures/empire/place blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA } }
[/COLOR]



lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#2 11 years ago

There isn't much use to use "alphaFunc (GE128)"s with jpeg images, like the byss/static_fields. What those alphafunc Xs do, is to render, based on an image's alpha channel (32-bit png or tga) part of the texture totally invisible while leaving the rest totally visible. Just stick to "blendFunc GL_ONE GL_ONE" with forcefield textures. Of course your first stage "map textures/colors/black" means the shader will be completely opaque in game.




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#3 11 years ago

[COLOR=Navy]Okay, I'll put there GL_ONE...I only didn't know what should I put there:D [/COLOR]

lassev;5170823Of course your first stage "map textures/colors/black" means the shader will be completely opaque in game.

[COLOR=Navy] Not really, cuz the Stage 5 is on the top :O[/COLOR] [COLOR=Navy] Thanks very much the fast answer :P //Edit: I don't know, what do I do bad, but it's full white yet:

Spoiler: Show
textures/empire/place { polygonOffset q3map_nolightmap { map textures/colors/black } { map textures/byss/static_field2 blendFunc GL_ONE GL_ONE rgbGen wave random 0 1 1 1 tcMod scroll 0 1 } { map textures/byss/static_field blendFunc GL_ONE GL_ONE rgbGen wave noise 0 1 1 1 tcMod scroll 0 1 } { map textures/byss/static_field3 blendFunc GL_ONE GL_ONE tcMod scroll 0 10 } { map textures/empire/place blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA } }

[/COLOR]




lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#4 11 years ago

What is it supposed to look like?




Pande

Sexeh like teh gizmo

50 XP

9th April 2008

0 Uploads

610 Posts

0 Threads

#5 11 years ago

It looks like a static field over a black image with a texture mask with alpha in it. I assume that means its a tv screen of some sort with no signal. Btw, to save space in your map (this is being reallllly stickler here though xD) use map $whiteimage followed by rgbGen const ( 0 0 0 ) for a black image.




lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#6 11 years ago
Pande;5171047I assume that means its a tv screen of some sort with no signal.

Yeah, I guess so as well, now that he verified he's not interested in showing what's behind. Well, I would have, sort of, figured it out by myself already if I had paid attention to the offset command. I guess you wouldn't make an actual forcefield a decal, after all...




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#7 11 years ago

[COLOR=Navy]It'll be a table in the city...btw do you know, how can I fix it (it's white yet)? :O

Pande;5171047use map $whiteimage followed by rgbGen const ( 0 0 0 ) for a black image.
I'll try it after it works:D [/COLOR]



lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#8 11 years ago

Does your custom texture "textures/empire/place" render correctly in game without this shader? Does it work without the polygon offset command (used on a brush not placed in a planar position with another brush)? Recheck also your texture's alpha channel to make sure it's like you wanted it to be. Try to temporarily comment parts of the shader to see they aren't causing the problem.

These are the basic steps you can try.




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#9 11 years ago

[COLOR=Navy]Okay, I'll try something, but I don't understamd the half of your post xDDDD Btw I'll check the Polygon Offset for example, and others....:D And that's strange, that I made two shader....it isn't working, but the other one is :O Here is the working:

Spoiler: Show
textures/empire/shop { polygonOffset q3map_nolightmap { map textures/colors/black } { map textures/byss/static_field3 blendFunc GL_ONE GL_ONE tcMod scroll 0 -5 } { map textures/empire/shop blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA tcMod scroll 0.25 0 } }
It has Polygon offset too :/

[/COLOR]

[Edit][COLOR="Navy"]Oh, and if you want, I can send you the images, and everything... :P[/COLOR][/Edit]

[Edit][COLOR=Navy]Okay, here are the textures, and the shaders (the working, and the not working too): Please help[/COLOR][/Edit]