Xonotic Forums
[NEED HELP] Weapon shader isn't doing as I'm intending to do - 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: [NEED HELP] Weapon shader isn't doing as I'm intending to do (/showthread.php?tid=9133)



Weapon shader isn't doing as I'm intending to do - LegendGuard - 04-04-2022

I've a shader issue: the part of the shader of this sword (called "cyber ring") sits on top of the grip.

[Image: zsaberbladev3wipbadshading.jpg]

I'm trying to do this: ( V )
[Image: unknown.png]

The issue: it's happening that and I'm trying to avoid it ( X ):
[Image: unknown.png]

Here the shader of this weapon:
Shader code Wrote:// grip
textures/zsaberblade
{
    dpreflectcube cubemaps/default/sky
    {
        map textures/zsaberblade.tga
        rgbgen lightingDiffuse
    }
}

// edge
textures/zsaberbladeedge
{
    surfaceparm trans
    {
        map textures/zsaberbladeedge.tga
        blendfunc GL_SRC_ALPHA GL_ONE
    }
}


// edge rays
textures/electric
{
    surfaceparm trans
    {
        map textures/electric.tga
        tcMod scale 1 1
        tcMod scroll 0 0.4
        blendfunc GL_SRC_ALPHA GL_ONE
    }
}


// this thing that's on the grip, well, let's call it a "cyber ring"
textures/cyberring
{
    surfaceparm trans
    {
        map textures/cyberring.tga
        tcMod scale 1 1
        tcMod scroll 0 0.4
        blendfunc GL_SRC_ALPHA GL_ONE
    }
}



Anyone could help me, please?