Shader movements and lagy text

  • #1, by ke4Tuesday, 26. July 2016, 15:22 4 years ago
    Hi,

    i used the shader shaderViewport to get this "hand camera" effect. I'm doing scene in a plane and i'm trying to break the static feeling, looks great however when text is being shown or hotspot animation it's lagy as the engine is trying to calculate the position i guess. It's centering everything else smoothly though. ( including action text ) Is there something to do about it?

    thanks.

    Key Killer

    810 Posts


  • #2, by afrlmeTuesday, 26. July 2016, 16:05 4 years ago
    Could you share a video recording of it? & quick question: have you disabled the shader from affecting interfaces, mouse cursors & text?

    Imperator

    6846 Posts

  • #3, by ke4Tuesday, 26. July 2016, 16:27 4 years ago
    Yes i have this line of code inluced in my game.

    game.ShaderExclude = eShaderExcludeInterfaces
    1
    2


    And here's the video.

    Key Killer

    810 Posts

  • #4, by afrlmeTuesday, 26. July 2016, 16:47 4 years ago
    Looks like it's trying to compensate for the movement of the camera. You could try allowing the shader stuff to affect only the cursor temporarily as it doesn't look like you have any other shader effects active. The text will swing with the camera movement, but it might look smoother & I don't think it matters all that much seeing as you aren't displaying it inside of a box or anything.

    Imperator

    6846 Posts

  • #5, by ke4Tuesday, 26. July 2016, 17:17 4 years ago
    Good idea. I wouldn't mind having the text moving with the camera.
    But eShaderExcludeCursor doesn't seems to work as it's affecting the mouse ( it's not with eShaderExcludeInterfaces )

    So i tried just to delete any of the Exclude code and the text is doing the same thing no mater what.
    It looks it's excluded for stuff like blur but not from the movements.

    There's another video, the text it's a dialogue option. This looks good.

    Key Killer

    810 Posts

  • #6, by afrlmeTuesday, 26. July 2016, 17:36 4 years ago
    You are forcing the text position with the registerHookFunction, no? It looks like it's trying to fight with that. The action text at the mouse cursor seems to be displaying just fine in the video. You could probably emulate the same thing without using the shader you know... if the background is larger than the default game resolution then you should be able to disable camera follow character & update the scrollposition in the same way that the viewport works & because you aren't messing with the shader the text should remain exactly where you place it on the screen - in theory at least.

    Imperator

    6846 Posts

  • #7, by ke4Tuesday, 26. July 2016, 17:46 4 years ago
    Actually it's happening even though i disable the registerHookFunction.
    Cursor is fine, all the animations are displayed correctly also dialogue options are ok. It's just text and hotspot animations that seems to be doing this.

    I have no idea what you mean by the scrollposition thing. Will that be moving with the screen without walking with the character?

    Key Killer

    810 Posts

  • #8, by afrlmeWednesday, 27. July 2016, 00:10 4 years ago
    Yeah. You could force it to the character position too I suppose, though that might combat the effect.

    Imperator

    6846 Posts

  • #9, by ke4Wednesday, 27. July 2016, 15:40 4 years ago
    I'm sorry i still don't really know what you mean, could you please describe it a bit more?

    Isn't that followCharacter function also shader?

    Key Killer

    810 Posts

  • #10, by afrlmeWednesday, 27. July 2016, 16:33 4 years ago
    I was talking about how it normally follows the character around when the character walks near to the edge of the current viewport & then the camera shifts over to try to center the camera on the character. This is the ScrollPosition. It has nothing to do with the shader.

    Imperator

    6846 Posts

Write post