05-13-2020, 06:58 PM
Julius Xon-Items Decal Set
File: j-xon_items_v1.0.zip
License: GPL v2
Author: Xonotic & Julius
This is a small set comprised of 48 decal textures made from some SVG source files taken from Xonotic.
The shader for every texture is like this:
Some words related to the shaders:
- Lighting method: VERTEX-LIT
“surfaceparm pointlight” and “rgbGen vertex” shader directives are used to set these textures to be
vertex-lit so they are faster to render because no lightmaps are used. Keep in mind that no lightmaps
means no shadows are cast on these surfaces.
- Some explanations for other shader directives:
polygonOffset ;this avoids z-fight rendering the texture separated from the surface.
noPicMip ;this ignores the gl_picmip cvar (textures resolution).
q3map_vertexScale N.N ;this is a multiplier for the sampled light at vertices. Understand it as
a way to increase or decrease the amount of light hitting the surface.
surfaceparm trans ;this does not set transparency. It sets the surface to no VIS-blocking,
no Shadow casting (*1) & no Bounced light (*2).
(*1): It cast shadows if accompanied with "surfaceparm alphashadow". The alpha-channel image will be
the shadowcaster.
(*2): I do not understand why Bounced-light is disabled here. It doesn't make sense to me. Note that I'm
not a coder so I can't read q3map2 sources to know what this directive does exactly.
surfaceparm nonsolid ;this disables the collisions with players and projectiles
surfaceparm pointlight ;this forces vertex lighting for this surface
{
blendFunc blend ;alpha blend
}
"blendFunc blend" is the equation that tells the game engine how it should mix the different graphical
layers:
- equation: (source * alpha) + (dest * (1 - alpha))
- explicit: blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
- shorthand: blendFunc blend
"souce" represents the texture itself.
"alpha" is the black & white mask contained in the alpha-channel.
“dest” is the content of the frame-buffer (the background image with which to blend the texture).
More info from the shader manual: blendFunc
Ok, that's all for now. Any comment will be really appreciated.
-
File: j-xon_items_v1.0.zip
License: GPL v2
Author: Xonotic & Julius
This is a small set comprised of 48 decal textures made from some SVG source files taken from Xonotic.
The shader for every texture is like this:
Code:
textures/j-xon_items/i_armor
{
qer_editorImage textures/j-xon/items/i_armor.tga
qer_alphaFunc gequal 0.5
polygonOffset
noPicMip
//q3map_vertexScale 0.75
surfaceparm trans
surfaceparm nonsolid
surfaceparm pointlight
{
map textures/j-xon/items/i_armor.tga
rgbGen vertex
// (source * alpha) + (dest * (1 - alpha)) <= Alpha blend
blendFunc blend
}
}
Some words related to the shaders:
- Lighting method: VERTEX-LIT
“surfaceparm pointlight” and “rgbGen vertex” shader directives are used to set these textures to be
vertex-lit so they are faster to render because no lightmaps are used. Keep in mind that no lightmaps
means no shadows are cast on these surfaces.
- Some explanations for other shader directives:
polygonOffset ;this avoids z-fight rendering the texture separated from the surface.
noPicMip ;this ignores the gl_picmip cvar (textures resolution).
q3map_vertexScale N.N ;this is a multiplier for the sampled light at vertices. Understand it as
a way to increase or decrease the amount of light hitting the surface.
surfaceparm trans ;this does not set transparency. It sets the surface to no VIS-blocking,
no Shadow casting (*1) & no Bounced light (*2).
(*1): It cast shadows if accompanied with "surfaceparm alphashadow". The alpha-channel image will be
the shadowcaster.
(*2): I do not understand why Bounced-light is disabled here. It doesn't make sense to me. Note that I'm
not a coder so I can't read q3map2 sources to know what this directive does exactly.
surfaceparm nonsolid ;this disables the collisions with players and projectiles
surfaceparm pointlight ;this forces vertex lighting for this surface
{
blendFunc blend ;alpha blend
}
"blendFunc blend" is the equation that tells the game engine how it should mix the different graphical
layers:
- equation: (source * alpha) + (dest * (1 - alpha))
- explicit: blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
- shorthand: blendFunc blend
"souce" represents the texture itself.
"alpha" is the black & white mask contained in the alpha-channel.
“dest” is the content of the frame-buffer (the background image with which to blend the texture).
More info from the shader manual: blendFunc
Ok, that's all for now. Any comment will be really appreciated.
-