Xonotic Forums
Having trouble getting transparent textures to work - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Editing and Concept Art (https://forums.xonotic.org/forumdisplay.php?fid=11)
+--- Thread: Having trouble getting transparent textures to work (/showthread.php?tid=7767)



Having trouble getting transparent textures to work - Notavi - 07-15-2018

I'm trying to set up a basic window texture with transparency, but it doesn't appear to be working at the moment.

I originally went with a 32bit .TGA with an alpha channel, but this didn't appear to work correctly. I then tried using separate .jpg images. Neither has worked.

I've currently got three image files:
  • glass-lineframe.jpg
  • glass-lineframe_alpha.jpg
  • glass-lineframe_gloss.jpg
I've also tried a simple shader script (basically taking the hexglass shader and substituting my image name). Still nothing.
Code:
textures/map-aeris/glass-lineframe
{
       q3map_bouncescale 3
       qer_editorimage textures/map_aeris/glass-lineframe.jpg
       dpreflectcube cubemaps/default/sky
       dpnoshadow
       surfaceparm trans
       surfaceparm alphashadow
       q3map_lightmapSampleSize 64
       {
               map textures/map_aeris/glass-lineframe.jpg
               blendfunc blend
               rgbgen lightingDiffuse
       }
       {
               map $lightmap
               blendfunc GL_DST_COLOR GL_ZERO
               rgbGen identity
       }
}
The two main things I'm trying to accomplish are:
  • Have the texture render with transparency.
  • Have vis/light allow light through the texture when they calculate lightmaps



RE: Having trouble getting transparent textures to work - Smilecythe - 07-15-2018

Try it without the gloss texture


RE: Having trouble getting transparent textures to work - Notavi - 07-16-2018

Ok - tried that. Doesn't appear to have changed anything :/


RE: Having trouble getting transparent textures to work - Notavi - 07-16-2018

Hmm, is there any way to see what shaders are being applied, I've been combing the output from the map build and noticed the following line:
Code:
Map has shader script /home/notavi/.xonotic/data/maps/../scripts/q3map2_aeris.shader
But that's not the shader script I created and I can't see it inside that path.... 
It does then proceed to parse the correct script but I've got a sneaking suspiction NetRadiant is being "helpful" and generating a shader script for me which is overriding the one I'm deliberately preparing.
Not sure how to confirm or disprove this theory at the moment though...


RE: Having trouble getting transparent textures to work - _para - 07-16-2018

There's a 'shaderlist.txt' next to all shaders you need to make one in the scripts folder like this if you haven't:

[Image: 68s8Q58.png]


RE: Having trouble getting transparent textures to work - Notavi - 07-17-2018

It actually turned out to be something a lot dumber than that.
In my shader, the path that was typed was 'map-aeris', not 'map_aeris'.
Fixed that and now it's working properly.