Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken water translucency on station15 map #120

Closed
illwieckz opened this issue Aug 28, 2018 · 3 comments · Fixed by #181
Closed

broken water translucency on station15 map #120

illwieckz opened this issue Aug 28, 2018 · 3 comments · Fixed by #181

Comments

@illwieckz
Copy link
Member

illwieckz commented Aug 28, 2018

See the waterfall and the pond (two different shaders):

incorrect

Note there is also a problem with depth:

incorrect

incorrect

incorrect

This is a third and similarly broken translucent water shader:

incorrect

@illwieckz
Copy link
Member Author

illwieckz commented Aug 28, 2018

For testing purpose a snapshot of for-0.51.0 assets (including station15 map) can be fetched this way:

wget -O- http://gg.illwieckz.net/dl/unvanquished/dev/UnvanquishedAssets.get | xargs wget

@illwieckz
Copy link
Member Author

Here is one example of buggy material:

// Crappy water with leaves
textures/station15_custom/water2
{
	qer_editorImage textures/station15_custom_src/leaves_d
	qer_trans .3
	q3map_globaltexture
	entityMergable
	surfaceparm nobuild
	surfaceparm trans
	surfaceparm water
	surfaceparm nonsolid
	surfaceparm nolightmap
	cull disable
	tesssize 64
	deformVertexes wave 64 sin .8 1.5 2 .8
	{
		map textures/station15_custom_src/water_d
		rgbGen const ( .8 .8 .3 )
		alphaGen const .2
		blendfunc blend
		tcMod scroll .03 .001
	}
	{
		map textures/station15_custom_src/waterfall_r
		alphagen const .3
		blendfunc blend
		rgbGen const ( .8 .9 1 )	// ← this line
		tcmod scale .2 1
		tcGen environment
	}
	{
		map textures/station15_custom_src/leaves_d
		blendfunc blend
		AlphaFunc GE128
		DepthWrite
	}
}

Notice the rgbGen const ( .8 .9 1 ) line I identified.

This is what produces the original material:

waterbug

This is what produces the same material but with that line commented out (disabled):

waterbug

This is what produces the same material but with that line moved before the alphagen const .3 line:

waterbug

I see no difference between without or before. Perhaps we have a bug where alphaGen deletes rgb channels and where rgbGen deletes alpha channel.

@illwieckz
Copy link
Member Author

It looks like we have a fix in #181:

fixedbug

Unvanquished automation moved this from To do to Done Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Unvanquished
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants