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

Some fire/smoke effect broken since alpha 30 (vertexpack merge) #780

Closed
illwieckz opened this issue Jul 27, 2015 · 7 comments
Closed

Some fire/smoke effect broken since alpha 30 (vertexpack merge) #780

illwieckz opened this issue Jul 27, 2015 · 7 comments

Comments

@illwieckz
Copy link
Member

Hi, while porting the ut-metro map by newin, I've discovered that some fire and smoke effect that were still working in Unvanquished 0.29.0 were not working since Unvanquished 0.30.0. You know, the alpha 30 release is the one where the vertexpack branch were merged.

This is how fire and smoke looks like on Daemon 0.29.0 and before:
fire and smoke
fire and smoke
fire and smoke
fire and smoke

This is how fire and smoke (does not) look like on Daemon 0.30.0 and after:
fire and smoke
fire and smoke
fire and smoke
fire and smoke

This is not the only issue in these screenshots (you can see a blend issues on all screenshots, see the dark zones), but this is not on the scope of this ticket.

The fire is completely not rendered, the smoke is sometime, a little, rendered, but not like it was before.

I can send a preview pk3 of this map if needed.

@illwieckz
Copy link
Member Author

The map can be found here: https://github.com/interstellar-oasis/map-terminus 😉

@illwieckz
Copy link
Member Author

It seems related to the clamp keyword.

This is an example of fire shader used in this map:

textures/terminus/mon_fire
{
    qer_editorimage textures/terminus/fire
    q3map_cloneshader textures/terminus/zzmon_fire_1
    surfaceparm nonsolid
    surfaceparm trans
    surfaceparm nomarks
    surfaceparm nodlight
    deformvertexes move 0 0 35 sawtooth 0 1 0 0.784
    deformvertexes move -0.755352 1.22297 0 inversesawtooth -0.695684 1 0 0.784
    deformvertexes autosprite
    cull disable
    {
        clampmap textures/terminus/fire
        blendfunc GL_SRC_ALPHA GL_ONE
        rgbgen wave sawtooth 1 -1 1 0.784
        alphagen wave sawtooth 0 6 0 0.784
        tcMod rotate -33
        tcMod stretch sawtooth 1 -0.7 0 0.784
    }
}

As you see, this shader (and all others) use the clampmap keyword:

        clampmap textures/terminus/fire

Perhaps it's not an xreal shader keyword since the xreal shader manual does not mention it (but it worked on Unvanquished ≤ 0.29), instead there is a clamp keyword, that is used with a map keyword (see usage example).

So, if I rewrite this line like that:

        map textures/terminus/fire
        clamp

I get the same result (no fire effect).

But if I comment out the clamp keyword:

        map textures/terminus/fire
        // clamp

I get a broken fire effect, so it seems other shader lines are working:

fire

If you want to try it yourself, you can tweak textures/terminus_fx.shader from this package.

Note: I don’t know if the shader in the picture is the one I show you the code above, I applied the change to all shaders to test them.
Note: The black texture issue is another unrelated issue (see #782).

@illwieckz
Copy link
Member Author

Another screenshot without clamp keyword:

fire

@illwieckz
Copy link
Member Author

For information, the clampmap keyword is still supported by the current code base:

else if ( !Q_stricmp( token, "clampmap" ) )

@illwieckz
Copy link
Member Author

@gimhael, this regression was introduced by commit 0066c5f .

Date:   Sat Aug 2 10:31:41 2014 +0200
Use the same vertex layout in tess and VBOs to simplify upload.

@illwieckz
Copy link
Member Author

Probably not related at all to the clampmap keyword, it's probably just a side effect.

@illwieckz
Copy link
Member Author

This bug was fixed in 0.49.0 release.

fire and smoke
fire and smoke
fire and smoke
fire and smoke
fire and smoke
fire and smoke
fire and smoke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants