Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

Pulse water texture scrolling glitch

Open slipher opened this issue 1 year ago • 3 comments

The texture scrolling on the water texture on the map Pulse in the big pool of water with broken stairs (viewpos 3700 -3400 -1300) is broken. It jumps discontinuously to a different position about once every 10 seconds.

This doesn't happen on Tremulous (caveat: I tested a different version of the map.) I would expect that it does not change discontinuously in general.

slipher avatar Sep 06 '24 02:09 slipher

I can reproduce this with the lava in https://github.com/InterstellarOasis/map-tds_src.dpkdir, built from commit 6fb60429093f2a461dfb3c8c09f7a0b77ec01d07, viewpos -645 -208 16 -1 21. It happens about every 50 seconds there.

This is the shader:

textures/tds/lava1
{
    qer_editorimage textures/tds/lava1.tga
    qer_trans .5
    q3map_lightimage textures/tds/lava1.tga
    q3map_globaltexture

    surfaceparm noimpact
    surfaceparm lava
    surfaceparm nolightmap
    surfaceparm nobuildsurface

    q3map_surfacelight 500
    q3map_tessSize 64
    cull disable

    deformVertexes wave 200 sin 0 1 .5 .5

    {
	map textures/tds/lava1c.tga
	rgbGen const ( 0.6 0.6 0.6 )
	blendfunc add
	tcMod turb .3 .2 1 .05
	tcMod scroll .01 .02
    }

    {
	map textures/tds/lava1.tga
	rgbGen const ( 0.9 0.9 0.9  )
	blendfunc add
	tcMod turb .2 .1 1 .05
	tcMod scale .5 .5
	tcMod scroll .02 .01
    }
}

sweet235 avatar Sep 15 '24 00:09 sweet235

This is caused by a combination of different tcMods:

  • Removing scale and turbulence makes it work
  • Removing the x - floor( x ) and y - floor( y ) from scroll also makes it work

VReaperV avatar Sep 17 '24 02:09 VReaperV

Removing scale and turbulence makes it work

So it would seem that this affects the majority of such shaders, as using both tcMod scale and tcMod scroll seems to be rather common.

sweet235 avatar Sep 17 '24 16:09 sweet235